From 7a30cfb3531b405542d50ea057e704997a199d73 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期一, 19 五月 2025 23:02:13 +0800
Subject: [PATCH] 2.0.1 用户端接口联调修改
---
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/scheduled/ComplaintTasks.java | 28 +++++++++++++++++++++++-----
1 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/scheduled/ComplaintTasks.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/scheduled/ComplaintTasks.java
index 4f7db17..3f6abaa 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/scheduled/ComplaintTasks.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/scheduled/ComplaintTasks.java
@@ -4,15 +4,11 @@
import com.panzhihua.common.exceptions.ServiceException;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
-import com.panzhihua.common.service.sangeshenbian.SystemUserService;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.sangeshenbian.dao.ComplaintAuditRecordMapper;
import com.panzhihua.sangeshenbian.model.dto.ComplaintTimeout;
-import com.panzhihua.sangeshenbian.model.entity.Complaint;
-import com.panzhihua.sangeshenbian.model.entity.MessageNotification;
-import com.panzhihua.sangeshenbian.model.entity.SystemUser;
-import com.panzhihua.sangeshenbian.model.entity.WorkOrderItemConfig;
+import com.panzhihua.sangeshenbian.model.entity.*;
import com.panzhihua.sangeshenbian.service.*;
import com.panzhihua.sangeshenbian.utils.AliSmsUtil;
import lombok.RequiredArgsConstructor;
@@ -34,6 +30,7 @@
private final ISystemUserService systemUserService;;
private final UserService userService;
private final IMessageNotificationService messageNotificationService;
+ private final IComplaintCommentService complaintCommentService;
/**
* 诉求超时处理(每天凌晨两点执行)
@@ -80,6 +77,27 @@
complaintService.updateBatchById(complaintList);
messageNotificationService.saveBatch(messageNotificationList);
}
+
+
+ /**
+ * 自动完成诉求评价
+ */
+ @Scheduled(cron = "0 1 0 * * ?")
+ public void automaticEvaluation() {
+ // 诉求超时提醒
+ List<Complaint> complaintList = complaintService.getTimeoutAndNotComment();
+ for (Complaint complaint : complaintList) {
+ ComplaintComment complaintComment = new ComplaintComment();
+ complaintComment.setComplaintId(complaint.getId());
+ complaintComment.setRate(2);
+ complaintComment.setContent("满意");
+ complaintComment.setDelFlag(0);
+ complaintCommentService.save(complaintComment);
+ complaint.setCommentRate(2);
+ complaintService.updateById(complaint);
+ }
+ }
+
// 诉求超时处理
private void timeOutHandle(WorkOrderItemConfig config,Integer demandProcessingTime) {
--
Gitblit v1.7.1