luohairen
2024-11-12 b661bcf7e065092c876e052bad0bfaecb9dc0c17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package com.ycl.jxkg.service.impl;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ycl.jxkg.domain.entity.ExamPaperScore;
import com.ycl.jxkg.domain.entity.Question;
import com.ycl.jxkg.domain.entity.QuestionAnswerRecord;
import com.ycl.jxkg.domain.vo.DoQuestionVO;
import com.ycl.jxkg.domain.vo.PaperFixQuestionVO;
import com.ycl.jxkg.domain.vo.student.wrong.WrongPageVo;
import com.ycl.jxkg.domain.vo.student.wrong.WrongRequestVo;
import com.ycl.jxkg.domain.vo.student.wrong.WrongResponseVO;
import com.ycl.jxkg.mapper.ExamPaperScoreMapper;
import com.ycl.jxkg.mapper.QuestionAnswerRecordMapper;
import com.ycl.jxkg.mapper.QuestionMapper;
import com.ycl.jxkg.service.WrongService;
import com.ycl.jxkg.utils.JsonUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
 
@Service
@RequiredArgsConstructor
@Slf4j
public class WrongServiceImpl implements WrongService {
    @Autowired
    private ExamPaperScoreMapper examPaperScoreMapper;
    @Autowired
    private QuestionMapper questionMapper;
    @Autowired
    private QuestionAnswerRecordMapper questionAnswerRecordMapper;
 
 
 
    /**
     * 条件查询错题
     * */
    @Override
    public PageInfo<WrongResponseVO> list(WrongRequestVo wrongRequestVo) {
        return PageHelper.startPage(wrongRequestVo.getPageIndex(), wrongRequestVo.getPageSize()).doSelectPageInfo(() -> {
            questionAnswerRecordMapper.selectWrongQuestion(wrongRequestVo);
        });
    }
}