package com.mindskip.xzs.repository; import com.mindskip.xzs.domain.QuestionSubject; import com.mindskip.xzs.domain.vo.QuestionVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; @Mapper public interface QuestionSubjectMapper extends BaseMapper{ /** * 批量删除 * @param ids * @return */ Integer removes(@Param("ids") Integer[] ids); /** * * @return */ List getQuestion(Integer id); Integer saves(List list); Integer removeQuestionId(Integer questionId); Integer removeSubjectId(Integer subjectId); List getSubject(Integer id); /** 统计课目的题目数 */ Integer countQuestionNum(@Param("subjects") List subjects); /** 随机题目 */ List getRandomQuestionId(@Param("subjectIds") List subjectIds, @Param("questionType") Integer questionType, @Param("questionNum") Integer questionNum); /** 查询题目ID,根据课目ids */ List questionsBySubjectIds(@Param("subjectIds") List subjectIds); /** 查询题目ID根据课目id */ List questionsBySubjectId(Integer subjectId); /** 根据课目和题型查询题目ID */ List questionsBySubjectIdAndQuestionType(@Param("subjectId") Integer subjectId, @Param("questionType") Integer questionType); }