From 91b37cfe523f883c8e35b6838222bb8351e70364 Mon Sep 17 00:00:00 2001 From: xiaohuo <14141624+dsgfhrh@user.noreply.gitee.com> Date: Tue, 11 Nov 2025 23:07:21 +0800 Subject: [PATCH] =?UTF-8?q?11.11=E4=B8=8B=E8=BD=BD=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/LlmKnowledgeController/FileController.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/LlmKnowledgeController/FileController.java b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/LlmKnowledgeController/FileController.java index 8888feae..422d66b6 100644 --- a/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/LlmKnowledgeController/FileController.java +++ b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/LlmKnowledgeController/FileController.java @@ -7,11 +7,14 @@ import javax.servlet.http.HttpServletResponse; import com.alops.chat.entity.UploadedFile; import com.alops.chat.service.UploadedFileService; +import com.alops.common.annotation.Log; import com.alops.common.config.RuoYiConfig; import com.alops.common.core.controller.BaseController; +import com.alops.common.enums.BusinessType; import com.alops.common.utils.file.FileUtils; import com.alops.common.utils.file.FileTypeUtils; import com.alops.common.utils.StringUtils; +import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -46,6 +49,8 @@ public class FileController extends BaseController { */ @PreAuthorize("@ss.hasPermi('QandA:knowledge:filedownload')") @GetMapping("/download/{fileId}") + @Log(title = "下载文件", businessType = BusinessType.EXPORT) + @ApiOperation("下载文件") public void download(@PathVariable Long fileId, HttpServletResponse response, HttpServletRequest request) { try { UploadedFile uploadedFile = uploadedFileService.findById(fileId); @@ -107,6 +112,8 @@ public class FileController extends BaseController { */ @PreAuthorize("@ss.hasPermi('QandA:knowledge:filepreview')") @GetMapping("/preview/{fileId}") + @ApiOperation("预览文件") + @Log(title = "预览文件", businessType = BusinessType.SELECT) public void preview(@PathVariable Long fileId, HttpServletResponse response, HttpServletRequest request) { try { UploadedFile uploadedFile = uploadedFileService.findById(fileId);