From 7bc78d8f70a4d11e46f8bd640228804a3dd0dc68 Mon Sep 17 00:00:00 2001 From: kongdeqiang <123456> Date: 星期一, 22 四月 2024 10:52:29 +0800 Subject: [PATCH] Merge branch 'master2' --- src/main/java/com/boying/controller/FileInfo2Controller.java | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/boying/controller/FileInfo2Controller.java b/src/main/java/com/boying/controller/FileInfo2Controller.java index 1fceedb..17c56b6 100644 --- a/src/main/java/com/boying/controller/FileInfo2Controller.java +++ b/src/main/java/com/boying/controller/FileInfo2Controller.java @@ -3,6 +3,8 @@ import com.boying.entity.FileInfo; import com.boying.service.FileInfoService; import io.lettuce.core.dynamic.annotation.Param; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -14,6 +16,7 @@ @RestController @RequestMapping("ffzf/fileInfo") @RequiredArgsConstructor +@Tag(description = "ffzf/fileInfo" , name = "鏂囦欢涓婁紶鎺ュ彛" ) public class FileInfo2Controller { private final FileInfoService fileInfoService; @@ -23,12 +26,14 @@ * @Param downloadPath 鏂囦欢璺緞 */ @GetMapping("/download/downloadZip") + @Operation(summary = "涓嬭浇zip" , description = "涓嬭浇zip" ) public void downloadZip(@Param("downloadPath") String downloadPath, HttpServletRequest request, HttpServletResponse response) { //涓嬭浇鍥剧墖 String down = fileInfoService.downloadPathFile(downloadPath, request, response); } @PostMapping("/download/downloadZips") + @Operation(summary = "涓嬭浇澶氫釜zip" , description = "涓嬭浇澶氫釜zip" ) public void downloadZips(String fileIds, HttpServletRequest request, HttpServletResponse response) { List<FileInfo> fileInfoList = new ArrayList<>(); if(fileIds.contains(",")){ @@ -46,17 +51,20 @@ fileInfoService.downForZip(fileInfoList, request, response); } @PostMapping("/download/downloadPng") + @Operation(summary = "涓嬭浇鍥剧墖" , description = "涓嬭浇鍥剧墖" ) public void downloadPng(String fileId, HttpServletRequest request, HttpServletResponse response) { FileInfo byId = fileInfoService.getById(Integer.parseInt(fileId)); fileInfoService.downloadPng(byId,request,response); } @GetMapping("/showImg") + @Operation(summary = "鏍规嵁璺緞棰勮鍥剧墖" , description = "鏍规嵁璺緞棰勮鍥剧墖" ) public void showImg( String path,HttpServletResponse response) { fileInfoService.getFile(path,response); } @GetMapping("/showImgById/{fileId}") + @Operation(summary = "鏍规嵁鏂囦欢id棰勮鍥剧墖" , description = "鏍规嵁鏂囦欢id棰勮鍥剧墖" ) public void showImgById(@PathVariable Long fileId,HttpServletResponse response) { fileInfoService.getFileById(fileId,response); } -- Gitblit v1.9.1