| | |
| | | |
| | | boolean isExist = deviceService.checkDeviceOnline(sn); |
| | | if (!isExist) { |
| | | return ResponseResult.error(CommonErrorEnum.DEVICE_OFFLINE.getErrorMsg()); |
| | | return ResponseResult.error(CommonErrorEnum.DEVICE_OFFLINE.getErrorCode(), CommonErrorEnum.DEVICE_OFFLINE.getErrorMsg()); |
| | | } |
| | | String topic = TopicConst.THING_MODEL_PRE + TopicConst.PRODUCT + sn + TopicConst.SERVICES_SUF; |
| | | String bid = UUID.randomUUID().toString(); |
| | |
| | | if(RemoteControlMethodEnum.DEVICE_REBOOT == controlMethodEnum) { |
| | | RedisOpsUtils.del(RedisConst.WEBSOCKET_VIDEO_ADDRESS_PREFIX + sn); |
| | | RedisOpsUtils.del(RedisConst.COVER_STATE_PREFIX + sn); |
| | | DeviceDTO device = (DeviceDTO) RedisOpsUtils.get(RedisConst.DEVICE_ONLINE_PREFIX + sn); |
| | | RedisOpsUtils.del(RedisConst.WEBSOCKET_VIDEO_ADDRESS_PREFIX + device.getChildDeviceSn()); |
| | | } |
| | | |
| | | return ResponseResult.success(); |
| | | } |
| | | |