From f8a6b7626ab8396fcc28d938128de3fea67f63ad Mon Sep 17 00:00:00 2001 From: 1 <1> Date: Mon, 7 Jul 2025 13:57:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9C=AA=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=E5=A4=A7=E4=BA=8E=E4=B8=80=E6=9D=A1=E4=B8=8D?= =?UTF-8?q?=E6=8A=A5=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fastbee/iot/data/ruleEngine/SceneContext.java | 3 ++- .../core/service/impl/NotifySendServiceImpl.java | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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 4034785..8a4a1d5 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,8 @@ public class SceneContext { // 查询设备告警对应的场景是否有未处理告警 if (count > 0) { scene_logger.info("[{}]=====+>只记录日志不发送告警!", requestId); - 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++) {