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.

63 lines
1.6 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 监管行业
* @return 题目详情
*/
ExamPapers getDetail(@Param("id") Long id);
/**
* 随机获取题目
*
* @param industryId 监管行业
* @param questionCount 题目数量
* @return 题目列表
*/
List<QuestionCategories> getRandomQuestions(
@Param("industryId") Long industryId,
@Param("questionCount") Integer questionCount);
}