guoshilong
2023-09-26 c5320fbf7fd671ba7ccefe66e951edeebb4252b2
src/main/java/com/dji/sample/manage/controller/DeviceController.java
@@ -85,6 +85,20 @@
        return ResponseResult.success(devicesList);
    }
    @GetMapping("/{device_sn}/subscribeTopic")
    public ResponseResult<List<DeviceDTO>> testBinding(@PathVariable("device_sn") String deviceSn) {
        deviceService.subscribeTopicOnline(deviceSn);
        return ResponseResult.success();
    }
    @GetMapping("/{device_sn}/unsubscribeTopic")
    public ResponseResult<List<DeviceDTO>> testUnBinding(@PathVariable("device_sn") String deviceSn) {
        deviceService.unsubscribeTopicOffline(deviceSn);
        return ResponseResult.success();
    }
    /**
     * After binding the device to the workspace, the device data can only be seen on the web.
     * @param device