feat(system): 新增学生心理评级查询功能
- 添加了 StudentMentalRatingVo 类用于查询结果封装 - 在 StudentMentalRatingMapper 中新增了两个查询方法: - selectLatestByTeacherIdWithConditions:查询辅导员负责的每个学生的最新心理评级记录 - selectLatestAllWithConditions:查询所有学生的最新心理评级记录 - 更新了 WeChatMentalAlertController,添加了新的查询接口 - 优化了查询逻辑,支持条件查询和分页功能
This commit is contained in:
@@ -2,6 +2,7 @@ package com.srs.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.srs.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@@ -11,7 +12,6 @@ import java.util.Date;
|
||||
public class StudentMentalRating extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
private String studentId;
|
||||
private String rating;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.srs.system.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author 宁博
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StudentMentalRatingVo {
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
private String stuNo;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
private String stuName;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 心理评级
|
||||
*/
|
||||
private String rating;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createdTime;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.srs.system.mapper;
|
||||
|
||||
import com.srs.system.domain.StudentMentalRating;
|
||||
import com.srs.system.domain.vo.StudentMentalRatingVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -22,8 +23,26 @@ public interface StudentMentalRatingMapper {
|
||||
*/
|
||||
int updateRatingByStudentId(StudentMentalRating record);
|
||||
|
||||
/** 全部记录 */
|
||||
List<StudentMentalRating> selectAll();
|
||||
/**
|
||||
* 查询辅导员负责的每个学生的最新心理评级记录(带条件查询)
|
||||
* @param teacherId 教师ID
|
||||
* @param stuNo 学号
|
||||
* @param stuName 学生姓名
|
||||
* @return 学生心理评级列表
|
||||
*/
|
||||
List<StudentMentalRatingVo> selectLatestByTeacherIdWithConditions(@Param("teacherId") String teacherId,
|
||||
@Param("stuNo") String stuNo,
|
||||
@Param("stuName") String stuName);
|
||||
|
||||
/**
|
||||
* 查询所有学生的最新心理评级记录(带条件查询)
|
||||
* @param stuNo 学号
|
||||
* @param stuName 学生姓名
|
||||
* @return 学生心理评级列表
|
||||
*/
|
||||
List<StudentMentalRatingVo> selectLatestAllWithConditions(@Param("stuNo") String stuNo,
|
||||
@Param("stuName") String stuName);
|
||||
|
||||
|
||||
/** 单学号全部记录 */
|
||||
List<StudentMentalRating> selectByStuNo(@Param("stuNo") String stuNo);
|
||||
|
||||
Reference in New Issue
Block a user