liu
2026-09-22 0837c3ff473499d8a267924125c776b34cc8b517
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
package com.ruoyi.system.mapper;
 
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.system.domain.CjStudent;
 
/**
 * 学生花名册Mapper接口
 * 
 * @author ruoyi
 * @date 2026-09-03
 */
public interface CjStudentMapper 
{
    /**
     * 查询学生花名册
     * 
     * @param studentId 学生花名册主键
     * @return 学生花名册
     */
    public CjStudent selectCjStudentByStudentId(Long studentId);
 
    /**
     * 查询学生花名册列表
     * 
     * @param cjStudent 学生花名册
     * @return 学生花名册集合
     */
    public List<CjStudent> selectCjStudentList(CjStudent cjStudent);
 
    /**
     * 新增学生花名册
     * 
     * @param cjStudent 学生花名册
     * @return 结果
     */
    public int insertCjStudent(CjStudent cjStudent);
 
    /**
     * 修改学生花名册
     * 
     * @param cjStudent 学生花名册
     * @return 结果
     */
    public int updateCjStudent(CjStudent cjStudent);
 
    /**
     * 删除学生花名册
     * 
     * @param studentId 学生花名册主键
     * @return 结果
     */
    public int deleteCjStudentByStudentId(Long studentId);
 
    /**
     * 批量删除学生花名册
     *
     * @param studentIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCjStudentByStudentIds(Long[] studentIds);
 
    /**
     * 统计某班级下学生数(删除班级引用保护)
     *
     * @param classIds 班级ID集合
     * @return 数量
     */
    public int countByClassIds(Long[] classIds);
 
    /**
     * 查询学生登录密码哈希(登录/改密校验专用;不出现在列表查询中)
     *
     * @param studentId 学生ID
     * @return BCrypt 哈希,未激活为 null
     */
    public String selectPasswordByStudentId(Long studentId);
 
    /**
     * 更新学生登录密码(注册/重置/改密专用,无条件 set 以支持清空)
     *
     * @param studentId    学生ID
     * @param password     BCrypt 哈希
     * @param pwdResetFlag 需强制改密(1是 0否)
     * @param registerTime 激活时间(可空,仅注册时写)
     * @return 结果
     */
    public int updateStudentPassword(@Param("studentId") Long studentId, @Param("password") String password,
                                     @Param("pwdResetFlag") String pwdResetFlag, @Param("registerTime") Date registerTime);
 
    /**
     * 记录最近登录时间
     *
     * @param studentId 学生ID
     * @param loginDate 登录时间
     * @return 结果
     */
    public int updateStudentLoginDate(@Param("studentId") Long studentId, @Param("loginDate") Date loginDate);
 
    /**
     * 按班级统计在册学生数与已激活(建档)数(工作台聚合;classIds 空=全校)
     * 返回行:{class_id, total, activated}
     */
    public List<Map<String, Object>> classStudentStats(@Param("classIds") Long[] classIds);
 
    /**
     * 按学院统计班级数/学生数/已激活数(工作台全校视图聚合)
     * 返回行:{college_id, college_name, class_count, student_count, activated_count}
     */
    public List<Map<String, Object>> collegeStudentStats();
}