一级风险才发送辅导员信息,并且发送对话消息新增一个参数
This commit is contained in:
@@ -200,6 +200,11 @@ public class AiChatController extends BaseController {
|
|||||||
inputs.put("user_role", userRole);
|
inputs.put("user_role", userRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Object userPlatform = requestData.get("user_platform");
|
||||||
|
if (userPlatform != null) {
|
||||||
|
inputs.put("user_platform", userPlatform);
|
||||||
|
}
|
||||||
|
|
||||||
bodyMap.put("inputs", inputs);
|
bodyMap.put("inputs", inputs);
|
||||||
|
|
||||||
// 自动为对话生成名称
|
// 自动为对话生成名称
|
||||||
|
|||||||
@@ -73,6 +73,11 @@ public class WeChatMentalAlertController extends BaseController {
|
|||||||
record.setRating(request.getRating());
|
record.setRating(request.getRating());
|
||||||
studentMentalRatingMapper.insert(record);
|
studentMentalRatingMapper.insert(record);
|
||||||
|
|
||||||
|
// 只有评级为"一级风险"时才发送企业微信通知 陈冠元
|
||||||
|
if (!"一级风险".equals(request.getRating())) {
|
||||||
|
return AjaxResult.success("预警已记录,因评级非一级风险未发送通知");
|
||||||
|
}
|
||||||
|
|
||||||
// === 判断是否超过当日发送上限(3次)=== 陈冠元
|
// === 判断是否超过当日发送上限(3次)=== 陈冠元
|
||||||
if (todayCount > 3) {
|
if (todayCount > 3) {
|
||||||
return AjaxResult.success("预警已记录,因当日已达上限未发送通知");
|
return AjaxResult.success("预警已记录,因当日已达上限未发送通知");
|
||||||
@@ -97,7 +102,7 @@ public class WeChatMentalAlertController extends BaseController {
|
|||||||
? teacher.getNickName()
|
? teacher.getNickName()
|
||||||
: teacher.getUserName();
|
: teacher.getUserName();
|
||||||
return String.format(
|
return String.format(
|
||||||
"【心理预警通知】\n" +
|
"【智水AI心理预警通知】\n" +
|
||||||
"辅导员:%s(%s)\n" +
|
"辅导员:%s(%s)\n" +
|
||||||
"学生姓名:%s\n" +
|
"学生姓名:%s\n" +
|
||||||
"学号:%s\n" +
|
"学号:%s\n" +
|
||||||
|
|||||||
Reference in New Issue
Block a user