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/sys/ResController.java |   98 +++++++++++++++++++++++++------------------------
 1 files changed, 50 insertions(+), 48 deletions(-)

diff --git a/se-system/src/main/java/com/terra/system/controller/sys/ResController.java b/se-system/src/main/java/com/terra/system/controller/sys/ResController.java
index 957414f..ed405e1 100644
--- a/se-system/src/main/java/com/terra/system/controller/sys/ResController.java
+++ b/se-system/src/main/java/com/terra/system/controller/sys/ResController.java
@@ -10,11 +10,13 @@
 import com.terra.system.service.all.UploadAttachService;
 import com.terra.system.service.sys.ResService;
 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.tags.Tag;
 import org.springframework.web.multipart.MultipartFile;
 
 import org.springframework.web.bind.annotation.*;
@@ -27,7 +29,7 @@
  * @author SWS
  * @date 2022-09.28
  */
-@Api(tags = "杩愮淮绠$悊\\璧勬簮绠$悊")
+@Tag(name = "杩愮淮绠$悊\\璧勬簮绠$悊")
 @RestController
 @RequestMapping("/res")
 public class ResController extends BaseController {
@@ -46,15 +48,15 @@
     private final static String TAB_NAME = "lf.sys_res";
 
     @SysLog()
-    @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = ""),
-            @ApiImplicitParam(name = "status", value = "鐘舵��", dataType = "Integer", paramType = "query", example = ""),
-            @ApiImplicitParam(name = "category", value = "鏈嶅姟绫诲埆", dataType = "Integer", paramType = "query", example = ""),
-            @ApiImplicitParam(name = "type", value = "鏈嶅姟绫诲瀷", dataType = "Integer", paramType = "query", example = ""),
-            @ApiImplicitParam(name = "data", value = "鏁版嵁绫诲瀷", dataType = "Integer", paramType = "query", example = ""),
-            @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 = ""),
+            @Parameter(name = "status", description = "鐘舵��", in = ParameterIn.QUERY, example = ""),
+            @Parameter(name = "category", description = "鏈嶅姟绫诲埆", in = ParameterIn.QUERY, example = ""),
+            @Parameter(name = "type", description = "鏈嶅姟绫诲瀷", in = ParameterIn.QUERY, example = ""),
+            @Parameter(name = "data", description = "鏁版嵁绫诲瀷", in = ParameterIn.QUERY, example = ""),
+            @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<ResEntity>> selectByPageAndCount(String name, Integer status, Integer category, Integer type, Integer data, Integer pageSize, Integer pageIndex) {
@@ -77,11 +79,11 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鏍规嵁瑙掕壊鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", dataType = "Integer", paramType = "query", example = "1"),
-            @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 = "roleid", description = "瑙掕壊ID", in = ParameterIn.QUERY, example = "1"),
+            @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10"),
+            @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1")
     })
     @GetMapping(value = "/selectByPageForRole")
     public ResponseMsg<List<ResEntity>> selectByPageForRole(Integer roleid, Integer pageSize, Integer pageIndex) {
@@ -104,7 +106,7 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鏌ヨ鎵�鏈�")
+    @Operation(summary = "鏌ヨ鎵�鏈�")
     @GetMapping(value = "/selectAll")
     public ResponseMsg<List<ResEntity>> selectAll() {
         try {
@@ -117,9 +119,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鏍规嵁ID鏌ヨ")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1")
+    @Operation(summary = "鏍规嵁ID鏌ヨ")
+    @Parameters({
+            @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1")
     })
     @GetMapping(value = "/selectById")
     public ResponseMsg<ResEntity> selectById(int id) {
@@ -133,9 +135,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鎻掑叆涓�鏉�")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "ResEntity", paramType = "body")
+    @Operation(summary = "鎻掑叆涓�鏉�")
+    @Parameters({
+            @Parameter(name = "entity", description = "瀹炰綋绫�")
     })
     @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8")
     public ResponseMsg<Integer> insert(@RequestBody ResEntity entity, HttpServletRequest req) {
@@ -156,9 +158,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鎻掑叆澶氭潯")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "ResEntity", paramType = "body")
+    @Operation(summary = "鎻掑叆澶氭潯")
+    @Parameters({
+            @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�")
     })
     @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8")
     public ResponseMsg<Integer> inserts(@RequestBody List<ResEntity> list, HttpServletRequest req) {
@@ -181,9 +183,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 = "/delete")
     public ResponseMsg<Integer> delete(int id) {
@@ -198,9 +200,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鍒犻櫎澶氭潯")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "Integer", paramType = "query", example = "1,2")
+    @Operation(summary = "鍒犻櫎澶氭潯")
+    @Parameters({
+            @Parameter(name = "ids", description = "ID鏁扮粍", in = ParameterIn.QUERY, example = "1,2")
     })
     @GetMapping(value = "/deletes")
     public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) {
@@ -220,9 +222,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鏇存柊涓�鏉�")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "ResEntity", paramType = "body")
+    @Operation(summary = "鏇存柊涓�鏉�")
+    @Parameters({
+            @Parameter(name = "entity", description = "瀹炰綋绫�")
     })
     @ResponseBody
     @PostMapping(value = "/update", produces = "application/json; charset=UTF-8")
@@ -244,9 +246,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鏇存柊澶氭潯")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "ResEntity", paramType = "body")
+    @Operation(summary = "鏇存柊澶氭潯")
+    @Parameters({
+            @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�")
     })
     @ResponseBody
     @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8")
@@ -270,7 +272,7 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "涓婁紶鏂囦欢")
+    @Operation(summary = "涓婁紶鏂囦欢")
     @ResponseBody
     @PostMapping(value = "/upload")
     public ResponseMsg<String> upload(@RequestParam("file") MultipartFile file, HttpServletRequest req) {
@@ -280,9 +282,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) {
@@ -290,9 +292,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鏌ョ湅鏂囦欢")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "guid", value = "闄勪欢Guid", dataType = "String", paramType = "body")
+    @Operation(summary = "鏌ョ湅鏂囦欢")
+    @Parameters({
+            @Parameter(name = "guid", description = "闄勪欢Guid")
     })
     @GetMapping(value = "/downloadForView")
     public void downloadForView(String guid, HttpServletResponse res) {

--
Gitblit v1.9.3