|
@@ -231,12 +231,12 @@ public class DeviceMqttConsumerImpl implements DeviceMqttConsumer {
|
|
public void deviceSmsPushMsg(MercDto.Vo merc,DeviceInfo deviceInfo,LocalDateTime createTime,String eventCode) {
|
|
public void deviceSmsPushMsg(MercDto.Vo merc,DeviceInfo deviceInfo,LocalDateTime createTime,String eventCode) {
|
|
|
|
|
|
Long deviceId = deviceInfo.getDeviceId();
|
|
Long deviceId = deviceInfo.getDeviceId();
|
|
- String deviceName = deviceInfo.getDeviceName();
|
|
|
|
- if (StrUtil.isEmpty(deviceName)) {
|
|
|
|
- deviceName = deviceId + "";
|
|
|
|
- } else {
|
|
|
|
- deviceName = deviceName + "(" + deviceId + ")";
|
|
|
|
- }
|
|
|
|
|
|
+// String deviceName = deviceInfo.getDeviceName();
|
|
|
|
+// if (StrUtil.isEmpty(deviceName)) {
|
|
|
|
+// deviceName = deviceId + "";
|
|
|
|
+// } else {
|
|
|
|
+// deviceName = deviceName + "(" + deviceId + ")";
|
|
|
|
+// }
|
|
String exceptionType="";
|
|
String exceptionType="";
|
|
//商家是否订阅
|
|
//商家是否订阅
|
|
if(DeviceErrorRecordTypesEnum.T.getCode().equals(eventCode)) {
|
|
if(DeviceErrorRecordTypesEnum.T.getCode().equals(eventCode)) {
|
|
@@ -272,7 +272,7 @@ public class DeviceMqttConsumerImpl implements DeviceMqttConsumer {
|
|
Long configId = MsgConfigId.SMS_NOTIFY_DEVICE.getId();
|
|
Long configId = MsgConfigId.SMS_NOTIFY_DEVICE.getId();
|
|
String formatDate = LocalDateTimeUtil.format(createTime, DatePattern.NORM_DATETIME_PATTERN);
|
|
String formatDate = LocalDateTimeUtil.format(createTime, DatePattern.NORM_DATETIME_PATTERN);
|
|
Map<String, Object> templateParams = MapUtil.newHashMap();
|
|
Map<String, Object> templateParams = MapUtil.newHashMap();
|
|
- templateParams.put("device_id", deviceName);
|
|
|
|
|
|
+ templateParams.put("device_id", String.valueOf(deviceId));
|
|
templateParams.put("time", formatDate);
|
|
templateParams.put("time", formatDate);
|
|
templateParams.put("exception_type", exceptionType);
|
|
templateParams.put("exception_type", exceptionType);
|
|
log.info("商户设备告警短信通知:{}", JSONUtil.toJsonPrettyStr(templateParams));
|
|
log.info("商户设备告警短信通知:{}", JSONUtil.toJsonPrettyStr(templateParams));
|