From 0d9214d780c5093165f566f3e6f0c60f5d8aead7 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 22 五月 2025 11:28:46 +0800
Subject: [PATCH] 视频管理功能

---
 common-api/src/main/java/cn/lili/controller/lmk/LmkFileController.java |   19 ++++++++++---------
 1 files changed, 10 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..501a4ea 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;
@@ -61,10 +62,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 +86,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 +98,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