소스 검색

设备故障消息推送 log

谭斌 2 년 전
부모
커밋
f51c0ff4a3
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      device-api-service/src/main/java/com/xy/consumer/device/push/msg/DevicePushMsgConsumer.java

+ 2 - 1
device-api-service/src/main/java/com/xy/consumer/device/push/msg/DevicePushMsgConsumer.java

@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.date.DatePattern;
 import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.map.MapUtil;
 import cn.hutool.json.JSONUtil;
 import com.xy.consumer.MqttConsumer;
 import com.xy.dto.MsgConfigTestDto;
@@ -52,7 +53,7 @@ public class DevicePushMsgConsumer implements MqttConsumer {
                     String channelType = b.getChannelType();
                     if (Integer.valueOf(channelType).intValue() == ChannelType.OFFICIAL_ACCOUNT.getCode().intValue()) {
                         //微信公众号
-                        Map<String, Object> params = b.getTemplateParams();
+                        Map<String, Object> params = MapUtil.newHashMap();
                         params.put("device", deviceId);
                         params.put("type", msg);
                         params.put("time", DateUtil.format(createTime, DatePattern.NORM_DATETIME_PATTERN));