|
@@ -67,6 +67,9 @@ public class ApiDeviceServiceImpl {
|
|
|
ThreadPoolUtils.Execute execute = ThreadPoolUtils.excPoll(DeviceThreadPoolConfig.ALIPAY_DEVICE_DETAIL, deviceStatuses.size());
|
|
|
deviceStatuses.forEach(deviceStatus -> execute.execute(() -> {
|
|
|
DeviceDetailVO deviceDetailVO = alipayDeviceService.queryDetail(new DeviceDetailDTO().setTerminalId(String.valueOf(deviceStatus.getDeviceId())));
|
|
|
+ if (deviceDetailVO == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
//修改设备为在线
|
|
|
if (deviceDetailVO.getOnline()) {
|
|
|
JSONObject jsonObject = new JSONObject().set("clientid", deviceStatus.getDeviceId());
|
|
@@ -83,6 +86,9 @@ public class ApiDeviceServiceImpl {
|
|
|
ThreadPoolUtils.Execute execute = ThreadPoolUtils.excPoll(DeviceThreadPoolConfig.ALIPAY_DEVICE_DETAIL, deviceIds.size());
|
|
|
deviceIds.forEach(deviceId -> execute.execute(() -> {
|
|
|
DeviceDetailVO deviceDetailVO = alipayDeviceService.queryDetail(new DeviceDetailDTO().setTerminalId(String.valueOf(deviceId)));
|
|
|
+ if (deviceDetailVO == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
JSONObject jsonObject = new JSONObject().set("clientid", deviceId);
|
|
|
if (deviceDetailVO.getOnline()) {
|
|
|
connectedProducer.sendToMqtt(jsonObject.toString(), ConnectedMqttConfiguration.TOPIC, 1);
|
|
@@ -95,5 +101,4 @@ public class ApiDeviceServiceImpl {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
}
|