Browse Source

修正:微信公众号限制长度为20

zhongwei
ty 8 months ago
parent
commit
a580ba4ddc
  1. 4
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java

4
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java

@ -203,9 +203,9 @@ public class MessageServiceImpl implements MessageService {
message.setTaskId(entity.getId());
// 微信参数键值对
HashMap<String,Object> map = new HashMap<>();
map.put("thing18",getTruncateString(entity.getStationName(), 29));
map.put("thing18",getTruncateString(entity.getStationName(), 17));
// map.put("thing5",Optional.ofNullable(entity.getDeviceCode()).orElse("未知设备"));
map.put("thing11",getTruncateString(entity.getAlarmContext(), 29));
map.put("thing11",getTruncateString(entity.getAlarmContext(), 17));
map.put("time2",entity.getAlarmTime());
map.put("thing14", DictCache.getValue("alarm_source", entity.getAlarmSource()));
message.setMap(map);

Loading…
Cancel
Save