|
@@ -6,7 +6,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
|
|
import com.qmth.boot.core.exception.ParameterException;
|
|
|
import com.qmth.teachcloud.mark.bean.archivescore.ScanPaperPageVo;
|
|
|
import com.qmth.teachcloud.mark.entity.ScanPaperPage;
|
|
@@ -22,48 +22,48 @@ import com.qmth.teachcloud.mark.service.ScanPaperPageService;
|
|
|
* @since 2023-09-22
|
|
|
*/
|
|
|
@Service
|
|
|
-public class ScanPaperPageServiceImpl extends ServiceImpl<ScanPaperPageMapper, ScanPaperPage>
|
|
|
- implements ScanPaperPageService {
|
|
|
+public class ScanPaperPageServiceImpl extends MppServiceImpl<ScanPaperPageMapper, ScanPaperPage>
|
|
|
+ implements ScanPaperPageService {
|
|
|
|
|
|
- @Override
|
|
|
- public ScanPaperPage findPaperIdAndIndex(Long paperId, Integer index) {
|
|
|
- if (paperId == null) {
|
|
|
- throw new ParameterException("paperId不能为空");
|
|
|
- }
|
|
|
- if (index == null) {
|
|
|
- throw new ParameterException("index不能为空");
|
|
|
- }
|
|
|
- QueryWrapper<ScanPaperPage> wrapper = new QueryWrapper<>();
|
|
|
- LambdaQueryWrapper<ScanPaperPage> lw = wrapper.lambda();
|
|
|
- lw.eq(ScanPaperPage::getPaperId, paperId);
|
|
|
- lw.eq(ScanPaperPage::getPageIndex, index);
|
|
|
- return baseMapper.selectOne(wrapper);
|
|
|
- }
|
|
|
+ @Override
|
|
|
+ public ScanPaperPage findPaperIdAndIndex(Long paperId, Integer index) {
|
|
|
+ if (paperId == null) {
|
|
|
+ throw new ParameterException("paperId不能为空");
|
|
|
+ }
|
|
|
+ if (index == null) {
|
|
|
+ throw new ParameterException("index不能为空");
|
|
|
+ }
|
|
|
+ QueryWrapper<ScanPaperPage> wrapper = new QueryWrapper<>();
|
|
|
+ LambdaQueryWrapper<ScanPaperPage> lw = wrapper.lambda();
|
|
|
+ lw.eq(ScanPaperPage::getPaperId, paperId);
|
|
|
+ lw.eq(ScanPaperPage::getPageIndex, index);
|
|
|
+ return this.getOne(wrapper);
|
|
|
+ }
|
|
|
|
|
|
- @Override
|
|
|
- public List<ScanPaperPage> listByPaperId(Long paperId) {
|
|
|
- if (paperId == null) {
|
|
|
- throw new ParameterException("paperId不能为空");
|
|
|
- }
|
|
|
- QueryWrapper<ScanPaperPage> wrapper = new QueryWrapper<>();
|
|
|
- LambdaQueryWrapper<ScanPaperPage> lw = wrapper.lambda();
|
|
|
- lw.eq(ScanPaperPage::getPaperId, paperId);
|
|
|
- lw.orderByAsc(ScanPaperPage::getPageIndex);
|
|
|
- return baseMapper.selectList(wrapper);
|
|
|
- }
|
|
|
+ @Override
|
|
|
+ public List<ScanPaperPage> listByPaperId(Long paperId) {
|
|
|
+ if (paperId == null) {
|
|
|
+ throw new ParameterException("paperId不能为空");
|
|
|
+ }
|
|
|
+ QueryWrapper<ScanPaperPage> wrapper = new QueryWrapper<>();
|
|
|
+ LambdaQueryWrapper<ScanPaperPage> lw = wrapper.lambda();
|
|
|
+ lw.eq(ScanPaperPage::getPaperId, paperId);
|
|
|
+ lw.orderByAsc(ScanPaperPage::getPageIndex);
|
|
|
+ return baseMapper.selectList(wrapper);
|
|
|
+ }
|
|
|
|
|
|
- @Override
|
|
|
- public List<ScanPaperPage> listByPaperList(List<Long> paperIds) {
|
|
|
- QueryWrapper<ScanPaperPage> wrapper = new QueryWrapper<>();
|
|
|
- LambdaQueryWrapper<ScanPaperPage> lw = wrapper.lambda();
|
|
|
- lw.in(ScanPaperPage::getPaperId, paperIds);
|
|
|
- wrapper.orderByAsc("paper_id", "page_index");
|
|
|
- return this.list(wrapper);
|
|
|
- }
|
|
|
+ @Override
|
|
|
+ public List<ScanPaperPage> listByPaperList(List<Long> paperIds) {
|
|
|
+ QueryWrapper<ScanPaperPage> wrapper = new QueryWrapper<>();
|
|
|
+ LambdaQueryWrapper<ScanPaperPage> lw = wrapper.lambda();
|
|
|
+ lw.in(ScanPaperPage::getPaperId, paperIds);
|
|
|
+ wrapper.orderByAsc("paper_id", "page_index");
|
|
|
+ return this.list(wrapper);
|
|
|
+ }
|
|
|
|
|
|
- @Override
|
|
|
- public List<ScanPaperPageVo> listByStudentIds(List<Long> studentIds) {
|
|
|
- return baseMapper.listByStudentIds(studentIds);
|
|
|
- }
|
|
|
+ @Override
|
|
|
+ public List<ScanPaperPageVo> listByStudentIds(List<Long> studentIds) {
|
|
|
+ return baseMapper.listByStudentIds(studentIds);
|
|
|
+ }
|
|
|
|
|
|
}
|