|
|
@@ -3,6 +3,7 @@ package com.zhongshu.iot.server.core.service.iot;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.github.microservice.dataConfig.IotTtlConfig;
|
|
|
+import com.github.microservice.deviceTopicConfig.IotTopIcConfig;
|
|
|
import com.github.microservice.models.iotDeviceData.IotDeviceDataSimpleModel;
|
|
|
import com.github.microservice.net.ResultContent;
|
|
|
import com.zhongshu.iot.server.core.dao.mqtt.DeviceInfoDao;
|
|
|
@@ -50,7 +51,7 @@ public class IotFreshService {
|
|
|
String iotThingId = messageResult.getIotThingId();
|
|
|
String deviceId = messageResult.getDeviceId();
|
|
|
String messageId = messageResult.getMessageId();
|
|
|
- String topicDevice = String.format("/page/fresh/message/%s", deviceId);
|
|
|
+ String topicDevice = String.format(IotTopIcConfig.mqttMessageUpdateTopIc, deviceId);
|
|
|
|
|
|
JSONObject data = new JSONObject();
|
|
|
data.set("iotThingId", iotThingId);
|
|
|
@@ -86,7 +87,7 @@ public class IotFreshService {
|
|
|
IotMain iotMain = entity.getIotMain();
|
|
|
String iotThingId = iotMain.getIotThingId();
|
|
|
String messageId = entity.getId();
|
|
|
- String topicDevice = String.format("/page/fresh/message/%s", iotThingId);
|
|
|
+ String topicDevice = String.format(IotTopIcConfig.iotPropertyUpdateTopIc, iotThingId);
|
|
|
|
|
|
IotDeviceDataSimpleModel model = iotDeviceDataService.toSimpleModel(entity);
|
|
|
JSONObject data = JSONUtil.parseObj(model);
|