guoshilong
2023-09-22 16fed342914874759626ac5dcbcb3b69abce5a76
src/main/java/com/dji/sample/manage/controller/LiveStreamController.java
@@ -48,15 +48,16 @@
    /**
     * Get live capability data of all drones in the current user's workspace from the database.
     * @param request
     * 从数据库中获取当前工作区中所有无人机的实时性能数据。
     * @param workspaceId
     * @return  live capability
     */
    @GetMapping("/capacity")
    public ResponseResult<List<CapacityDeviceDTO>> getLiveCapacity(HttpServletRequest request) {
        // Get information about the current user.
        CustomClaim customClaim = (CustomClaim)request.getAttribute(TOKEN_CLAIM);
    @GetMapping("/capacity/{workspace_id}")
    public ResponseResult<List<CapacityDeviceDTO>> getLiveCapacity(@PathVariable("workspace_id") String workspaceId) {
        // Get information about the current user. 获取当前登录用户的信息
//        CustomClaim customClaim = (CustomClaim)request.getAttribute(TOKEN_CLAIM);
        List<CapacityDeviceDTO> liveCapacity = liveStreamService.getLiveCapacity(customClaim.getWorkspaceId());
        List<CapacityDeviceDTO> liveCapacity = liveStreamService.getLiveCapacity(workspaceId);
        return ResponseResult.success(liveCapacity);
    }
@@ -96,4 +97,4 @@
        return liveStreamService.liveLensChange(liveParam);
    }
}
}