From 532909b873e011238469e4d1129364bd1d0b328a Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Wed, 20 Mar 2024 11:25:43 +0800 Subject: [PATCH] =?UTF-8?q?#=E9=AB=98=E6=96=AF=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=85=BC=E5=AE=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java | 4 ++-- .../com/hnac/hzims/operational/config/mapper/FocusAttributeMapper.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java index a10d7d4..8ef2624 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java @@ -120,7 +120,7 @@ public class MessageServiceImpl implements MessageService { .createUser(CommonConstant.SYSTEM_USER) .params(new HashMap(){{ put("projectName",entity.getStationName()); - put("deviceName", Optional.ofNullable(entity.getDeviceName()).orElse("")); + put("deviceName", Optional.ofNullable(entity.getDeviceName()).orElse("未知设备")); put("ruleDefName",entity.getAlarmContext()); put("ts", DateUtil.format(entity.getAlarmTime(),DateUtil.PATTERN_DATETIME)); }}) @@ -162,7 +162,7 @@ public class MessageServiceImpl implements MessageService { // 微信参数键值对 HashMap map = new HashMap<>(); map.put("thing18",entity.getStationName()); - map.put("thing5",entity.getDeviceCode()); + map.put("thing5",Optional.ofNullable(entity.getDeviceCode()).orElse("未知设备")); map.put("thing11",entity.getAlarmContext()); map.put("thing14", DictCache.getValue("alarm_source", entity.getAlarmType())); map.put("time2",entity.getAlarmTime()); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/FocusAttributeMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/FocusAttributeMapper.xml index 729b5a6..b211040 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/FocusAttributeMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/FocusAttributeMapper.xml @@ -2,7 +2,7 @@