| | |
| | | public ResponseResult controlDockDebug(String sn, String serviceIdentifier, RemoteDebugParam param) { |
| | | RemoteDebugMethodEnum controlMethodEnum = RemoteDebugMethodEnum.find(serviceIdentifier); |
| | | if (RemoteDebugMethodEnum.UNKNOWN == controlMethodEnum) { |
| | | return ResponseResult.error("The " + serviceIdentifier + " method does not exist."); |
| | | return ResponseResult.error(" 没有找到" + serviceIdentifier + " 这个指令。"); |
| | | } |
| | | |
| | | RemoteDebugHandler data = checkDebugCondition(sn, param, controlMethodEnum); |
| | | |
| | | boolean isExist = deviceRedisService.checkDeviceOnline(sn); |
| | | if (!isExist) { |
| | | return ResponseResult.error("The dock is offline."); |
| | | return ResponseResult.error("设备离线"); |
| | | } |
| | | String bid = UUID.randomUUID().toString(); |
| | | ServiceReply serviceReply = messageSenderService.publishServicesTopic(sn, serviceIdentifier, data, bid); |