From 25aac02e2bca586833bb05e042cdd71d8fefac2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 17 Dec 2024 17:06:36 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FlwTaskServiceImpl.java | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwTaskServiceImpl.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwTaskServiceImpl.java index 17c2771d4..28cf157a5 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwTaskServiceImpl.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwTaskServiceImpl.java @@ -44,7 +44,6 @@ import org.dromara.workflow.handler.WorkflowPermissionHandler; import org.dromara.workflow.mapper.FlwTaskMapper; import org.dromara.workflow.service.IFlwTaskService; import org.dromara.workflow.utils.WorkflowUtils; -import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -156,7 +155,7 @@ public class FlwTaskServiceImpl implements IFlwTaskService { Instance instance = taskService.skip(taskId, flowParams); this.setHandler(instance, flowTask, flowCopyList); // 消息通知 - sendMessage(definition.getFlowName(), ins.getId(), messageType, notice); + WorkflowUtils.sendMessage(definition.getFlowName(), ins.getId(), messageType, notice); return true; } catch (Exception e) { log.error(e.getMessage(), e); @@ -175,7 +174,7 @@ public class FlwTaskServiceImpl implements IFlwTaskService { if (ObjectUtil.isNull(instance)) { return; } - //添加抄送人 + // 添加抄送人 this.setCopy(task, flowCopyList); // 根据流程实例ID查询所有关联的任务 List flowTasks = this.selectByInstId(instance.getId()); @@ -204,7 +203,6 @@ public class FlwTaskServiceImpl implements IFlwTaskService { * @param task 任务信息 * @param flowCopyList 抄送人 */ - @Async public void setCopy(FlowTask task, List flowCopyList) { if (CollUtil.isEmpty(flowCopyList)) { return; @@ -399,8 +397,8 @@ public class FlwTaskServiceImpl implements IFlwTaskService { } } this.setHandler(instance, task, null); - //消息通知 - sendMessage(definition.getFlowName(), instance.getId(), messageType, notice); + // 消息通知 + WorkflowUtils.sendMessage(definition.getFlowName(), instance.getId(), messageType, notice); return true; } catch (Exception e) { log.error(e.getMessage(), e); @@ -408,18 +406,6 @@ public class FlwTaskServiceImpl implements IFlwTaskService { } } - /** - * 发送消息 - * - * @param flowName 流程定义名称 - * @param messageType 消息类型 - * @param notice 消息内容,为空则发送默认配置的消息内容 - */ - @Async - public void sendMessage(String flowName, Long instId, List messageType, String notice) { - WorkflowUtils.sendMessage(flowName, instId, messageType, notice); - } - /** * 获取可驳回节点 *