feat(core):添加应用状态变更通知开关

yun-zuoyi
汪云昊 4 years ago
parent a0ef9bc225
commit 296c2870e9

@ -29,6 +29,8 @@ import org.springframework.context.annotation.Configuration;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import static cn.estsh.i3plus.platform.common.util.CommonConstWords.CONFIG_APP_STATE_CHANGE_NOTICE;
/** /**
* @Description : * @Description :
* @Reference : * @Reference :
@ -119,7 +121,16 @@ public class MessageMailQueueReceiver {
// 判断收件人类型 // 判断收件人类型
if (msg.getMessageReceiverType() != null) { if (msg.getMessageReceiverType() != null) {
if (msg.getMessageReceiverType() == ImppEnumUtil.MESSAGE_RECEIVER_TYPE.EXTERNAL.getValue()) { if (msg.getMessageReceiverType() == ImppEnumUtil.MESSAGE_RECEIVER_TYPE.URGENT.getValue()
&& RedisCacheTool.getSysConfigBooleanVal(CONFIG_APP_STATE_CHANGE_NOTICE)) {
// 判断是否为系统紧急提示 微服注册状态提示
mailUtil.setTo(RedisCacheTool.getSysConfigStrVal(PlatformConstWords.CONTACT_MAIL));
try {
mailUtil.send();
} catch (Exception e) {
saveSendErrorMsg(msg, RedisCacheTool.getSysConfigStrVal(PlatformConstWords.CONTACT_MAIL), e);
}
} else if (msg.getMessageReceiverType() == ImppEnumUtil.MESSAGE_RECEIVER_TYPE.EXTERNAL.getValue()) {
//判断是否为外部邮件 //判断是否为外部邮件
mailUtil.setTo(StringUtils.split(msg.getMessageReceiversNameRdd(), ",")); mailUtil.setTo(StringUtils.split(msg.getMessageReceiversNameRdd(), ","));
try { try {

Loading…
Cancel
Save