禅道bug#1629修复

This commit is contained in:
gaoqr
2026-06-06 10:43:19 +08:00
parent e1369e7302
commit 8fd38f9ee2
2 changed files with 5 additions and 4 deletions
@@ -14,6 +14,8 @@ import jakarta.annotation.Resource;
import java.util.Map;
import java.util.Objects;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.NOTIFY_TEMPLATE_CLOSED;
/**
* 站内信发送 Service 实现类
*
@@ -39,8 +41,7 @@ public class NotifySendServiceImpl implements NotifySendService {
// 校验模版
NotifyTemplateDO template = validateNotifyTemplate(templateCode);
if (Objects.equals(template.getStatus(), CommonStatusEnum.DISABLE.getStatus())) {
log.info("[sendSingleNotify][模版({})已经关闭,无法给用户({}/{})发送]", templateCode, userId, userType);
return null;
throw new ServiceException(NOTIFY_TEMPLATE_CLOSED);
}
// 校验参数
validateTemplateParams(template, templateParams);
@@ -60,8 +61,7 @@ public class NotifySendServiceImpl implements NotifySendService {
// 校验模版
NotifyTemplateDO template = validateNotifyTemplate(templateCode);
if (Objects.equals(template.getStatus(), CommonStatusEnum.DISABLE.getStatus())) {
log.info("[sendSingleNotify][模版({})已经关闭,无法给用户({}/{})发送]", templateCode, userId, userType);
return null;
throw new ServiceException(NOTIFY_TEMPLATE_CLOSED);
}
// 校验参数
validateTemplateParams(template, templateParams);