kongzy
2024-09-14 f0f00e9ba8a755e4317e029d73b69a92ad9f9df1
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
package com.gkhy.exam.system.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gkhy.exam.system.domain.ExPaperStudent;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
/**
 * <p>
 * 学员与考试题目关系表 Mapper 接口
 * </p>
 *
 * @author kzy
 * @since 2024-06-06 13:53:17
 */
@Mapper
public interface ExPaperStudentMapper extends BaseMapper<ExPaperStudent> {
    /**
     * 根据id获取考卷下的学员
     * @param paperStudentId
     * @return
     */
    ExPaperStudent selectPaperStudentById(Long paperStudentId);
 
    /**
     * 根据id获取考卷下的学员,信息较少
     * @param paperStudentId
     * @return
     */
    ExPaperStudent selectSimplePaperStudentById(Long paperStudentId);
 
    /**
     * 分页查询考卷下分配的学员
     * @param paperStudent
     * @return
     */
    List<ExPaperStudent> selectPaperStudentList(ExPaperStudent paperStudent);
 
    /**
     * 批量插入
     * @param paperStudents
     * @return
     */
    int batchInsert(List<ExPaperStudent> paperStudents);
 
    /**
     * 统计考卷下学员数量
     * @param paperId
     * @return
     */
    int countByPaperId(Long paperId);
 
    /**
     * 查询数量
     * @param paperId
     * @param studentId
     * @return
     */
    Integer selectCountByPaperStudentId(@Param("paperId") Long paperId, @Param("studentId")Long studentId);
 
    /**
     * 根据试卷id和学员id查询试卷信息
     * @param paperStudent
     * @return
     */
    ExPaperStudent selectByPaperStudentId(ExPaperStudent paperStudent);
 
    /**
     * 根据学员id获取学员分配的考试列表
     * @param studentId
     * @return
     */
    List<ExPaperStudent> selectByStudentId(Long studentId);
 
    /**
     * 分页获取未完成考试学生列表
     * @param startIndex
     * @param pageSize
     * @return
     */
    List<ExPaperStudent> selectNoCompleteStudent(int startIndex,int pageSize);
 
    /**
     * 批量更新完成状态
     * @param paperStudentIds
     * @param completed
     */
    void batchUpdateComplete(@Param("paperStudentIds") List<Long> paperStudentIds,@Param("completed") Integer completed);
 
 
 
}