From 0c9521d93a745de0ec71d83c094a6047c0222398 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期三, 29 十月 2025 15:01:51 +0800
Subject: [PATCH] 调整
---
common-api/src/main/java/cn/lili/controller/lmk/LmkFileController.java | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/common-api/src/main/java/cn/lili/controller/lmk/LmkFileController.java b/common-api/src/main/java/cn/lili/controller/lmk/LmkFileController.java
index 5dc9c51..1ab33ec 100644
--- a/common-api/src/main/java/cn/lili/controller/lmk/LmkFileController.java
+++ b/common-api/src/main/java/cn/lili/controller/lmk/LmkFileController.java
@@ -1,6 +1,7 @@
package cn.lili.controller.lmk;
import cn.lili.base.Result;
+import cn.lili.modules.lmk.domain.form.FileKey;
import cn.lili.modules.lmk.service.LmkFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -42,6 +43,11 @@
return lmkFileService.uploadObject(file);
}
+ @GetMapping("/generateVideoCoverUrl/{id}")
+ public Result generateVideoCoverUrl(@PathVariable("id") String videoId){
+ return lmkFileService.generateVideoCoverUrl(videoId,null,null,null);
+ }
+
/**
* 澶氭枃浠朵笂浼�
@@ -61,10 +67,10 @@
* @param fileKey oss鏂囦欢鍚�
* @return
*/
- @Delete("/delete/{file_key}")
+ @Delete("/delete}")
@ApiOperation(value = "鍒犻櫎鏌愪釜鏂囦欢")
- public Result deleteObject(@PathVariable(value = "file_key") String fileKey) {
- return lmkFileService.deleteObject(fileKey);
+ public Result deleteObject(@RequestBody FileKey fileKey) {
+ return lmkFileService.deleteObject(fileKey.getFileKey());
}
/**
@@ -85,10 +91,10 @@
* @param fileKey
* @return
*/
- @GetMapping("/download/{file_key}")
+ @PostMapping("/download")
@ApiOperation(value = "涓嬭浇鏂囦欢")
- public void downloadFile(@PathVariable(value = "file_key") String fileKey, HttpServletResponse response) {
- lmkFileService.downloadObject(fileKey, response);
+ public void downloadFile(@RequestBody FileKey fileKey, HttpServletResponse response) {
+ lmkFileService.downloadObject(fileKey.getFileKey(), response);
}
/**
@@ -97,10 +103,10 @@
* @param fileKey
* @return
*/
- @GetMapping("/preview/{file_key}")
+ @PostMapping("/preview")
@ApiOperation(value = "鑾峰彇鏂囦欢棰勮url(閾炬帴瀛樺湪鏃舵晥)")
- public Result getPreviewUrl(@PathVariable(value = "file_key") String fileKey) {
- return Result.ok().data(lmkFileService.getPreviewUrl(fileKey));
+ public Result getPreviewUrl(@RequestBody FileKey fileKey) {
+ return Result.ok().data(lmkFileService.getPreviewUrl(fileKey.getFileKey()));
}
--
Gitblit v1.8.0