Browse Source

修改:微信公众号推送字数限制在20

zhongwei
ty 6 months ago
parent
commit
5e2ab79d97
  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(), 17));
map.put("thing18",getTruncateString(entity.getStationName(), 20));
// map.put("thing5",Optional.ofNullable(entity.getDeviceCode()).orElse("未知设备"));
map.put("thing11",getTruncateString(entity.getAlarmContext(), 17));
map.put("thing11",getTruncateString(entity.getAlarmContext(), 20));
map.put("time2",entity.getAlarmTime());
map.put("thing14", DictCache.getValue("alarm_source", entity.getAlarmSource()));
message.setMap(map);

Loading…
Cancel
Save