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 @@