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/DomainController.java | 109 +++++++++++++++++++++++++++--------------------------- 1 files changed, 55 insertions(+), 54 deletions(-) diff --git a/se-system/src/main/java/com/terra/system/controller/data/DomainController.java b/se-system/src/main/java/com/terra/system/controller/data/DomainController.java index fbcad10..67a2b93 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/DomainController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/DomainController.java @@ -11,12 +11,13 @@ import com.terra.system.service.data.DictService; import com.terra.system.service.data.DomainService; 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.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.util.List; @@ -25,7 +26,7 @@ * 鍊煎煙 * @author WWW */ -@Api(tags = "鏁版嵁绠$悊\\鍊煎煙") +@Tag(name = "鏁版嵁绠$悊\\鍊煎煙") @RestController @RequestMapping("/domain") public class DomainController extends BaseController { @@ -42,11 +43,11 @@ DictService dictService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ns", value = "鍚嶇О绌洪棿", dataType = "String", paramType = "query", example = "bd"), - @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "dlg_25w_aanp"), - @ApiImplicitParam(name = "code", value = "缂栫爜", dataType = "String", paramType = "query", example = "210") + @Operation(summary = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "ns", description = "鍚嶇О绌洪棿", in = ParameterIn.QUERY, example = "bd"), + @Parameter(name = "tab", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "dlg_25w_aanp"), + @Parameter(name = "code", description = "缂栫爜", in = ParameterIn.QUERY, example = "210") }) @GetMapping({"/selectCount"}) public ResponseMsg<Integer> selectCount(String ns, String tab, String code) { @@ -60,13 +61,13 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ns", value = "鍚嶇О绌洪棿", dataType = "String", paramType = "query", example = "bd"), - @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "dlg_25w_aanp"), - @ApiImplicitParam(name = "code", value = "缂栫爜", dataType = "String", paramType = "query", example = "210"), - @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 = "ns", description = "鍚嶇О绌洪棿", in = ParameterIn.QUERY, example = "bd"), + @Parameter(name = "tab", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "dlg_25w_aanp"), + @Parameter(name = "code", description = "缂栫爜", in = ParameterIn.QUERY, example = "210"), + @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<DomainEntity>> selectByPage(String ns, String tab, String code, Integer pageSize, Integer pageIndex) { @@ -84,13 +85,13 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ns", value = "鍚嶇О绌洪棿", dataType = "String", paramType = "query", example = "bd"), - @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "b_hy20w_s23"), - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", 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 = "ns", description = "鍚嶇О绌洪棿", in = ParameterIn.QUERY, example = "bd"), + @Parameter(name = "tab", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "b_hy20w_s23"), + @Parameter(name = "name", 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<DomainEntity>> selectByPageAndCount(String ns, String tab, String name, Integer pageSize, Integer pageIndex) { @@ -113,7 +114,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectAll") public ResponseMsg<List<DomainEntity>> selectAll() { try { @@ -126,10 +127,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍊煎煙琛ㄩ泦鍚�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "b_"), - @ApiImplicitParam(name = "hasGeom", value = "鍚湁Geom瀛楁", dataType = "Boolean", paramType = "query", example = "false") + @Operation(summary = "鏌ヨ鍊煎煙琛ㄩ泦鍚�") + @Parameters({ + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = "b_"), + @Parameter(name = "hasGeom", description = "鍚湁Geom瀛楁", in = ParameterIn.QUERY, example = "false") }) @GetMapping(value = "/selectDomainTabs") public ResponseMsg<List<TabEntity>> selectDomainTabs(String name, Boolean hasGeom) { @@ -143,10 +144,10 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁琛ㄥ悕鏌ヨ鍊煎煙鍚嶇О") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ns", value = "鍚嶇О绌洪棿", dataType = "String", paramType = "query", example = "bd"), - @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "b_hy20w_s23") + @Operation(summary = "鏍规嵁琛ㄥ悕鏌ヨ鍊煎煙鍚嶇О") + @Parameters({ + @Parameter(name = "ns", description = "鍚嶇О绌洪棿", in = ParameterIn.QUERY, example = "bd"), + @Parameter(name = "tab", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "b_hy20w_s23") }) @GetMapping(value = "/selectDomainNames") public ResponseMsg<List<String>> selectDomainNames(String ns, String tab) { @@ -164,9 +165,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<DomainEntity> selectById(int id) { @@ -180,9 +181,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "DomainEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody DomainEntity entity, HttpServletRequest req) { @@ -201,9 +202,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "DomainEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<DomainEntity> list, HttpServletRequest req) { @@ -224,9 +225,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) { @@ -240,9 +241,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) { @@ -260,9 +261,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "DomainEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -282,9 +283,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "DomainEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") -- Gitblit v1.9.3