新增加Dify相关接口WeChatMentalAlertController用于接收信息调用企业微信发送消息给铺导员,新增加对有心理问题学生的数据库表存储student_mental_rating,新增加对student_mental_rating表的所有查询和学号精准查询
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
package com.srs.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.srs.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 学生心理问题评级表 知无涯
|
||||
*/
|
||||
public class StudentMentalRating extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
private String studentId;
|
||||
private String rating;
|
||||
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getStudentId() {
|
||||
return studentId;
|
||||
}
|
||||
|
||||
public void setStudentId(String studentId) {
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public String getRating() {
|
||||
return rating;
|
||||
}
|
||||
|
||||
public void setRating(String rating) {
|
||||
this.rating = rating;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createdTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updatedTime;
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
package com.srs.system.mapper;
|
||||
|
||||
import com.srs.system.domain.StudentMentalRating;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface StudentMentalRatingMapper {
|
||||
|
||||
/**
|
||||
* 按学号查询 知无涯
|
||||
*/
|
||||
StudentMentalRating selectByStudentId(String studentId);
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*/
|
||||
int insert(StudentMentalRating record);
|
||||
|
||||
/**
|
||||
* 按学号更新评级
|
||||
*/
|
||||
int updateRatingByStudentId(StudentMentalRating record);
|
||||
|
||||
/** 全部记录 */
|
||||
List<StudentMentalRating> selectAll();
|
||||
|
||||
/** 单学号全部记录 */
|
||||
List<StudentMentalRating> selectByStuNo(@Param("stuNo") String stuNo);
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.srs.system.mapper.StudentMentalRatingMapper">
|
||||
<!-- 添加 知无涯-->
|
||||
<select id="selectByStudentId" resultType="com.srs.system.domain.StudentMentalRating">
|
||||
SELECT id, student_id, rating, created_time, updated_time
|
||||
FROM student_mental_rating
|
||||
WHERE student_id = #{studentId}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.srs.system.domain.StudentMentalRating"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO student_mental_rating(student_id, rating)
|
||||
VALUES (#{studentId}, #{rating})
|
||||
</insert>
|
||||
|
||||
<update id="updateRatingByStudentId" parameterType="com.srs.system.domain.StudentMentalRating">
|
||||
UPDATE student_mental_rating
|
||||
SET rating = #{rating}
|
||||
WHERE student_id = #{studentId}
|
||||
</update>
|
||||
|
||||
<!-- 心理查询全部:知无涯 -->
|
||||
<select id="selectAll" resultType="com.srs.system.domain.StudentMentalRating">
|
||||
SELECT id,
|
||||
student_id AS studentId,
|
||||
rating,
|
||||
created_time AS createdTime,
|
||||
updated_time AS updatedTime
|
||||
FROM student_mental_rating
|
||||
ORDER BY created_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据学号查询心理:知无涯 -->
|
||||
<select id="selectByStuNo" resultType="com.srs.system.domain.StudentMentalRating">
|
||||
SELECT id,
|
||||
student_id AS studentId,
|
||||
rating,
|
||||
created_time AS createdTime,
|
||||
updated_time AS updatedTime
|
||||
FROM student_mental_rating
|
||||
WHERE student_id = #{stuNo}
|
||||
ORDER BY created_time DESC
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user