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();
|
}
|