diff --git a/fastbee-iot-data/src/main/java/com/fastbee/iot/data/ruleEngine/SceneContext.java b/fastbee-iot-data/src/main/java/com/fastbee/iot/data/ruleEngine/SceneContext.java index 5f19352..ecdf0d7 100644 --- a/fastbee-iot-data/src/main/java/com/fastbee/iot/data/ruleEngine/SceneContext.java +++ b/fastbee-iot-data/src/main/java/com/fastbee/iot/data/ruleEngine/SceneContext.java @@ -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; diff --git a/fastbee-notify/fastbee-notify-core/src/main/java/com/fastbee/notify/core/service/impl/NotifySendServiceImpl.java b/fastbee-notify/fastbee-notify-core/src/main/java/com/fastbee/notify/core/service/impl/NotifySendServiceImpl.java index 52e1852..e60b758 100644 --- a/fastbee-notify/fastbee-notify-core/src/main/java/com/fastbee/notify/core/service/impl/NotifySendServiceImpl.java +++ b/fastbee-notify/fastbee-notify-core/src/main/java/com/fastbee/notify/core/service/impl/NotifySendServiceImpl.java @@ -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++) {