xiangpei
2025-05-14 47cd9ecc0eff38ffe6b3b794b2bf197e958f4403
src/main/java/com/mindskip/xzs/repository/QuestionSubjectMapper.java
@@ -1,7 +1,9 @@
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;
@@ -13,7 +15,7 @@
     * @param ids
     * @return
     */
    Integer removes(Integer[] ids);
    Integer removes(@Param("ids") Integer[] ids);
    /**
     *
@@ -24,4 +26,32 @@
    Integer saves(List<QuestionSubject> list);
    Integer removeQuestionId(Integer questionId);
    Integer removeSubjectId(Integer subjectId);
    List<QuestionSubject> getSubject(Integer id);
    /** 统计课目的题目数 */
    Integer countQuestionNum(@Param("subjects") List<Integer> subjects, @Param("questionType") Integer questionType);
    /** 随机题目 */
    List<QuestionVO> getRandomQuestionId(@Param("subjectIds") List<Integer> subjectIds, @Param("questionType") Integer questionType, @Param("questionNum") Integer questionNum);
    /** 查询题目ID,根据课目ids */
    List<Integer> questionsBySubjectIds(@Param("subjectIds") List<Integer> subjectIds);
    /** 查询题目ID根据课目id */
    List<Integer> questionsBySubjectId(Integer subjectId);
    /** 根据课目和题型查询题目ID */
    List<Integer> questionsBySubjectIdAndQuestionType(@Param("subjectId") Integer subjectId, @Param("questionType") Integer questionType);
    /** 根据课目ID查询题目详情 */
    List<QuestionVO> bySubjectId(@Param("subjectId") Integer subjectId);
    /** 根据课目和题型查找题目数据 */
    List<QuestionVO> bySubjectIdAndQuestionType(Integer subjectId, Integer dataBaseValueByValue);
    /** 根据科目查询题目 **/
    List<QuestionSubject> getSubjectBySubjectIds(Integer[] subjectIds);
}