xieb
2023-09-26 faedd5d2f0ee850464f0507da93c37459bd5e3bb
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
@@ -120,7 +134,7 @@
     */
    @GetMapping("/{workspace_id}/devices/bound")
    public ResponseResult<PaginationData<DeviceDTO>> getBoundDevicesWithDomain(
            @PathVariable("workspace_id") String workspaceId, String domain,
            @PathVariable("workspace_id") String workspaceId, Integer domain,
            @RequestParam(defaultValue = "1") Long page,
            @RequestParam(value = "page_size", defaultValue = "50") Long pageSize) {
        PaginationData<DeviceDTO> devices = deviceService.getBoundDevicesWithDomain(workspaceId, page, pageSize, domain);