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/OperateController.java |   94 ++++++++++++++++++++++++-----------------------
 1 files changed, 48 insertions(+), 46 deletions(-)

diff --git a/se-system/src/main/java/com/terra/system/controller/sys/OperateController.java b/se-system/src/main/java/com/terra/system/controller/sys/OperateController.java
index aa1fe4d..56c1408 100644
--- a/se-system/src/main/java/com/terra/system/controller/sys/OperateController.java
+++ b/se-system/src/main/java/com/terra/system/controller/sys/OperateController.java
@@ -7,12 +7,14 @@
 import com.terra.system.entity.sys.UserEntity;
 import com.terra.system.service.sys.OperateService;
 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.bind.annotation.*;
 import javax.servlet.http.HttpServletRequest;
 import java.sql.Timestamp;
@@ -23,7 +25,7 @@
  * @author SWS
  * @date 2022-09.28
  */
-@Api(tags = "杩愮淮绠$悊\\鎿嶄綔鏃ュ織")
+@Tag(name = "杩愮淮绠$悊\\鎿嶄綔鏃ュ織")
 @RestController
 @RequestMapping("/operate")
 public class OperateController extends BaseController {
@@ -34,12 +36,12 @@
     TokenService tokenService;
 
     @SysLog()
-    @ApiOperation(value = "鏌ヨ璁板綍鏁�")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "uname", value = "鐢ㄦ埛鍚�", dataType = "String", paramType = "query", example = "绠$悊鍛�"),
-            @ApiImplicitParam(name = "type", value = "绫诲瀷", dataType = "Integer", paramType = "query", example = "1"),
-            @ApiImplicitParam(name = "start", value = "寮�濮嬫椂闂�", dataType = "Timestamp", paramType = "query", example = "2022-10-09 09:00:00"),
-            @ApiImplicitParam(name = "end", value = "缁撴潫鏃堕棿", dataType = "Timestamp", paramType = "query", example = "2022-10-10 17:00:00")
+    @Operation(summary = "鏌ヨ璁板綍鏁�")
+    @Parameters({
+            @Parameter(name = "uname", description = "鐢ㄦ埛鍚�", in = ParameterIn.QUERY, example = "绠$悊鍛�"),
+            @Parameter(name = "type", description = "绫诲瀷", in = ParameterIn.QUERY, example = "1"),
+            @Parameter(name = "start", description = "寮�濮嬫椂闂�", in = ParameterIn.QUERY, example = "2022-10-09 09:00:00"),
+            @Parameter(name = "end", description = "缁撴潫鏃堕棿", in = ParameterIn.QUERY, example = "2022-10-10 17:00:00")
     })
     @GetMapping({"/selectCount"})
     public ResponseMsg<Integer> selectCount(String uname, Integer type, Timestamp start, Timestamp end) {
@@ -53,14 +55,14 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鍒嗛〉鏌ヨ")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "uname", value = "鐢ㄦ埛鍚�", dataType = "String", paramType = "query", example = "绠$悊鍛�"),
-            @ApiImplicitParam(name = "type", value = "绫诲瀷", dataType = "Integer", paramType = "query", example = "1"),
-            @ApiImplicitParam(name = "start", value = "寮�濮嬫椂闂�", dataType = "Timestamp", paramType = "query", example = "2022-10-09 09:00:00"),
-            @ApiImplicitParam(name = "end", value = "缁撴潫鏃堕棿", dataType = "Timestamp", paramType = "query", example = "2022-10-10 17:00:00"),
-            @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 = "uname", description = "鐢ㄦ埛鍚�", in = ParameterIn.QUERY, example = "绠$悊鍛�"),
+            @Parameter(name = "type", description = "绫诲瀷", in = ParameterIn.QUERY, example = "1"),
+            @Parameter(name = "start", description = "寮�濮嬫椂闂�", in = ParameterIn.QUERY, example = "2022-10-09 09:00:00"),
+            @Parameter(name = "end", description = "缁撴潫鏃堕棿", in = ParameterIn.QUERY, example = "2022-10-10 17:00:00"),
+            @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<OperateEntity>> selectByPage(String uname, Integer type, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex) {
@@ -76,14 +78,14 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "uname", value = "鐢ㄦ埛鍚�", dataType = "String", paramType = "query", example = "绠$悊鍛�"),
-            @ApiImplicitParam(name = "type", value = "绫诲瀷", dataType = "Integer", paramType = "query", example = "1"),
-            @ApiImplicitParam(name = "start", value = "寮�濮嬫椂闂�", dataType = "Timestamp", paramType = "query", example = "2022-10-09 09:00:00"),
-            @ApiImplicitParam(name = "end", value = "缁撴潫鏃堕棿", dataType = "Timestamp", paramType = "query", example = "2022-10-10 17:00:00"),
-            @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 = "uname", description = "鐢ㄦ埛鍚�", in = ParameterIn.QUERY, example = "绠$悊鍛�"),
+            @Parameter(name = "type", description = "绫诲瀷", in = ParameterIn.QUERY, example = "1"),
+            @Parameter(name = "start", description = "寮�濮嬫椂闂�", in = ParameterIn.QUERY, example = "2022-10-09 09:00:00"),
+            @Parameter(name = "end", description = "缁撴潫鏃堕棿", in = ParameterIn.QUERY, example = "2022-10-10 17:00:00"),
+            @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<OperateEntity>> selectByPageAndCount(String uname, Integer type, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex) {
@@ -106,9 +108,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鎻掑叆涓�鏉�")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "OperateEntity", paramType = "body", example = "")
+    @Operation(summary = "鎻掑叆涓�鏉�")
+    @Parameters({
+            @Parameter(name = "entity", description = "瀹炰綋绫�", example = "")
     })
     @PostMapping(value = "/insertOperate", produces = "application/json; charset=UTF-8")
     public ResponseMsg<Integer> insertOperate(@RequestBody OperateEntity entity, HttpServletRequest req) {
@@ -127,9 +129,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鎻掑叆澶氭潯")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "List<OperateEntity>", paramType = "body", example = "")
+    @Operation(summary = "鎻掑叆澶氭潯")
+    @Parameters({
+            @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", schema = @Schema(type = "array"), example = "")
     })
     @PostMapping(value = "/insertOperates", produces = "application/json; charset=UTF-8")
     public ResponseMsg<Integer> insertOperates(@RequestBody List<OperateEntity> list, HttpServletRequest req) {
@@ -150,9 +152,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 = "/deleteOperate")
     public ResponseMsg<Integer> deleteOperate(int id) {
@@ -166,9 +168,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鍒犻櫎澶氭潯")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "List<Integer>", paramType = "query", example = "1,2")
+    @Operation(summary = "鍒犻櫎澶氭潯")
+    @Parameters({
+            @Parameter(name = "ids", description = "ID鏁扮粍", schema = @Schema(type = "array"), in = ParameterIn.QUERY, example = "1,2")
     })
     @GetMapping(value = "/deleteOperates")
     public ResponseMsg<Integer> deleteOperates(@RequestParam List<Integer> ids) {
@@ -184,9 +186,9 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鏇存柊涓�鏉�")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "OperateEntity", paramType = "body", example = "")
+    @Operation(summary = "鏇存柊涓�鏉�")
+    @Parameters({
+            @Parameter(name = "entity", description = "瀹炰綋绫�", example = "")
     })
     @ResponseBody
     @PostMapping(value = "/updateOperate", produces = "application/json; charset=UTF-8")
@@ -206,9 +208,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 = "/selectOperate")
     public ResponseMsg<OperateEntity> selectOperate(int id) {
@@ -222,7 +224,7 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鏌ヨ鎵�鏈�")
+    @Operation(summary = "鏌ヨ鎵�鏈�")
     @GetMapping(value = "/selectOperateAll")
     public ResponseMsg<List<OperateEntity>> selectOperateAll() {
         try {

--
Gitblit v1.9.3