You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
1.9 KiB

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<ExamPapers> {
/**
* 查询试卷
*
* @param industryId 监管行业
* @param paperName 试卷名称
* @param offset 偏移量
* @param num 每页数量
* @return 当前页数据
*/
List<ExamPapers> 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<QuestionCategories> getQuestions(@Param("id") Long id);
/**
* 随机获取试题
*
* @param industryId 监管行业
* @param questionCount 题目数量
* @return 题目
*/
List<QuestionCategories> getRandomQuestions(
@Param("industryId") Long industryId,
@Param("questionCount") Integer questionCount);
/**
* 查询试卷是否被引用
*
* @param ids 试卷ID
* @return 查询结果
*/
int getExamIsUsed(@Param("ids") List<Long> ids);
}