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);
/**
* 顺序获取指定数量的考题
* @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
* @param exerciseType
* @return
*/
List