From d56d2aa99b090ea93650c2d5f47ada34e663693c Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 9 Dec 2022 09:35:56 +0800 Subject: [PATCH] fix 557 --- .../listener/InitiatorDataEntryListener.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/common/listener/InitiatorDataEntryListener.java b/renren-admin/src/main/java/io/renren/common/listener/InitiatorDataEntryListener.java index 4c5d6dd8..4c9d1dd0 100644 --- a/renren-admin/src/main/java/io/renren/common/listener/InitiatorDataEntryListener.java +++ b/renren-admin/src/main/java/io/renren/common/listener/InitiatorDataEntryListener.java @@ -75,15 +75,35 @@ public class InitiatorDataEntryListener implements TaskListener { } else if (kv.containsKey("userId")) { creator = kv.get("userId").toString(); } + Integer type = 10; + String flowType = kv.getOrDefault("flowType", "").toString(); + switch (flowType) { + case "能力申请": + type = 0; + break; + case "能力需求申请": + type = 6; + break; + case "评论审核": + type = 8; + break; + case "资源上架": + type = 2; + break; + case "资源下架": + type = 4; + break; + } try { String result = "被驳回"; String finalCreator = creator; String finalResult = result; + Integer finalType = type; CompletableFuture.runAsync(() -> { // 发起人 SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator)); String content = "【通知】" + userDTO.getRealName() + ",您发起的流程 " + kv.getOrDefault("flowType", "") + finalResult; SysNoticeDTO dto = new SysNoticeDTO(); - dto.setType(2); + dto.setType(finalType); dto.setTitle("流程节点系统通知"); dto.setContent(content); // 通知内容 dto.setReceiverType(1);