rain
2024-07-04 82e4e5f6129be2e691138cd8b8ea3262e64943af
src/main/java/com/dji/sample/media/controller/FileController.java
@@ -73,6 +73,22 @@
        return ResponseResult.success(fileService.listMediaFileEntity(workspaceId, jobId));
    }
    @GetMapping("dataShow/{workspace_id}")
    public ResponseResult getMeidaData(@PathVariable(name = "workspace_id") String workspaceId,
                                       @RequestParam Integer page,
                                       @RequestParam(name = "page_size", defaultValue = "10") Integer pageSize,
                                       @RequestParam(name = "photoStart", required = false) Long updateStart,
                                       @RequestParam(name = "photoEnd", required = false) Long updateEnd,
                                       @RequestParam(name = "updateStart", required = false) Long photoStart,
                                       @RequestParam(name = "updateEnd", required = false) Long photoEnd,
                                       @RequestParam(name = "jobName", required = false) String jobName,
                                       @RequestParam( required = false) String type
    ) {
        return ResponseResult.success(fileService.MediaQuery(page, pageSize, updateStart, updateEnd, photoStart, photoEnd, jobName,workspaceId,type));
    }
    @PostMapping("/{workspace_id}/updateFile")
    public ResponseResult updateFile(HttpServletRequest request, @PathVariable(name = "workspace_id") String workspaceId, @RequestBody MediaFileEntity mediaFileEntity) {
        CustomClaim claims = (CustomClaim) request.getAttribute(TOKEN_CLAIM);
@@ -82,6 +98,7 @@
    @DeleteMapping("/{workspace_id}/deleteFile")
    public ResponseResult deleteFile(@PathVariable(name = "workspace_id") String workspaceId, @RequestParam String fileId) {
        //根据fileId删除图片
        int count = fileService.deleteMedia(workspaceId, fileId);
        if (count == 0) {
            return ResponseResult.error("删除失败");
@@ -108,9 +125,5 @@
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    @PostMapping("/{workspace_id}/mark")
    public void eaveMarkFile(@PathVariable(name = "workspace_id") String workspaceId,@RequestBody FileUploadDTO file) throws ImageProcessingException, IOException, FontFormatException {
        fileService.saveMarkFile(workspaceId,file);
    }
}