From eeae9329aace7a60714326c9a3cce3deadbb913d Mon Sep 17 00:00:00 2001
From: zhaowenyu <35589726@qq.com>
Date: Thu, 05 Feb 2026 17:21:34 +0800
Subject: [PATCH] 2026-02-04 优化minio中转接口
---
ard-admin/src/main/java/com/ard/web/controller/sample/media/FileController.java | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/ard-admin/src/main/java/com/ard/web/controller/sample/media/FileController.java b/ard-admin/src/main/java/com/ard/web/controller/sample/media/FileController.java
index e348661..62106be 100644
--- a/ard-admin/src/main/java/com/ard/web/controller/sample/media/FileController.java
+++ b/ard-admin/src/main/java/com/ard/web/controller/sample/media/FileController.java
@@ -5,6 +5,7 @@
import com.ard.sample.media.model.MediaFileDTO;
import com.ard.sample.media.service.IFileService;
import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -29,6 +30,7 @@
* Get information about all the media files in this workspace based on the workspace id.
* @return
*/
+ @ApiOperation("获取所有媒体文件列表")
@GetMapping("/files")
public ResponseResult<PaginationData<MediaFileDTO>> getFilesList(@RequestParam(defaultValue = "1") Long page,
@RequestParam(name = "page_size", defaultValue = "10") Long pageSize) {
@@ -42,6 +44,7 @@
* @param fileId
* @param response
*/
+ @ApiOperation("根据id获取媒体文件地址")
@GetMapping("/file/{file_id}/url")
public void getFileUrl(@PathVariable(name = "file_id") String fileId, HttpServletResponse response) {
@@ -52,4 +55,16 @@
e.printStackTrace();
}
}
+
+ /**
+ * 根据任务id获取全部媒体库文件列表
+ * */
+ @ApiOperation("获取任务中媒体文件列表")
+ @GetMapping("/jobfiles")
+ public ResponseResult<PaginationData<MediaFileDTO>> getJobFiles(@RequestParam(defaultValue = "1") Long page,
+ @RequestParam(name = "page_size", defaultValue = "10") Long pageSize,
+ @RequestParam(name = "job_id") String jobId) {
+ PaginationData<MediaFileDTO> filesList = fileService.getJobFiles(page, pageSize, jobId);
+ return ResponseResult.success(filesList);
+ }
}
--
Gitblit v1.9.3