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/ProjectController.java | 57 +++++++++++++++++++++++++++++---------------------------- 1 files changed, 29 insertions(+), 28 deletions(-) diff --git a/se-system/src/main/java/com/terra/system/controller/data/ProjectController.java b/se-system/src/main/java/com/terra/system/controller/data/ProjectController.java index 1343f3a..6705960 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/ProjectController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/ProjectController.java @@ -19,12 +19,13 @@ import com.terra.system.service.data.DirService; import com.terra.system.service.sys.DepService; 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.ArrayList; @@ -34,7 +35,7 @@ * 椤圭洰绠$悊 * @author WWW */ -@Api(tags = "鏁版嵁绠$悊\\椤圭洰绠$悊") +@Tag(name = "鏁版嵁绠$悊\\椤圭洰绠$悊") @RestController @RequestMapping("/project") public class ProjectController extends BaseController { @@ -54,7 +55,7 @@ BaseQueryService baseQueryService; @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈夊崟浣嶆暟鎹�") + @Operation(summary = "鏌ヨ鎵�鏈夊崟浣嶆暟鎹�") @GetMapping(value = "/selectDepAll") public ResponseMsg<List<DepEntity>> selectDepAll() { try { @@ -66,9 +67,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ椤圭洰") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "瑗�") + @Operation(summary = "鏌ヨ椤圭洰") + @Parameters({ + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = "瑗�") }) @GetMapping(value = "/selectProject") public ResponseMsg<List<DirEntity>> selectProject(String name) { @@ -82,11 +83,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dirid", value = "鐩綍ID", dataType = "String", 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 = "dirid", 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 = "/selectByPageAndCount") public ResponseMsg<Object> selectByPageAndCount(String dirid, Integer pageSize, Integer pageIndex) { @@ -108,7 +109,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ瀛楁淇℃伅") + @Operation(summary = "鏌ヨ瀛楁淇℃伅") @GetMapping(value = "/selectFields") public ResponseMsg<List<DictEntity>> selectFields() { try { @@ -127,10 +128,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ浣嶇疆") - @ApiImplicitParams({ - @ApiImplicitParam(name = "x", value = "X", dataType = "Double", paramType = "query", example = "114.178955"), - @ApiImplicitParam(name = "y", value = "Y", dataType = "Double", paramType = "query", example = "38.991743") + @Operation(summary = "鏌ヨ浣嶇疆") + @Parameters({ + @Parameter(name = "x", description = "X", in = ParameterIn.QUERY, example = "114.178955"), + @Parameter(name = "y", description = "Y", in = ParameterIn.QUERY, example = "38.991743") }) @GetMapping(value = "/selectLocation") public ResponseMsg<Object> selectLocation(double x, double y) { @@ -145,9 +146,9 @@ } @SysLog() - @ApiOperation(value = "鍒犻櫎涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "gid", value = "ID", dataType = "int", paramType = "query", example = "1") + @Operation(summary = "鍒犻櫎涓�鏉�") + @Parameters({ + @Parameter(name = "gid", description = "ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/delete") public ResponseMsg<Integer> delete(int gid) { @@ -161,9 +162,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "DictEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody BsprojectEntity entity, HttpServletRequest req) { @@ -190,9 +191,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "DictEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") -- Gitblit v1.9.3