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);
|
|
/**
|
* 顺序获取指定数量的考题
|
* @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
|
* @param exerciseType
|
* @return
|
*/
|
List<Map> getExerciseQuestionList(@Param("bankId") Long bankId, @Param("exerciseType") Integer exerciseType,@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 completed
|
* @param userId
|
* @return
|
*/
|
List<Map> getPaperQuestionList(@Param("paperId") Long paperId, @Param("completed") Integer completed, @Param("userId")Long userId);
|
|
/**
|
* 根据id获取考卷下题目详情
|
* @param questionId
|
* @param completed
|
* @param userId
|
* @return
|
*/
|
ExQuestion getPaperQuestionById(@Param("paperId")Long paperId,@Param("questionId")Long questionId, @Param("completed")Integer completed, @Param("userId")Long userId);
|
|
/**
|
* 根据id列表批量获取考卷下题目详情
|
* @param paperId
|
* @param questionIds
|
* @param completed
|
* @param userId
|
* @return
|
*/
|
List<ExQuestion> getPaperQuestionByIds(@Param("paperId") Long paperId, @Param("questionIds")List<Long> questionIds, @Param("completed")Integer completed, @Param("userId")Long userId);
|
|
/**
|
* 获取错题题目id
|
* @param bankId
|
* @param userId
|
* @return
|
*/
|
List<Long> getExerciseErrorQuestionList(@Param("bankId") Long bankId, @Param("userId") Long userId);
|
}
|