|
|
@@ -493,11 +493,14 @@ public class DeviceServiceImpl implements IDeviceService {
|
|
|
|
|
|
boolean isUpd = this.updateDevice(device);
|
|
|
if (!isUpd) {
|
|
|
+ log.info("====更新设备绑定状态失败=========",device);
|
|
|
return false;
|
|
|
}
|
|
|
+ log.info("====更新设备绑定状态成功=========",device);
|
|
|
|
|
|
Optional<DeviceDTO> deviceOpt = deviceRedisService.getDeviceOnline(device.getDeviceSn());
|
|
|
if (deviceOpt.isEmpty()) {
|
|
|
+ log.info("====设备绑定,设备不在线=========",device.getDeviceSn());
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -518,13 +521,14 @@ public class DeviceServiceImpl implements IDeviceService {
|
|
|
gatewaySn = redisDevice.getParentSn();
|
|
|
deviceSn = device.getDeviceSn();
|
|
|
}
|
|
|
-
|
|
|
+ log.info("====更新设备绑定状态,pushDeviceOnlineTopo=========gatewaySn:" + gatewaySn +",deviceSn:" + deviceSn);
|
|
|
pushDeviceOnlineTopo(device.getWorkspaceId(), gatewaySn, deviceSn);
|
|
|
+ log.info("====更新设备绑定状态,subDeviceOnlineSubscribeTopic=========gatewaySn:" + gatewaySn +",deviceSn:" + deviceSn);
|
|
|
subDeviceOnlineSubscribeTopic(SDKManager.getDeviceSDK(gatewaySn));
|
|
|
|
|
|
//添加绑定日志
|
|
|
deviceOprLogsService.addDeviceOprLogsDTO(redisDevice,LogOprTypeEnum.BIND);
|
|
|
-
|
|
|
+ log.info("====更新设备绑定状态,添加日志成功",redisDevice);
|
|
|
return true;
|
|
|
}
|
|
|
|