小程序告警信息推送部分

This commit is contained in:
1 2025-07-08 10:19:57 +08:00
parent f22ab0c333
commit 388ca0ae5d
2 changed files with 13 additions and 1 deletions

View File

@ -422,7 +422,9 @@ public class SceneContext {
// 查询设备告警对应的场景是否有未处理告警
if (count > 0) {
scene_logger.info("[{}]=====+>只记录日志不发送告警!", requestId);
return true;
// return true;
return false;
//无视是否存在历史告警全部发送通知
} else {
scene_logger.info("[{}]=====+>发送告警!", requestId);
return false;

View File

@ -154,6 +154,16 @@ public class NotifySendServiceImpl implements NotifySendService {
case SMS:
case EMAIL:
case WECHAT:
for (int i = 0; i < variables.size(); i++) {
if (i == 0) {
map.put(variables.get(i), alertPushParams.getAlertName());
} else if (i == 1) {
map.put(variables.get(i), alertPushParams.getDeviceName());
} else if (i == 2) {
map.put(variables.get(i), alertPushParams.getSerialNumber());
}
}
break;
case DING_TALK:
// 按顺序依次替换变量信息
for (int i = 0; i < variables.size(); i++) {