From b8d62de41ff7e1e0549061308aa11f68cf881ed9 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期三, 16 七月 2025 17:01:20 +0800
Subject: [PATCH] 修改所有的controller

---
 se-system/src/main/java/com/terra/system/controller/data/StyleController.java |   97 +++++++++++++++++++++++++-----------------------
 1 files changed, 50 insertions(+), 47 deletions(-)

diff --git a/se-system/src/main/java/com/terra/system/controller/data/StyleController.java b/se-system/src/main/java/com/terra/system/controller/data/StyleController.java
index 062fee7..9393d96 100644
--- a/se-system/src/main/java/com/terra/system/controller/data/StyleController.java
+++ b/se-system/src/main/java/com/terra/system/controller/data/StyleController.java
@@ -14,11 +14,14 @@
 import com.terra.system.service.data.StyleService;
 import com.terra.system.service.sys.DownlogService;
 import com.terra.system.service.sys.TokenService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
 import javax.annotation.Resource;
+
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
 import org.springframework.web.multipart.MultipartFile;
 
 import org.springframework.web.bind.annotation.*;
@@ -31,7 +34,7 @@
  * @author sws
  * @date 2022-09.26
  */
-@Api(tags = "鏁版嵁绠$悊\\鏍峰紡绠$悊")
+@Tag(name = "鏁版嵁绠$悊\\鏍峰紡绠$悊")
 @RestController
 @RequestMapping("/style")
 public class StyleController extends BaseController {
@@ -53,9 +56,9 @@
     private final static String TAB_NAME = "lf.sys_style";
 
     @SysLog()
-    @ApiOperation(value = "鏌ヨ璁板綍鏁�")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", required = false, example = "a")
+    @Operation(summary = "鏌ヨ璁板綍鏁�")
+    @Parameters({
+            @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, required = false, example = "a")
     })
     @GetMapping({"/selectCount"})
     public ResponseMsg<Integer> selectCount(String name) {
@@ -69,11 +72,11 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鍒嗛〉鏌ヨ")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", required = false, example = "a"),
-            @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10"),
-            @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1")
+    @Operation(summary = "鍒嗛〉鏌ヨ")
+    @Parameters({
+            @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, required = false, example = "a"),
+            @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10"),
+            @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1")
     })
     @GetMapping(value = "/selectByPage")
     public ResponseMsg<List<StyleEntity>> selectByPage(String name, Integer pageSize, Integer pageIndex) {
@@ -92,11 +95,11 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "a"),
-            @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10"),
-            @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1")
+    @Operation(summary = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟")
+    @Parameters({
+            @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = "a"),
+            @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10"),
+            @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1")
     })
     @GetMapping(value = "/selectByPageAndCount")
     public ResponseMsg<List<StyleEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) {
@@ -119,9 +122,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鎻掑叆涓�鏉�")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "StyleEntity", paramType = "body", example = "")
+    @Operation(summary = "鎻掑叆涓�鏉�")
+    @Parameters({
+            @Parameter(name = "entity", description = "瀹炰綋绫�", example = "")
     })
     @PostMapping(value = "/insertStyle", produces = "application/json; charset=UTF-8")
     public ResponseMsg<Integer> insertStyle(@RequestBody StyleEntity entity, HttpServletRequest req) {
@@ -140,9 +143,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鎻掑叆澶氭潯")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "StyleEntity", paramType = "body", example = "")
+    @Operation(summary = "鎻掑叆澶氭潯")
+    @Parameters({
+            @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", example = "")
     })
     @PostMapping(value = "/insertStyles", produces = "application/json; charset=UTF-8")
     public ResponseMsg<Integer> insertStyles(@RequestBody List<StyleEntity> list, HttpServletRequest req) {
@@ -163,9 +166,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鍒犻櫎涓�鏉�")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1")
+    @Operation(summary = "鍒犻櫎涓�鏉�")
+    @Parameters({
+            @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1")
     })
     @GetMapping(value = "/deleteStyle")
     public ResponseMsg<Integer> deleteStyle(int id) {
@@ -179,9 +182,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鍒犻櫎澶氭潯")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "Integer", paramType = "query", example = "1")
+    @Operation(summary = "鍒犻櫎澶氭潯")
+    @Parameters({
+            @Parameter(name = "ids", description = "ID鏁扮粍", in = ParameterIn.QUERY, example = "1")
     })
     @GetMapping(value = "/deleteStyles")
     public ResponseMsg<Integer> deleteStyles(@RequestParam List<Integer> ids) {
@@ -199,9 +202,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鏇存柊涓�鏉�")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "StyleEntity", paramType = "body", example = "")
+    @Operation(summary = "鏇存柊涓�鏉�")
+    @Parameters({
+            @Parameter(name = "entity", description = "瀹炰綋绫�", example = "")
     })
     @ResponseBody
     @PostMapping(value = "/updateStyle", produces = "application/json; charset=UTF-8")
@@ -221,9 +224,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鏍规嵁ID鏌ヨ")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1")
+    @Operation(summary = "鏍规嵁ID鏌ヨ")
+    @Parameters({
+            @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1")
     })
     @GetMapping(value = "/selectStyle")
     public ResponseMsg<StyleEntity> selectStyle(int id) {
@@ -237,7 +240,7 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鏌ヨ鎵�鏈�")
+    @Operation(summary = "鏌ヨ鎵�鏈�")
     @GetMapping(value = "/selectStyleAll")
     public ResponseMsg<List<StyleEntity>> selectStyleAll() {
 
@@ -250,7 +253,7 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "涓婁紶鏂囦欢")
+    @Operation(summary = "涓婁紶鏂囦欢")
     @ResponseBody
     @PostMapping(value = "/upload")
     public ResponseMsg<String> upload(@RequestParam("file") MultipartFile file, HttpServletRequest req) {
@@ -260,9 +263,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "涓嬭浇鏂囦欢")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "guid", value = "闄勪欢Guid", dataType = "String", paramType = "body")
+    @Operation(summary = "涓嬭浇鏂囦欢")
+    @Parameters({
+            @Parameter(name = "guid", description = "闄勪欢Guid")
     })
     @GetMapping(value = "/download")
     public void download(String guid, HttpServletResponse res) {
@@ -270,9 +273,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "涓嬭浇鏂囦欢")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "guid", value = "鏂囦欢GUID", dataType = "String", paramType = "query")
+    @Operation(summary = "涓嬭浇鏂囦欢")
+    @Parameters({
+            @Parameter(name = "guid", description = "鏂囦欢GUID", in = ParameterIn.QUERY)
     })
     @RequestMapping(value = "/downloadFile", method = RequestMethod.GET)
     public void downloadFile(String guid, HttpServletRequest req, HttpServletResponse res) {
@@ -298,9 +301,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "璇锋眰涓嬭浇")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "guids", value = "闄勪欢Guid鏁扮粍", dataType = "String", paramType = "body", allowMultiple = true, example = "e5b6ae0889b88111f13a4b6e048348db,fa4f299e901a0c46e634f8fcc8185c0c")
+    @Operation(summary = "璇锋眰涓嬭浇")
+    @Parameters({
+            @Parameter(name = "guids", description = "闄勪欢Guid鏁扮粍", schema = @Schema(type = "array"), example = "e5b6ae0889b88111f13a4b6e048348db,fa4f299e901a0c46e634f8fcc8185c0c")
     })
     @ResponseBody
     @PostMapping(value = "/downloadReqForGuids")

--
Gitblit v1.9.3