You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.3 KiB
50 lines
1.3 KiB
package com.example.demo.serviceImpl;
|
|
|
|
|
|
import com.example.demo.domain.entity.Detail;
|
|
import com.example.demo.mapper.DetailMapper;
|
|
import com.example.demo.sevice.DetailService;
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageInfo;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import java.util.List;
|
|
|
|
@Service
|
|
@Transactional
|
|
@RequiredArgsConstructor
|
|
public class DetailServiceImpl implements DetailService {
|
|
@Autowired
|
|
|
|
private DetailMapper detailMapper;
|
|
@Override
|
|
public int add(Detail detail) {
|
|
return detailMapper.add(detail);
|
|
}
|
|
|
|
@Override
|
|
public int edit(Detail detail) {
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public Detail getDetail(int id) {
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public List<Detail> getAllDetail(Detail detail) {
|
|
return detailMapper.select(detail);
|
|
}
|
|
|
|
|
|
@Override
|
|
public PageInfo<Detail> getDetailByPage(int pageNum, int pageSize, Detail detail) {
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
List<Detail> list= detailMapper.select(detail);
|
|
return new PageInfo<>(list);
|
|
}
|
|
}
|