diff --git a/src/main/java/neatlogic/module/framework/notify/service/NotifyServiceImpl.java b/src/main/java/neatlogic/module/framework/notify/service/NotifyServiceImpl.java index 53496cc2e86701bd40b59994f495b41b7fe5f25e..0ee73d717c0ae95e60c8e561ab8d906b5e0fabdd 100644 --- a/src/main/java/neatlogic/module/framework/notify/service/NotifyServiceImpl.java +++ b/src/main/java/neatlogic/module/framework/notify/service/NotifyServiceImpl.java @@ -51,8 +51,10 @@ public class NotifyServiceImpl implements NotifyService, INotifyServiceCrossover if (invokeNotifyPolicyConfigVo == null) { invokeNotifyPolicyConfigVo = new InvokeNotifyPolicyConfigVo(); } - String handler = clazz.getName(); - invokeNotifyPolicyConfigVo.setHandler(handler); + if (clazz != null) { + String handler = clazz.getName(); + invokeNotifyPolicyConfigVo.setHandler(handler); + } return doRegulateNotifyPolicyConfig(invokeNotifyPolicyConfigVo); } @@ -61,8 +63,10 @@ public class NotifyServiceImpl implements NotifyService, INotifyServiceCrossover if (invokeNotifyPolicyConfigVo == null) { invokeNotifyPolicyConfigVo = new InvokeNotifyPolicyConfigVo(); } - String handler = clazz.getName(); - invokeNotifyPolicyConfigVo.setHandler(handler); + if (clazz != null) { + String handler = clazz.getName(); + invokeNotifyPolicyConfigVo.setHandler(handler); + } return doRegulateNotifyPolicyConfig(invokeNotifyPolicyConfigVo); } @@ -73,7 +77,9 @@ public class NotifyServiceImpl implements NotifyService, INotifyServiceCrossover notifyPolicyVo = notifyMapper.getNotifyPolicyById(invokeNotifyPolicyConfigVo.getPolicyId()); } } else { - notifyPolicyVo = notifyMapper.getDefaultNotifyPolicyByHandler(invokeNotifyPolicyConfigVo.getHandler()); + if (invokeNotifyPolicyConfigVo.getHandler() != null) { + notifyPolicyVo = notifyMapper.getDefaultNotifyPolicyByHandler(invokeNotifyPolicyConfigVo.getHandler()); + } } if (notifyPolicyVo == null) { invokeNotifyPolicyConfigVo.setPolicyId(null);