aix
2024-07-09 2aaaaf4598b869085ae35871de018cd35847c232
src/main/java/com/dji/sample/manage/controller/DeviceController.java
@@ -79,25 +79,25 @@
     * @return
     */
    @GetMapping("/{workspace_id}/devices")
    public ResponseResult<List<DeviceDTO>> getDevices(@PathVariable("workspace_id") String workspaceId) {
        List<DeviceDTO> devicesList = deviceService.getDevicesTopoForWeb(workspaceId);
    public ResponseResult<List<DeviceDTO>> getDevices(@PathVariable("workspace_id") String workspaceId,String reserveId) {
        List<DeviceDTO> devicesList = deviceService.getDevicesTopoForWeb(workspaceId,reserveId);
        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();
    }
//    @GetMapping("/{device_sn}/subscribeTopic2")
//    public ResponseResult<List<DeviceDTO>> testBinding(@PathVariable("device_sn") String deviceSn) {
//        deviceService.subscribeTopicOnline(deviceSn);
//
//        return ResponseResult.success();
//    }
//
//    @GetMapping("/{device_sn}/unsubscribeTopic2")
//    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.