|
@@ -2,6 +2,7 @@ package com.xy.alipay;
|
|
|
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import com.xy.constants.SpiResponseConst;
|
|
|
+import com.xy.consumer.connected.ConnectedMqttConfiguration;
|
|
|
import com.xy.consumer.connected.ConnectedProducer;
|
|
|
import com.xy.consumer.disconnect.DisconnectedMqttConfiguration;
|
|
|
import com.xy.consumer.disconnect.DisconnectedProducer;
|
|
@@ -113,7 +114,7 @@ public class SpiDeviceServiceImpl implements SpiDeviceService {
|
|
|
JSONObject jsonObject = new JSONObject().set("clientid", deviceInfo.getDeviceId());
|
|
|
if (online) {
|
|
|
//在线
|
|
|
- connectedProducer.sendToMqtt(jsonObject.toString(), DisconnectedMqttConfiguration.TOPIC, 1);
|
|
|
+ connectedProducer.sendToMqtt(jsonObject.toString(), ConnectedMqttConfiguration.TOPIC, 1);
|
|
|
} else {
|
|
|
//离线
|
|
|
disconnectedProducer.sendToMqtt(jsonObject.toString(), DisconnectedMqttConfiguration.TOPIC, 1);
|