package com.ccic.safeliab.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ccic.safeliab.entity.ExamPapers; import com.ccic.safeliab.entity.QuestionCategories; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; /** * Mapper 接口 * * @author Chill */ @Mapper public interface ExamPaperMapper extends BaseMapper { /** * 查询试卷 * * @param industryId 监管行业 * @param paperName 试卷名称 * @param offset 偏移量 * @param num 每页数量 * @return 当前页数据 */ List getList( @Param("industryId") Long industryId, @Param("paperName") String paperName, @Param("offset") int offset, @Param("num") int num); /** * 查询试卷数量 * * @param industryId 监管行业 * @param paperName 试卷名称 * @return 试卷数量 */ int getListSize( @Param("industryId") Long industryId, @Param("paperName") String paperName); /** * 试卷详情 * * @param id 试卷ID * @return 试卷详情 */ ExamPapers getExamPaperDetail(@Param("id") Long id); /** * 试卷详情(试题) * * @param id ID * @return 试卷详情 */ List getQuestions(@Param("id") Long id); /** * 随机获取试题 * * @param industryId 监管行业 * @param questionCount 题目数量 * @return 试题 */ List getRandomQuestions( @Param("industryId") Long industryId, @Param("questionCount") Integer questionCount); /** * 获取监管行业下的所有试题 * * @param industryId 监管行业 * @return 试题 */ int geIndustryQuestions( @Param("industryId") Long industryId); /** * 查询试卷是否被引用 * * @param ids 试卷ID * @return 查询结果 */ int getExamIsUsed(@Param("ids") List ids); }