From 38f1a806a4e1d8e1560f07a5a26b51cf6a4692be Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期一, 17 三月 2025 10:57:57 +0800 Subject: [PATCH] 党员管理接口调试修改 --- springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/scheduled/ComplaintTasks.java | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 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..486c621 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 @@ -9,10 +9,7 @@ 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 +31,7 @@ private final ISystemUserService systemUserService;; private final UserService userService; private final IMessageNotificationService messageNotificationService; + private final IComplaintCommentService complaintCommentService; /** * 诉求超时处理(每天凌晨两点执行) @@ -80,6 +78,25 @@ 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); + } + } + // 诉求超时处理 private void timeOutHandle(WorkOrderItemConfig config,Integer demandProcessingTime) { -- Gitblit v1.7.1