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);