| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/{workspace_id}/files") |
| | | public ResponseResult<PaginationData<MediaFileDTO>> getFilesList(@RequestParam(defaultValue = "1") Long page, |
| | | public ResponseResult<PaginationData<MediaFileEntity>> getFilesList(@RequestParam(defaultValue = "1") Long page, |
| | | @RequestParam(name = "page_size", defaultValue = "10") Long pageSize, |
| | | @PathVariable(name = "workspace_id") String workspaceId, |
| | | MediaFileQueryParam mediaFileQueryParam) { |
| | | PaginationData<MediaFileDTO> filesList = fileService.getMediaFilesPaginationByWorkspaceId(workspaceId, page, pageSize,mediaFileQueryParam); |
| | | PaginationData<MediaFileEntity> filesList = fileService.getMediaFilesPaginationByWorkspaceId(workspaceId, page, pageSize,mediaFileQueryParam); |
| | | return ResponseResult.success(filesList); |
| | | } |
| | | |
| | |
| | | mediaFileEntity.setUserId(claims.getId()); |
| | | return ResponseResult.success(fileService.updateMediaFile(workspaceId, mediaFileEntity)); |
| | | } |
| | | @DeleteMapping("/{workspace_id}/deleteFile") |
| | | |
| | | public ResponseResult deleteFile(@PathVariable(name = "workspace_id") String workspaceId, @RequestParam String fileId) { |
| | | int count=fileService.deleteMedia(workspaceId, fileId); |
| | | if(count==0){ |
| | | return ResponseResult.error("删除失败"); |
| | | } |
| | | return ResponseResult.success(); |
| | | } |
| | | |
| | | |
| | | /** |