xiangpei
2024-03-28 0f431b52e0936456bd165d9553761bfd8a5a0517
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
package com.mindskip.xzs.repository;
 
import com.mindskip.xzs.domain.ExamPaper;
import com.mindskip.xzs.domain.exam.ExamClassShortInfo;
import com.mindskip.xzs.domain.other.KeyValue;
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperPageRequestVM;
import com.mindskip.xzs.viewmodel.student.dashboard.PaperFilter;
import com.mindskip.xzs.viewmodel.student.dashboard.PaperInfo;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.Date;
import java.util.List;
 
/**
 * @version 2.2.0
 * @description: 试卷
 * Copyright (C), 2020-2021, 武汉思维跳跃科技有限公司
 * @date 2021 /9/7 9:45
 */
@Mapper
public interface ExamPaperMapper extends BaseMapper<ExamPaper> {
    int deleteByPrimaryKey(Integer id);
 
    int insert(ExamPaper record);
 
    int insertSelective(ExamPaper record);
 
    ExamPaper selectByPrimaryKey(Integer id);
 
    int updateByPrimaryKeySelective(ExamPaper record);
 
    int updateByPrimaryKey(ExamPaper record);
 
    /**
     * 试卷分页
     *
     * @param requestVM the request vm
     * @return the list
     */
    List<ExamPaper> page(ExamPaperPageRequestVM requestVM);
 
    /**
     * 管理端试卷分页
     *
     * @param requestVM the request vm
     * @return the list
     */
    List<ExamPaper> adminPage(ExamPaperPageRequestVM requestVM);
 
    /**
     * 任务试卷分页
     *
     * @param requestVM the request vm
     * @return the list
     */
    List<ExamPaper> taskExamPage(ExamPaperPageRequestVM requestVM);
 
    /**
     * 学生端试卷分页
     *
     * @param requestVM the request vm
     * @return the list
     */
    List<ExamPaper> studentPage(ExamPaperPageVM requestVM);
 
    /**
     * 学生班级试卷
     *
     * @param requestVM the request vm
     * @return the list
     */
    List<ExamPaper> studentClassesPage(ExamPaperPageVM requestVM);
 
    /**
     * 获取前五个试卷
     *
     * @param paperFilter the paper filter
     * @return the list
     */
    List<PaperInfo> indexPaper(PaperFilter paperFilter);
 
    /**
     * 获取班级试卷信息
     *
     * @param cIds the c ids
     * @return the list
     */
    List<ExamClassShortInfo> classesPaper(@Param("cIds") List<Integer> cIds);
 
    /**
     * 获取所有试卷数量
     *
     * @return the integer
     */
    Integer selectAllCount();
 
    /**
     * 获取时间段内的试卷数量
     *
     * @param startTime the start time
     * @param endTime   the end time
     * @return the list
     */
    List<KeyValue> selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
 
    /**
     * 更新任务试卷
     *
     * @param taskId   the task id
     * @param paperIds the paper ids
     * @return the int
     */
    int updateTaskPaper(@Param("taskId") Integer taskId, @Param("paperIds") List<Integer> paperIds);
 
    /**
     * 清理任务试卷
     *
     * @param paperIds the paper ids
     * @return the int
     */
    int clearTaskPaper(@Param("paperIds") List<Integer> paperIds);
 
    /**
     * 获取智能训练试卷数量
     *
     * @param userId the user id
     * @return the random paper count
     */
    Integer getRandomPaperCount(@Param("createUserId") Integer userId);
}