From 99207dddd807d1c93d6975554212df5cf137f139 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Fri, 16 Aug 2024 17:13:06 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?= =?UTF-8?q?=E6=8C=87=E6=B4=BE=E5=89=8D=E7=BD=AE=E6=AD=A5=E9=AA=A4=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E9=80=89=E6=B2=A1=E6=9C=89=E5=A4=84=E7=90=86=E4=BA=BA?= =?UTF-8?q?=E7=9A=84=E6=AD=A5=E9=AA=A4=E6=8C=87=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1211578056146944]通知策略梳理每个触发点的收件人,没用的收件人去掉,如激活的处理人 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1211578056146944 --- .../notify/core/INotifyTriggerType.java | 19 ++++++++++++++ .../framework/notify/dto/NotifyTriggerVo.java | 26 +++++++++++++++++++ .../ExceptionNotifyPolicyHandler.java | 9 +------ 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/main/java/neatlogic/framework/notify/core/INotifyTriggerType.java b/src/main/java/neatlogic/framework/notify/core/INotifyTriggerType.java index cea851b43..df60923e6 100644 --- a/src/main/java/neatlogic/framework/notify/core/INotifyTriggerType.java +++ b/src/main/java/neatlogic/framework/notify/core/INotifyTriggerType.java @@ -15,6 +15,9 @@ along with this program. If not, see .*/ package neatlogic.framework.notify.core; +import java.util.ArrayList; +import java.util.List; + public interface INotifyTriggerType { String getTrigger(); @@ -22,4 +25,20 @@ public interface INotifyTriggerType { String getText(); String getDescription(); + + /** + * 触发点额外包含的通知对象选项 + * @return + */ + default List getIncludeList() { + return new ArrayList<>(); + } + + /** + * 触发点额外排除的通知对象选项 + * @return + */ + default List getExcludeList() { + return new ArrayList<>(); + } } diff --git a/src/main/java/neatlogic/framework/notify/dto/NotifyTriggerVo.java b/src/main/java/neatlogic/framework/notify/dto/NotifyTriggerVo.java index 63b79b0e7..06f304a6e 100644 --- a/src/main/java/neatlogic/framework/notify/dto/NotifyTriggerVo.java +++ b/src/main/java/neatlogic/framework/notify/dto/NotifyTriggerVo.java @@ -10,6 +10,8 @@ public class NotifyTriggerVo { private String trigger; private String triggerName; private String description; + private List includeList = new ArrayList<>(); + private List excludeList = new ArrayList<>(); private List notifyList = new ArrayList<>(); public NotifyTriggerVo() {} @@ -24,6 +26,14 @@ public class NotifyTriggerVo { this.trigger = notifyTriggerType.getTrigger(); this.triggerName = notifyTriggerType.getText(); this.description = notifyTriggerType.getDescription(); + List _includeList = notifyTriggerType.getIncludeList(); + if (_includeList != null) { + this.includeList.addAll(_includeList); + } + List _excludeList = notifyTriggerType.getExcludeList(); + if (_excludeList != null) { + this.excludeList.addAll(_excludeList); + } } public String getTrigger() { @@ -61,4 +71,20 @@ public class NotifyTriggerVo { public void clearNotifyList() { this.notifyList.clear(); } + + public List getIncludeList() { + return includeList; + } + + public void setIncludeList(List includeList) { + this.includeList = includeList; + } + + public List getExcludeList() { + return excludeList; + } + + public void setExcludeList(List excludeList) { + this.excludeList = excludeList; + } } diff --git a/src/main/java/neatlogic/module/framework/notify/exception/ExceptionNotifyPolicyHandler.java b/src/main/java/neatlogic/module/framework/notify/exception/ExceptionNotifyPolicyHandler.java index a0d344e6f..54c0de108 100644 --- a/src/main/java/neatlogic/module/framework/notify/exception/ExceptionNotifyPolicyHandler.java +++ b/src/main/java/neatlogic/module/framework/notify/exception/ExceptionNotifyPolicyHandler.java @@ -62,14 +62,7 @@ public class ExceptionNotifyPolicyHandler extends NotifyPolicyHandlerBase { protected List mySystemParamList() { List notifyPolicyParamList = new ArrayList<>(); for (ExceptionNotifyParam param : ExceptionNotifyParam.values()) { - ConditionParamVo paramVo = new ConditionParamVo(); - paramVo.setName(param.getValue()); - paramVo.setLabel(param.getText()); - paramVo.setParamType(param.getParamType().getName()); - paramVo.setParamTypeName(param.getParamType().getText()); - paramVo.setFreemarkerTemplate(param.getFreemarkerTemplate()); - paramVo.setIsEditable(0); - notifyPolicyParamList.add(paramVo); + notifyPolicyParamList.add(createConditionParam(param)); } return notifyPolicyParamList; } -- Gitee