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; /** *

* 考题表 Mapper 接口 *

* * @author kzy * @since 2024-06-06 13:53:17 */ @Mapper public interface ExQuestionMapper extends BaseMapper { /** * 根据题库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 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 selectRandomQuestion(@Param("companyId") Long companyId,@Param("bankId")Long bankId, @Param("questionType")Integer questionType, @Param("questionCount")Integer questionCount); /** * 分页查询题目 * @param question * @return */ List selectQuestionList(ExQuestion question); /** * 获取题库下面所有题目id列表 * @param bankId * @return */ List 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 getExeriseQuestionByIds(@Param("questionIds") List questionIds,@Param("studentId")Long studentId); /** * 获取考卷下面所有题目id列表 * @param paperId * @param state * @param studentId * @return */ List 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 getPaperQuestionByIds(@Param("paperId") Long paperId, @Param("questionIds")List questionIds, @Param("state")Integer state, @Param("studentId")Long studentId); /** * 获取错题题目id * @param bankId * @param studentId * @return */ List getExerciseErrorQuestionList(@Param("bankId") Long bankId, @Param("studentId") Long studentId); /** * 根据试卷id查询题目列表 * @param paperId * @return */ List selectQuestionByPaperId(Long paperId); int saveBatch(List exQuestions); }