解决未处理告警大于一条不报警
This commit is contained in:
parent
e3249abf41
commit
f8a6b7626a
@ -422,7 +422,8 @@ public class SceneContext {
|
||||
// 查询设备告警对应的场景是否有未处理告警
|
||||
if (count > 0) {
|
||||
scene_logger.info("[{}]=====+>只记录日志不发送告警!", requestId);
|
||||
return true;
|
||||
return false;
|
||||
//无视是否存在历史告警全部发送通知
|
||||
} else {
|
||||
scene_logger.info("[{}]=====+>发送告警!", requestId);
|
||||
return false;
|
||||
|
@ -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++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user