| | |
| | | Set<String> allKeys = dynamicTask.getAllKeys(); |
| | | for (String key : allKeys) { |
| | | if (key.startsWith(deviceId)) { |
| | | Runnable runnable = dynamicTask.get(key); |
| | | if (runnable instanceof ISubscribeTask) { |
| | | ISubscribeTask subscribeTask = (ISubscribeTask) runnable; |
| | | subscribeTask.stop(); |
| | | } |
| | | dynamicTask.stop(key); |
| | | } |
| | | } |
| | |
| | | public ResponseEntity<WVPResult<String>> updateDevice(Device device){ |
| | | |
| | | if (device != null && device.getDeviceId() != null) { |
| | | |
| | | |
| | | // TODO 报警订阅相关的信息 |
| | | |
| | | deviceService.updateDevice(device); |
| | | // cmder.deviceInfoQuery(device); |
| | | } |
| | | WVPResult<String> result = new WVPResult<>(); |
| | | result.setCode(0); |