“djh”
5 天以前 5ca4ab349909030e77354832287f2d6a2c80e119
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
package com.gkhy.exam.system.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gkhy.exam.system.domain.ExQuestion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
import java.util.Map;
 
/**
 * <p>
 * 考题表 Mapper 接口
 * </p>
 *
 * @author kzy
 * @since 2024-06-06 13:53:17
 */
@Mapper
public interface ExQuestionMapper extends BaseMapper<ExQuestion> {
    /**
     * 根据题库id查询题目数量
     * @param bankId
     * @param questionType
     * @return
     */
    Integer selectCountByBankId(@Param("companyId") Long companyId,@Param("bankId") Long bankId, @Param("questionType") Integer questionType);
 
    /**
     * 根据id获取题目信息
     * @param questionId
     * @return
     */
    ExQuestion selectByQuestionId(Long questionId);
 
    /**
     * 顺序获取指定数量的考题
     * @param bankId
     * @param questionType
     * @param startIndex
     * @return
     */
    List<ExQuestion> selectQuestionWithLimit(@Param("companyId") Long companyId,@Param("bankId")Long bankId, @Param("questionType")Integer questionType, @Param("startIndex")Integer startIndex, @Param("questionCount")Integer questionCount);
 
    /**
     * 随机指定数量的考题
     * @param bankId
     * @param questionType
     * @return
     */
    List<ExQuestion> selectRandomQuestion(@Param("companyId") Long companyId,@Param("bankId")Long bankId, @Param("questionType")Integer questionType, @Param("questionCount")Integer questionCount);
 
    /**
     * 分页查询题目
     * @param question
     * @return
     */
    List<ExQuestion> selectQuestionList(ExQuestion question);
 
    /**
     * 获取题库下面所有题目id列表
     * @param bankId
     * @return
     */
    List<Map> getExerciseQuestionList(@Param("bankId") Long bankId,@Param("studentId") Long StundentId);
 
    /**
     * 刷题模式下获取题目
     * @param questionId
     * @return
     */
    ExQuestion getExeriseQuestionById(@Param("questionId") Long questionId,@Param("studentId")Long studentId);
 
    /**
     * 刷题模式下批量获取题目
     * @param questionIds
     * @param studentId
     * @return
     */
    List<ExQuestion> getExeriseQuestionByIds(@Param("questionIds") List<Long> questionIds,@Param("studentId")Long studentId);
 
    /**
     * 获取考卷下面所有题目id列表
     * @param paperId
     * @param state
     * @param studentId
     * @return
     */
    List<Map> getPaperQuestionList(@Param("paperId") Long paperId, @Param("state") Integer state, @Param("studentId")Long studentId, @Param("viewType")Integer viewType);
 
    /**
     * 根据id获取考卷下题目详情
     * @param questionId
     * @param state
     * @param studentId
     * @return
     */
    ExQuestion getPaperQuestionById(@Param("paperId")Long paperId,@Param("questionId")Long questionId, @Param("state")Integer state, @Param("studentId")Long studentId);
 
    /**
     * 根据id列表批量获取考卷下题目详情
     * @param paperId
     * @param questionIds
     * @param state
     * @param studentId
     * @return
     */
    List<ExQuestion> getPaperQuestionByIds(@Param("paperId") Long paperId, @Param("questionIds")List<Long> questionIds, @Param("state")Integer state, @Param("studentId")Long studentId);
 
    /**
     * 获取错题题目id
     * @param bankId
     * @param studentId
     * @return
     */
    List<Long> getExerciseErrorQuestionList(@Param("bankId") Long bankId, @Param("studentId") Long studentId);
 
    /**
     * 根据试卷id查询题目列表
     * @param paperId
     * @return
     */
    List<ExQuestion> selectQuestionByPaperId(Long paperId);
 
    int saveBatch(List<ExQuestion> exQuestions);
}