xiangpei
2024-07-09 c2cd507da74f1841d0133d4c9bff9025ce1066ba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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<QuestionSubject>{
 
    /**
     * 批量删除
     * @param ids
     * @return
     */
    Integer removes(@Param("ids") Integer[] ids);
 
    /**
     *
     * @return
     */
    List<QuestionSubject> getQuestion(Integer id);
 
    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);
}