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/UserController.java | 118 se-system/src/main/java/com/terra/system/controller/show/MarkController.java | 61 se-system/src/main/java/com/terra/system/controller/sys/RoleController.java | 82 se-system/src/main/java/com/terra/system/controller/sys/MenuAuthController.java | 97 se-system/src/main/java/com/terra/system/controller/sys/TokenController.java | 86 se-system/src/main/java/com/terra/system/controller/sys/MenuController.java | 62 se-system/src/main/java/com/terra/system/controller/show/DataLibController.java | 65 se-system/src/main/java/com/terra/system/controller/sys/ReportController.java | 59 se-system/src/main/java/com/terra/system/controller/data/DataCountController.java | 88 se-system/src/main/java/com/terra/system/controller/sys/AuthController.java | 86 se-system/src/main/java/com/terra/system/controller/data/MetaController.java | 161 +- se-system/src/main/java/com/terra/system/controller/data/ProjectController.java | 57 se-system/src/main/java/com/terra/system/service/data/UploadService.java | 4 se-system/src/main/java/com/terra/system/controller/data/DataQueryController.java | 20 se-system/src/main/java/com/terra/system/controller/show/ExportController.java | 33 se-system/src/main/java/com/terra/system/controller/data/StyleController.java | 97 se-system/src/main/java/com/terra/system/controller/data/TaskController.java | 73 se-system/src/main/java/com/terra/system/controller/sys/BlacklistController.java | 87 se-system/src/main/java/com/terra/system/controller/sys/ResOpController.java | 94 se-system/src/main/java/com/terra/system/controller/sys/RoleResController.java | 69 se-system/src/main/java/com/terra/system/controller/data/upload/QueryController.java | 80 se-system/src/main/java/com/terra/system/controller/data/DomainController.java | 109 se-system/src/main/java/com/terra/system/controller/all/BaseQueryController.java | 226 +- se-system/src/main/java/com/terra/system/controller/show/InquiryController.java | 25 se-system/src/main/java/com/terra/system/controller/sys/ResController.java | 98 se-publish/src/main/java/com/terra/publish/controller/TestController.java | 2 se-system/src/main/resources/bootstrap.yml | 1 se-system/src/main/java/com/terra/system/controller/data/WmtsController.java | 31 se-system/src/main/java/com/terra/system/controller/sys/LayerController.java | 65 se-system/src/main/java/com/terra/system/controller/sys/DownlogController.java | 27 se-system/src/main/java/com/terra/system/controller/data/PublishController.java | 96 se-system/src/main/java/com/terra/system/controller/sys/LoginController.java | 94 se-system/src/main/java/com/terra/system/controller/all/PermsController.java | 35 se-system/src/main/java/com/terra/system/controller/show/ComprehensiveController.java | 93 se-system/src/main/java/com/terra/system/controller/sys/RoleUserController.java | 81 se-system/src/main/java/com/terra/system/aspect/LogAspect.java | 8 se-system/src/main/java/com/terra/system/entity/all/StaticData.java | 2 se-system/src/main/java/com/terra/system/controller/data/DirController.java | 73 se-system/src/main/java/com/terra/system/controller/data/VerController.java | 62 se-system/src/main/java/com/terra/system/controller/show/ModelController.java | 67 se-system/src/main/java/com/terra/system/config/WebConfig.java | 5 se-system/src/main/java/com/terra/system/controller/sys/OperateController.java | 94 se-system/src/main/java/com/terra/system/controller/data/DictController.java | 93 se-system/src/main/java/com/terra/system/controller/sys/DepController.java | 61 se-system/src/main/java/com/terra/system/controller/data/upload/CheckController.java | 70 se-system/src/main/java/com/terra/system/controller/sys/RoleMenuAuthController.java | 93 se-system/src/main/java/com/terra/system/controller/sys/RoleLayerController.java | 69 se-system/src/main/java/com/terra/system/controller/sys/ArgsController.java | 81 se-system/pom.xml | 18 se-system/src/main/java/com/terra/system/controller/sys/CtrlController.java | 19 se-system/src/main/java/com/terra/system/controller/all/SignController.java | 35 se-system/src/main/java/com/terra/system/controller/sys/ResLogController.java | 55 /dev/null | 290 ---- se-system/src/main/java/com/terra/system/controller/show/ApplyController.java | 71 se-system/src/main/java/com/terra/system/controller/data/upload/UploadController.java | 70 se-system/src/main/java/com/terra/system/SeSystemApp.java | 2 56 files changed, 1,839 insertions(+), 2,061 deletions(-) diff --git a/se-publish/src/main/java/com/terra/publish/controller/TestController.java b/se-publish/src/main/java/com/terra/publish/controller/TestController.java index 0d8e646..c1be42b 100644 --- a/se-publish/src/main/java/com/terra/publish/controller/TestController.java +++ b/se-publish/src/main/java/com/terra/publish/controller/TestController.java @@ -12,7 +12,7 @@ public class TestController extends BaseController { public static final SimpleDateFormat YMDHMS_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - @GetMapping(value = "/test") + @GetMapping(value = "/testp") public ResponseMsg<Object> test() { try { String date = YMDHMS_FORMAT.format(new Date()); diff --git a/se-system/pom.xml b/se-system/pom.xml index 4ef2b7a..a4926b3 100644 --- a/se-system/pom.xml +++ b/se-system/pom.xml @@ -113,21 +113,11 @@ <version>1.1</version> </dependency> - <!--swagger--> + <!-- SpringDoc webmvc --> <dependency> - <groupId>io.springfox</groupId> - <artifactId>springfox-swagger2</artifactId> - <version>2.9.2</version> - </dependency> - <dependency> - <groupId>io.springfox</groupId> - <artifactId>springfox-swagger-ui</artifactId> - <version>2.9.2</version> - </dependency> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>27.0-jre</version> + <groupId>org.springdoc</groupId> + <artifactId>springdoc-openapi-ui</artifactId> + <version>${springdoc.version}</version> </dependency> <!--httpclient--> diff --git a/se-system/src/main/java/com/terra/system/SeSystemApp.java b/se-system/src/main/java/com/terra/system/SeSystemApp.java index 15740cf..bf98f0f 100644 --- a/se-system/src/main/java/com/terra/system/SeSystemApp.java +++ b/se-system/src/main/java/com/terra/system/SeSystemApp.java @@ -4,7 +4,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.scheduling.annotation.EnableAsync; -import springfox.documentation.swagger2.annotations.EnableSwagger2; /** * 绯荤粺妯″潡 @@ -14,7 +13,6 @@ * @author admin */ @EnableAsync -@EnableSwagger2 @EnableAspectJAutoProxy(exposeProxy = true) @SpringBootApplication(scanBasePackages = {"com.terra.system.*"}) public class SeSystemApp diff --git a/se-system/src/main/java/com/terra/system/aspect/LogAspect.java b/se-system/src/main/java/com/terra/system/aspect/LogAspect.java index 5f0d391..1a0be78 100644 --- a/se-system/src/main/java/com/terra/system/aspect/LogAspect.java +++ b/se-system/src/main/java/com/terra/system/aspect/LogAspect.java @@ -6,7 +6,7 @@ import com.terra.system.helper.WebHelper; import com.terra.system.service.sys.OperateService; import com.terra.system.service.sys.TokenService; -import io.swagger.annotations.Api; +import io.swagger.v3.oas.annotations.tags.Tag; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.aspectj.lang.ProceedingJoinPoint; @@ -93,9 +93,9 @@ oe.setExec(time); // 璁剧疆妯″潡 - Api api = clazz.getAnnotation(Api.class); - if (api != null) { - String[] strs = api.tags()[0].split(SPLIT); + Tag tag = clazz.getAnnotation(Tag.class); + if (tag != null) { + String[] strs = tag.name().split(SPLIT); oe.setModular1(strs[0]); oe.setModular2(strs[1]); } diff --git a/se-system/src/main/java/com/terra/system/config/SwaggerConfig.java b/se-system/src/main/java/com/terra/system/config/SwaggerConfig.java deleted file mode 100644 index b91d361..0000000 --- a/se-system/src/main/java/com/terra/system/config/SwaggerConfig.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.terra.system.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.env.Environment; -import springfox.documentation.builders.ApiInfoBuilder; -import springfox.documentation.builders.PathSelectors; -import springfox.documentation.builders.RequestHandlerSelectors; -import springfox.documentation.service.*; -import springfox.documentation.spi.DocumentationType; -import springfox.documentation.spi.service.contexts.SecurityContext; -import springfox.documentation.spring.web.plugins.Docket; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.List; - -/** - * Swagger閰嶇疆绫� - * @author www - */ -@Configuration -@EnableSwagger2 -public class SwaggerConfig { - @Resource - Environment env; - - private List<ApiKey> securitySchemes() { - List<ApiKey> apiKeys = new ArrayList<ApiKey>(); - apiKeys.add(new ApiKey("Authorization", "token", "header")); - - return apiKeys; - } - - private List<SecurityContext> securityContexts() { - List<SecurityContext> securityContexts = new ArrayList<>(); - securityContexts.add(SecurityContext.builder() - .securityReferences(defaultAuth()) - .forPaths(PathSelectors.regex("^(?!auth).*$")).build()); - - return securityContexts; - } - - private List<SecurityReference> defaultAuth() { - AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); - AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; - authorizationScopes[0] = authorizationScope; - List<SecurityReference> securityReferences = new ArrayList<>(); - securityReferences.add(new SecurityReference("Authorization", authorizationScopes)); - - return securityReferences; - } - - @Bean - public Docket createRestApi() { - String swaggerEnable = env.getProperty("sys.swaggerEnable"); - boolean enable = "true".equals(swaggerEnable); - - return new Docket(DocumentationType.SWAGGER_2) - .enable(enable) - .apiInfo(apiInfo()) - .select() - .apis(RequestHandlerSelectors.basePackage("com.terra.system.controller")) - //.securitySchemes(securitySchemes()) - //.securityContexts(securityContexts()) - .paths(PathSelectors.any()).build(); - } - - private ApiInfo apiInfo() { - return new ApiInfoBuilder() - .title("鎺ュ彛API") - .description("鎺ュ彛API") - .version("1.0").build(); - } -} diff --git a/se-system/src/main/java/com/terra/system/config/WebConfig.java b/se-system/src/main/java/com/terra/system/config/WebConfig.java index 27ea468..3b05800 100644 --- a/se-system/src/main/java/com/terra/system/config/WebConfig.java +++ b/se-system/src/main/java/com/terra/system/config/WebConfig.java @@ -8,12 +8,14 @@ import javax.annotation.Resource; import org.springframework.context.annotation.Configuration; import org.springframework.core.Ordered; +import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.util.AntPathMatcher; import org.springframework.web.servlet.config.annotation.*; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; +import java.util.Collections; import java.util.List; /** @@ -107,6 +109,9 @@ converter.setFastJsonConfig(config); converter.setDefaultCharset(StandardCharsets.UTF_8); + converter.setSupportedMediaTypes(Collections.singletonList( + MediaType.APPLICATION_JSON + )); converters.add(converter); } } diff --git a/se-system/src/main/java/com/terra/system/controller/all/BaseQueryController.java b/se-system/src/main/java/com/terra/system/controller/all/BaseQueryController.java index 24ab8da..eccc09b 100644 --- a/se-system/src/main/java/com/terra/system/controller/all/BaseQueryController.java +++ b/se-system/src/main/java/com/terra/system/controller/all/BaseQueryController.java @@ -30,11 +30,14 @@ import com.terra.system.service.sys.DepService; import com.terra.system.service.sys.DownlogService; import com.terra.system.service.sys.TokenService; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; import javax.annotation.Resource; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Schema; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -77,11 +80,11 @@ DictService dictService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鏄犲皠鍚嶇О", dataType = "String", paramType = "query", example = "dlgagnp"), - @ApiImplicitParam(name = "filter", value = "杩囨护鏉′欢", dataType = "String", paramType = "query", example = "gid >= 50 and name like '鍘�' and objectid < 5000.0"), - @ApiImplicitParam(name = "wkt", value = "WKT锛堣憲鍚嶆枃鏈級", dataType = "String", paramType = "query", example = "gAPpDbZ53XfoQfvT8dj/uhBWX5os8kBJQ1LrNvH3VX7byFQdUJMPiEr8Fkj0q2i1pw+L8KFrvR0MLXq2xaO21nlQQXmEPofJxpDQZwEWUIFZsToXo1kLRD3t6WQezxWB8YTzXHM20Ba73x/ZuuezVhOFOq1U8HKf1dXQdv7gBzEB6fWMmFDc3FuH8GDDHv3LfT86Gio9VgMO6ohlrUdf3ZKtTHeLSuzGF4t0RZuX97YBNo25IIzpeTfRTXBxfdxA") + @Operation(description = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "name", description = "鏄犲皠鍚嶇О", example = "dlgagnp"), + @Parameter(name = "filter", description = "杩囨护鏉′欢", example = "gid >= 50 and name like '鍘�' and objectid < 5000.0"), + @Parameter(name = "wkt", description = "WKT锛堣憲鍚嶆枃鏈級", example = "gAPpDbZ53XfoQfvT8dj/uhBWX5os8kBJQ1LrNvH3VX7byFQdUJMPiEr8Fkj0q2i1pw+L8KFrvR0MLXq2xaO21nlQQXmEPofJxpDQZwEWUIFZsToXo1kLRD3t6WQezxWB8YTzXHM20Ba73x/ZuuezVhOFOq1U8HKf1dXQdv7gBzEB6fWMmFDc3FuH8GDDHv3LfT86Gio9VgMO6ohlrUdf3ZKtTHeLSuzGF4t0RZuX97YBNo25IIzpeTfRTXBxfdxA") }) @GetMapping(value = "/selectCount") @PostMapping(value = "/selectCount") @@ -105,17 +108,16 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鏄犲皠鍚嶇О", dataType = "String", paramType = "query", example = "dlgagnp"), - @ApiImplicitParam(name = "depcode", value = "鍗曚綅缂栫爜", dataType = "String", paramType = "query", example = "00"), - @ApiImplicitParam(name = "dirs", value = "鐩綍缂栫爜", dataType = "String", paramType = "query", example = "00,01"), - @ApiImplicitParam(name = "filter", value = "杩囨护鏉′欢", dataType = "String", paramType = "query", example = "gid >= 50 and name like '鍘�' and objectid < 5000.0"), - @ApiImplicitParam(name = "wkt", value = "WKT锛堣憲鍚嶆枃鏈級", dataType = "String", paramType = "query", example = ""), - //@ApiImplicitParam(name = "srid", value = "绌洪棿寮曠敤鏍囪瘑绗�", dataType = "Integer", paramType = "query", example = "4326"), - @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1"), - @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10"), - @ApiImplicitParam(name = "hasGeom", value = "鏄�/鍚﹀寘鍚┖闂翠俊鎭�", dataType = "Integer", paramType = "query", example = "1") + @Operation(description = "鍒嗛〉鏌ヨ") + @Parameters({ + @Parameter(name = "name", description = "鏄犲皠鍚嶇О", in = ParameterIn.QUERY, example = "dlgagnp"), + @Parameter(name = "depcode", description = "鍗曚綅缂栫爜", in = ParameterIn.QUERY, example = "00"), + @Parameter(name = "dirs", description = "鐩綍缂栫爜", in = ParameterIn.QUERY, example = "00,01"), + @Parameter(name = "filter", description = "杩囨护鏉′欢", in = ParameterIn.QUERY, example = "gid >= 50 and name like '鍘�' and objectid < 5000.0"), + @Parameter(name = "wkt", description = "WKT锛堣憲鍚嶆枃鏈級", in = ParameterIn.QUERY, example = ""), + @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1"), + @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10"), + @Parameter(name = "hasGeom", description = "鏄�/鍚﹀寘鍚┖闂翠俊鎭�", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectByPage") @PostMapping(value = "/selectByPage") @@ -187,12 +189,12 @@ } @SysLog() - @ApiOperation(value = "缂撳啿鍖烘煡璇�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鏄犲皠鍚嶇О", dataType = "String", paramType = "query", example = "dlgagnp"), - @ApiImplicitParam(name = "wkt", value = "WKT锛堣憲鍚嶆枃鏈級", dataType = "String", paramType = "query", example = ""), - @ApiImplicitParam(name = "buffer", value = "缂撳啿鍖哄ぇ灏�", dataType = "Double", paramType = "query", example = "10"), - @ApiImplicitParam(name = "limit", value = "闄愬埗鏉℃暟", dataType = "Integer", paramType = "query", example = "20") + @Operation(description = "缂撳啿鍖烘煡璇�") + @Parameters({ + @Parameter(name = "name", description = "鏄犲皠鍚嶇О", in = ParameterIn.QUERY, example = "dlgagnp"), + @Parameter(name = "wkt", description = "WKT锛堣憲鍚嶆枃鏈級", in = ParameterIn.QUERY, example = ""), + @Parameter(name = "buffer", description = "缂撳啿鍖哄ぇ灏�", in = ParameterIn.QUERY, example = "10"), + @Parameter(name = "limit", description = "闄愬埗鏉℃暟", in = ParameterIn.QUERY, example = "20") }) @GetMapping(value = "/selectByBuffer") public ResponseMsg<List<?>> selectByBuffer(String name, String wkt, Double buffer, Integer limit) { @@ -226,12 +228,12 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鐖禝D鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "metaid", value = "鐖禝D", dataType = "String", paramType = "query", example = "0"), - @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(description = "鏍规嵁鐖禝D鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") + @Parameters({ + @Parameter(name = "metaid", description = "鐖禝D", in = ParameterIn.QUERY, example = "0"), + @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 = "/selectPageAndCountByPid") public ResponseMsg<List<MetaEntity>> selectPageAndCountByPid(Integer metaid, String name, Integer pageSize, Integer pageIndex) { @@ -257,10 +259,10 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁ID鏌ヨWKT") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鏄犲皠鍚嶇О", dataType = "String", paramType = "query", example = "dlgagnp"), - @ApiImplicitParam(name = "gid", value = "GID", dataType = "Integer", paramType = "query", example = "1") + @Operation(description = "鏍规嵁ID鏌ヨWKT") + @Parameters({ + @Parameter(name = "name", description = "鏄犲皠鍚嶇О", in = ParameterIn.QUERY, example = "dlgagnp"), + @Parameter(name = "gid", description = "GID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectWktById") public ResponseMsg<String> selectWktById(String name, Integer gid) { @@ -287,10 +289,10 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁GID鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鏄犲皠鍚嶇О", dataType = "String", paramType = "query", example = "dlgagnp"), - @ApiImplicitParam(name = "gid", value = "GID", dataType = "int", paramType = "query", example = "1") + @Operation(description = "鏍规嵁GID鏌ヨ") + @Parameters({ + @Parameter(name = "name", description = "鏄犲皠鍚嶇О", in = ParameterIn.QUERY, example = "dlgagnp"), + @Parameter(name = "gid", description = "GID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectByGid") public ResponseMsg<Object> selectByGid(String name, int gid) { @@ -316,9 +318,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁瀹炰綋鍚嶆煡璇㈣〃鍚�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鏄犲皠鍚嶇О", dataType = "String", paramType = "query", example = "dlgagnp") + @Operation(description = "鏍规嵁瀹炰綋鍚嶆煡璇㈣〃鍚�") + @Parameters({ + @Parameter(name = "name", description = "鏄犲皠鍚嶇О", in = ParameterIn.QUERY, example = "dlgagnp") }) @GetMapping(value = "/selectTabByEntity") public ResponseMsg<Object> selectTabByEntity(String name) { @@ -337,11 +339,11 @@ } @SysLog() - @ApiOperation(value = "妯$硦鎼滅储瀛楁") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鏄犲皠鍚嶇О", dataType = "String", paramType = "query", example = "dlgagnp"), - @ApiImplicitParam(name = "field", value = "瀛楁", dataType = "String", paramType = "query", example = "name"), - @ApiImplicitParam(name = "value", value = "鍊�", dataType = "String", paramType = "query", example = "'鍘�'") + @Operation(description = "妯$硦鎼滅储瀛楁") + @Parameters({ + @Parameter(name = "name", description = "鏄犲皠鍚嶇О", in = ParameterIn.QUERY, example = "dlgagnp"), + @Parameter(name = "field", description = "瀛楁", in = ParameterIn.QUERY, example = "name"), + @Parameter(name = "value", description = "鍊�", in = ParameterIn.QUERY, example = "'鍘�'") }) @GetMapping(value = "/selectFieldFuzzy") public ResponseMsg<List<String>> selectFieldFuzzy(String name, String field, String value) { @@ -369,9 +371,9 @@ } @SysLog() - @ApiOperation(value = "妯$硦鎼滅储鐢ㄦ埛") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鐢ㄦ埛鍚�", dataType = "String", paramType = "query", example = "瀹�") + @Operation(description = "妯$硦鎼滅储鐢ㄦ埛") + @Parameters({ + @Parameter(name = "name", description = "鐢ㄦ埛鍚�", in = ParameterIn.QUERY, example = "瀹�") }) @GetMapping(value = "/selectUserFuzzy") public ResponseMsg<List<IdNameEntity>> selectUserFuzzy(String name) { @@ -385,9 +387,9 @@ } @SysLog() - @ApiOperation(value = "妯$硦鎼滅储鍗曚綅") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍗曚綅鍚�", dataType = "String", paramType = "query", example = "鍙�") + @Operation(description = "妯$硦鎼滅储鍗曚綅") + @Parameters({ + @Parameter(name = "name", description = "鍗曚綅鍚�", in = ParameterIn.QUERY, example = "鍙�") }) @GetMapping(value = "/selectDepFuzzy") public ResponseMsg<List<IdNameEntity>> selectDepFuzzy(String name) { @@ -401,10 +403,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈夎〃") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "鐐�"), - @ApiImplicitParam(name = "hasGeom", value = "鍚湁Geom瀛楁", dataType = "Boolean", paramType = "query", example = "false") + @Operation(description = "鏌ヨ鎵�鏈夎〃") + @Parameters({ + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = "鐐�"), + @Parameter(name = "hasGeom", description = "鍚湁Geom瀛楁", in = ParameterIn.QUERY, example = "false") }) @GetMapping(value = "/selectTabs") public ResponseMsg<List<TabEntity>> selectTabs(String name, Boolean hasGeom) { @@ -418,16 +420,16 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁琛ㄥ悕鍒嗛〉鏌ヨ琛�") + @Operation(description = "鏍规嵁琛ㄥ悕鍒嗛〉鏌ヨ琛�") @GetMapping(value = "/selectTabsByPage") - @ApiImplicitParams({ - @ApiImplicitParam(name = "depcode", value = "鍗曚綅缂栫爜", dataType = "String", paramType = "query", example = "00"), - @ApiImplicitParam(name = "dirs", value = "鐩綍缂栫爜", dataType = "String", paramType = "query", example = "00,01"), - @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "dlg_"), - @ApiImplicitParam(name = "types", value = "绫诲埆", dataType = "String", paramType = "query", example = "娴嬬粯锛圗SV锛�"), - @ApiImplicitParam(name = "hasGeom", value = "鍚湁Geom瀛楁", dataType = "Boolean", paramType = "query", example = "false"), - @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10"), - @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1") + @Parameters({ + @Parameter(name = "depcode", description = "鍗曚綅缂栫爜", in = ParameterIn.QUERY, example = "00"), + @Parameter(name = "dirs", description = "鐩綍缂栫爜", in = ParameterIn.QUERY, example = "00,01"), + @Parameter(name = "tab", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "dlg_"), + @Parameter(name = "types", description = "绫诲埆", in = ParameterIn.QUERY, example = "娴嬬粯锛圗SV锛�"), + @Parameter(name = "hasGeom", description = "鍚湁Geom瀛楁", in = ParameterIn.QUERY, example = "false"), + @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10"), + @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1") }) public ResponseMsg<Object> selectTabsByPage(String depcode, String dirs, String tab, String types, Boolean hasGeom, Integer pageSize, Integer pageIndex) { try { @@ -505,9 +507,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ瀛楁淇℃伅") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鏄犲皠鍚嶇О", dataType = "String", paramType = "query", example = "dlg25wAanp") + @Operation(description = "鏌ヨ瀛楁淇℃伅") + @Parameters({ + @Parameter(name = "name", description = "鏄犲皠鍚嶇О", in = ParameterIn.QUERY, example = "dlg25wAanp") }) @GetMapping(value = "/selectFields") public ResponseMsg<List<DictEntity>> selectFields(String name) { @@ -532,10 +534,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ瀛楁淇℃伅") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ns", value = "鍚嶇О绌洪棿", dataType = "String", paramType = "query", example = "bd"), - @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "dlg25wAanp") + @Operation(description = "鏌ヨ瀛楁淇℃伅") + @Parameters({ + @Parameter(name = "ns", description = "鍚嶇О绌洪棿", in = ParameterIn.QUERY, example = "bd"), + @Parameter(name = "tab", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "dlg25wAanp") }) @GetMapping(value = "/selectTabFields") public ResponseMsg<List<DictEntity>> selectTabFields(String ns, String tab) { @@ -553,9 +555,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍊煎煙淇℃伅") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鏄犲皠鍚嶇О", dataType = "String", paramType = "query", example = "dlg25wAanp") + @Operation(description = "鏌ヨ鍊煎煙淇℃伅") + @Parameters({ + @Parameter(name = "name", description = "鏄犲皠鍚嶇О", in = ParameterIn.QUERY, example = "dlg25wAanp") }) @GetMapping(value = "/selectDomains") public ResponseMsg<List<DomainEntity>> selectDomains(String name) { @@ -580,10 +582,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "tabName", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "lf.sys_style"), - @ApiImplicitParam(name = "eventid", value = "涓婚敭", dataType = "String", paramType = "query", example = "fa25979a5ef8b43ba82a0be35b3fb0d4") + @Operation(description = "鏌ヨ鏂囦欢") + @Parameters({ + @Parameter(name = "tabName", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "lf.sys_style"), + @Parameter(name = "eventid", description = "涓婚敭", in = ParameterIn.QUERY, example = "fa25979a5ef8b43ba82a0be35b3fb0d4") }) @GetMapping(value = "/selectFiles") public ResponseMsg<List<AttachEntity>> selectFiles(String tabName, String eventid) { @@ -601,9 +603,9 @@ } @SysLog() - @ApiOperation(value = "鍒犻櫎鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "Integer", paramType = "query", example = "1,2") + @Operation(description = "鍒犻櫎鏂囦欢") + @Parameters({ + @Parameter(name = "ids", description = "ID鏁扮粍", in = ParameterIn.QUERY, example = "1,2") }) @GetMapping(value = "/deletes") public ResponseMsg<Integer> deleteFiles(@RequestParam List<Integer> ids) { @@ -621,9 +623,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍏冩暟鎹腑婧㈠嚭鐨勫崟浣岻D") - @ApiImplicitParams({ - @ApiImplicitParam(name = "reqEntity", value = "璇锋眰涓嬭浇瀹炰綋", dataType = "DownloadReqEntity", paramType = "body") + @Operation(description = "鏌ヨ鍏冩暟鎹腑婧㈠嚭鐨勫崟浣岻D") + @Parameters({ + @Parameter(name = "reqEntity", description = "璇锋眰涓嬭浇瀹炰綋") }) @ResponseBody @PostMapping(value = "/selectMetaOverflowDep") @@ -647,9 +649,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨDB涓孩鍑虹殑鍗曚綅ID") - @ApiImplicitParams({ - @ApiImplicitParam(name = "reqEntity", value = "璇锋眰涓嬭浇瀹炰綋", dataType = "DownloadReqEntity", paramType = "body") + @Operation(description = "鏌ヨDB涓孩鍑虹殑鍗曚綅ID") + @Parameters({ + @Parameter(name = "reqEntity", description = "璇锋眰涓嬭浇瀹炰綋") }) @ResponseBody @PostMapping(value = "/selectDbOverflowDep") @@ -676,9 +678,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鍗曚綅缂栫爜鏁扮粍鏌ヨ鍗曚綅") - @ApiImplicitParams({ - @ApiImplicitParam(name = "codes", value = "鍗曚綅缂栫爜鏁扮粍", dataType = "String", paramType = "query", allowMultiple = true, example = "00,0001") + @Operation(description = "鏍规嵁鍗曚綅缂栫爜鏁扮粍鏌ヨ鍗曚綅") + @Parameters({ + @Parameter(name = "codes", description = "鍗曚綅缂栫爜鏁扮粍", in = ParameterIn.QUERY, schema = @Schema(type = "array"), example = "00,0001") }) @GetMapping(value = "/selectDepsByCodes") public ResponseMsg<Object> selectDepsByCodes(String[] codes) { @@ -696,9 +698,9 @@ } @SysLog() - @ApiOperation(value = "涓嬭浇DB鏁版嵁") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dr", value = "璇锋眰涓嬭浇瀹炰綋", dataType = "DownloadReqEntity", paramType = "body") + @Operation(description = "涓嬭浇DB鏁版嵁") + @Parameters({ + @Parameter(name = "dr", description = "璇锋眰涓嬭浇瀹炰綋") }) @ResponseBody @PostMapping(value = "/downloadDbData") @@ -730,9 +732,9 @@ } @SysLog() - @ApiOperation(value = "鏌ョ湅鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "guid", value = "闄勪欢Guid", dataType = "String", paramType = "body") + @Operation(description = "鏌ョ湅鏂囦欢") + @Parameters({ + @Parameter(name = "guid", description = "闄勪欢Guid", in = ParameterIn.QUERY) }) @GetMapping(value = "/downloadForView") public void downloadForView(String guid, HttpServletResponse res) { @@ -740,11 +742,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ涓嬭浇鏂囦欢") - @ApiImplicitParams({ - @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(description = "鍒嗛〉鏌ヨ涓嬭浇鏂囦欢") + @Parameters({ + @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 = "/selectPageCountForDownload") public ResponseMsg<List<DownloadEntity>> selectPageCountForDownload(String name, Integer pageSize, Integer pageIndex, HttpServletRequest req) { @@ -771,9 +773,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鐩綍绫诲埆") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "D") + @Operation(description = "鏌ヨ鐩綍绫诲埆") + @Parameters({ + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = "D") }) @GetMapping(value = "/selectDirTypes") public ResponseMsg<Object> selectDirTypes(String name) { @@ -787,9 +789,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ椤圭洰鍚嶇О") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "瑗�") + @Operation(description = "鏌ヨ椤圭洰鍚嶇О") + @Parameters({ + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = "瑗�") }) @GetMapping(value = "/selectProject") public ResponseMsg<Object> selectProject(String name) { @@ -803,9 +805,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鍏冩暟鎹甀D鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") + @Operation(description = "鏍规嵁鍏冩暟鎹甀D鏌ヨ") + @Parameters({ + @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectMetaById") public ResponseMsg<MetaEntity> selectMetaById(int id) { diff --git a/se-system/src/main/java/com/terra/system/controller/all/CrdsController.java b/se-system/src/main/java/com/terra/system/controller/all/CrdsController.java deleted file mode 100644 index 7622980..0000000 --- a/se-system/src/main/java/com/terra/system/controller/all/CrdsController.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.terra.system.controller.all; - -import com.terra.system.annotation.SysLog; -import com.terra.system.entity.all.ResponseMsg; -import com.terra.system.entity.all.StaticData; -import com.terra.system.entity.data.DirEntity; -import com.terra.system.entity.data.MetaEntity; -import com.terra.system.helper.HttpHelper; -import com.terra.system.helper.StringHelper; -import com.terra.system.service.data.DirService; -import com.terra.system.service.data.FmeService; -import com.terra.system.service.data.MetaService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; -import javax.annotation.Resource; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * CRDS绯荤粺鎺ュ彛 - * @author WWW - */ -@Api(tags = "绯荤粺瀵规帴\\CRDS") -@RestController -@RequestMapping("/crds") -public class CrdsController extends BaseController { - @Resource - DirService dirService; - - @Resource - FmeService fmeService; - - @Resource - MetaService metaService; - - @SysLog() - @ApiOperation(value = "鏌ヨ椤圭洰") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "瑗�") - }) - @GetMapping(value = "/selectProject") - public ResponseMsg<List<DirEntity>> selectProject(String name) { - try { - List<DirEntity> list = dirService.selectProject(name); - - return success(list); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ椤圭洰鐩綍鏍�") - @GetMapping(value = "/selectDirsForPrj") - public ResponseMsg<List<DirEntity>> selectDirsForPrj() { - try { - List<DirEntity> list = dirService.selectDirsForPrj(); - - return success(list); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ浠诲姟鐘舵��") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "浠诲姟ID", dataType = "String", paramType = "query", example = "29db09ee-2aae-4c62-bec0-0b5c5d8084e4") - }) - @GetMapping(value = "/selectTaskStatus") - public Object selectTaskStatus(String id, HttpServletRequest req) { - try { - if (StringHelper.isEmpty(id)) { - return fail("id涓嶈兘涓虹┖"); - } - - return fmeService.getTaskStatus(id, req); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "璇锋眰鎵撳寘") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dirCode", value = "鐩綍缂栫爜", dataType = "String", paramType = "01"), - @ApiImplicitParam(name = "major", value = "涓撲笟", dataType = "String", paramType = "绌胯法瓒�"), - @ApiImplicitParam(name = "isCut", value = "鏄惁瑁佸壀", dataType = "String", paramType = "NO") - }) - @GetMapping(value = "/uploadReqPackaging") - public ResponseMsg<Object> uploadReqPackaging(String dirCode, String major, String isCut, HttpServletRequest req) { - try { - boolean isMajor = StaticData.CROSSING.equals(major) || StaticData.ROUTE.equals(major); - if (!isMajor) { - return fail("涓撲笟鍙兘鏄�滅┛璺ㄨ秺鈥濇垨鈥滅嚎璺��"); - } - - boolean bCut = StaticData.YES.equals(isCut) || StaticData.NO.equals(isCut); - if (!bCut) { - return fail("鏄惁瑁佸壀鍙兘鏄�淵ES鈥濇垨鈥淣O鈥�"); - } - - if (StringHelper.isEmpty(dirCode)) { - return fail("鐩綍缂栫爜涓嶈兘涓虹┖"); - } - DirEntity dir = dirService.selectByCode(dirCode); - if (null == dir) { - return fail("鐩綍缂栫爜涓�" + dirCode + "鐨勭洰褰曚笉瀛樺湪"); - } - - String id = fmeService.crdsPackaging(dirCode, major, isCut, req); - - return success(id); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "涓嬭浇鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "浠诲姟ID", dataType = "String", paramType = "query", example = "29db09ee-2aae-4c62-bec0-0b5c5d8084e4") - }) - @GetMapping(value = "/downloadFile") - public void downloadResult(String id, HttpServletRequest req, HttpServletResponse res) { - try { - if (!StringHelper.isEmpty(id)) { - String url = fmeService.getDownloadUrl(id, req); - - HttpHelper httpHelper = new HttpHelper(); - httpHelper.service(req, res, url, null); - } - } catch (Exception ex) { - log.error(ex.getMessage(), ex); - } - } - - @SysLog() - @ApiOperation(value = "鏍规嵁鐩綍缂栫爜鏌ヨ鍏冩暟鎹枃浠�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dircode", value = "鐩綍缂栫爜", dataType = "String", paramType = "query", example = "01") - }) - @GetMapping(value = "/selectMetasByDirCode") - public ResponseMsg<Object> selectMetasByDirCode(String dircode) { - try { - if (StringHelper.isEmpty(dircode)) { - return fail("鐩綍缂栫爜涓嶈兘涓虹┖"); - } - - List<MetaEntity> list = metaService.selectMetasByDirCode(dircode); - - return success(null == list ? 0 : list.size(), list); - } catch (Exception ex) { - return fail(ex, null); - } - } -} diff --git a/se-system/src/main/java/com/terra/system/controller/all/FmeItController.java b/se-system/src/main/java/com/terra/system/controller/all/FmeItController.java deleted file mode 100644 index 738a36e..0000000 --- a/se-system/src/main/java/com/terra/system/controller/all/FmeItController.java +++ /dev/null @@ -1,290 +0,0 @@ -package com.terra.system.controller.all; - -import com.terra.system.annotation.SysLog; -import com.terra.system.entity.all.ResponseMsg; -import com.terra.system.entity.data.DirEntity; -import com.terra.system.entity.sys.RoleEntity; -import com.terra.system.entity.sys.UserEntity; -import com.terra.system.helper.StringHelper; -import com.terra.system.service.data.DirService; -import com.terra.system.service.sys.RoleService; -import com.terra.system.service.sys.TokenService; -import com.terra.system.service.sys.UserService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; -import javax.annotation.Resource; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import javax.servlet.http.HttpServletRequest; -import java.util.List; - -/** - * FME鎺ュ彛鎺у埗鍣� - * @author WWW - */ -@Api(tags = "绯荤粺瀵规帴\\FME") -@RestController -@RequestMapping("/fmeIt") -public class FmeItController extends BaseController { - @Resource - UserService userService; - - @Resource - RoleService roleService; - - @Resource - TokenService tokenService; - - @Resource - DirService dirService; - - @SysLog() - @ApiOperation(value = "鏌ヨ鏄�/鍚︿负绠$悊鍛�") - @GetMapping(value = "/selectForIsAdmin") - public ResponseMsg<Boolean> selectForIsAdmin(HttpServletRequest req) { - try { - UserEntity ue = tokenService.getCurrentUser(req); - if (ue == null) { - return fail("鐢ㄦ埛鏈櫥褰�", false); - } - - Integer rows = userService.selectForIsAdmin(ue.getId()); - - return success("鎴愬姛", rows > 0); - } catch (Exception ex) { - return fail(ex, false); - } - } - - @SysLog() - @ApiOperation(value = "鏍规嵁ID鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") - }) - @GetMapping(value = "/selectUser") - public ResponseMsg<UserEntity> selectUser(int id) { - try { - UserEntity userEntity = userService.selectUser(id); - - return success(userEntity); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏍规嵁鐢ㄦ埛ID鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "uid", value = "鐢ㄦ埛ID", dataType = "String", paramType = "query", example = "admin") - }) - @GetMapping(value = "/selectByUid") - public ResponseMsg<UserEntity> selectByUid(String uid) { - try { - if (StringHelper.isEmpty(uid)) { - fail("鐢ㄦ埛ID涓嶈兘涓虹┖", null); - } - - UserEntity userEntity = userService.selectByUid(uid); - - return success(userEntity); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ鐢ㄦ埛骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "uname", 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") - }) - @GetMapping(value = "/selectByPageForUser") - public ResponseMsg<List<UserEntity>> selectByPageForUser(String uname, Integer pageSize, Integer pageIndex) { - try { - if (pageSize < 1 || pageIndex < 1) { - return fail("姣忛〉椤垫暟鎴栧垎椤垫暟灏忎簬1", null); - } - int count = userService.selectCount(uname, null); - if (count == 0) { - return success(0, null); - } - List<UserEntity> rs = userService.selectByPage(uname, null, pageSize, pageSize * (pageIndex - 1)); - - return success(count, rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ鏄�/鍚︿负绠$悊鍛�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鐢ㄦ埛ID", dataType = "Integer", paramType = "query", example = "1") - }) - @GetMapping(value = "/selectIsAdmin") - public ResponseMsg<Boolean> selectIsAdmin(Integer id) { - try { - UserEntity ue = userService.selectUser(id); - if (ue == null) { - return fail("鐢ㄦ埛涓嶅瓨鍦�", false); - } - - Integer rows = userService.selectForIsAdmin(ue.getId()); - - return success("鎴愬姛", rows > 0); - } catch (Exception ex) { - return fail(ex, false); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ绠$悊鍛樼敤鎴�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "type", value = "绠$悊鍛樼被鍒�", dataType = "Integer", paramType = "query", example = "1") - }) - @GetMapping(value = "/selectAdminUsers") - public ResponseMsg<Object> selectAdminUsers(Integer type) { - try { - if (null == type || type < 1) { - return fail("绠$悊鍛樼被鍒笉鑳戒负绌烘垨灏忎簬1", false); - } - - List<UserEntity> rs = userService.selectAdminUsers(type); - - return success(rs); - } catch (Exception ex) { - return fail(ex, false); - } - } - - @SysLog() - @ApiOperation(value = "鏍规嵁鐢ㄦ埛ID鏌ヨ瑙掕壊") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鐢ㄦ埛ID", dataType = "Integer", paramType = "query", example = "1") - }) - @GetMapping(value = "/selectRoleByUserId") - public ResponseMsg<Object> selectRoleByUserId(Integer id) { - try { - if (null == id || id < 1) { - return fail("鐢ㄦ埛ID涓嶈兘涓虹┖鎴栧皬浜�1", false); - } - - List<RoleEntity> rs = userService.selectRoleByUserId(id); - - return success(rs); - } catch (Exception ex) { - return fail(ex, false); - } - } - - @SysLog() - @ApiOperation(value = "鏍规嵁瑙掕壊鏌ヨ鐢ㄦ埛") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "瑙掕壊ID", dataType = "Integer", paramType = "query", example = "1") - }) - @GetMapping(value = "/selectUserByRoleId") - public ResponseMsg<Object> selectUserByRoleId(Integer id) { - try { - if (null == id || id < 1) { - return fail("鐢ㄦ埛ID涓嶈兘涓虹┖鎴栧皬浜�1", false); - } - - List<UserEntity> rs = userService.selectUserByRoleId(id); - - return success(rs); - } catch (Exception ex) { - return fail(ex, false); - } - } - - @SysLog() - @ApiOperation(value = "鏍规嵁ID鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") - }) - @GetMapping(value = "/selectRole") - public ResponseMsg<RoleEntity> selectRole(int id) { - try { - RoleEntity roleEntity = roleService.selectRole(id); - - return success(roleEntity); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ瑙掕壊骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "Admin"), - @ApiImplicitParam(name = "depid", 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") - }) - @GetMapping(value = "/selectByPageForRole") - public ResponseMsg<List<RoleEntity>> selectByPageForRole(String name, Integer depid, Integer pageSize, Integer pageIndex) { - try { - if (pageSize < 1 || pageIndex < 1) { - return fail("姣忛〉椤垫暟鎴栧垎椤垫暟灏忎簬1", null); - } - - int count = roleService.selectCount(name, depid); - if (count == 0) { - return success(0, null); - } - - List<RoleEntity> rs = roleService.selectByPage(name, depid, pageSize, pageSize * (pageIndex - 1)); - - return success(count, rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ鏍圭洰褰�") - @GetMapping(value = "/selectDirRoot") - public ResponseMsg<List<DirEntity>> selectDirRoot() { - try { - List<DirEntity> list = dirService.selectDirRoot(); - - return success(list); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ椤圭洰") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "瑗�") - }) - @GetMapping(value = "/selectProject") - public ResponseMsg<List<DirEntity>> selectProject(String name) { - try { - List<DirEntity> list = dirService.selectProject(name); - - return success(list); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ椤圭洰鐩綍鏍�") - @GetMapping(value = "/selectDirsForPrj") - public ResponseMsg<List<DirEntity>> selectDirsForPrj() { - try { - List<DirEntity> list = dirService.selectDirsForPrj(); - - return success(list); - } catch (Exception ex) { - return fail(ex, null); - } - } -} diff --git a/se-system/src/main/java/com/terra/system/controller/all/PermsController.java b/se-system/src/main/java/com/terra/system/controller/all/PermsController.java index efe838a..4f13e6d 100644 --- a/se-system/src/main/java/com/terra/system/controller/all/PermsController.java +++ b/se-system/src/main/java/com/terra/system/controller/all/PermsController.java @@ -10,12 +10,13 @@ import com.terra.system.service.sys.LayerService; import com.terra.system.service.sys.MenuService; 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; @@ -24,7 +25,7 @@ * 鎺堟潈鎺у埗鍣� * @author WWW */ -@Api(tags = "杩愮淮绠$悊\\鎺堟潈绠$悊") +@Tag(name = "杩愮淮绠$悊\\鎺堟潈绠$悊") @RestController @RequestMapping("/perms") public class PermsController extends BaseController { @@ -41,7 +42,7 @@ LayerService layerService; @SysLog() - @ApiOperation(value = "鏌ヨ褰撳墠鐢ㄦ埛鐨勫浘灞傛巿鏉�") + @Operation(summary = "鏌ヨ褰撳墠鐢ㄦ埛鐨勫浘灞傛巿鏉�") @GetMapping(value = "/selectLayers") public ResponseMsg<Object> selectLayers(HttpServletRequest req) { try { @@ -60,7 +61,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ褰撳墠鐢ㄦ埛鐨勬姇褰卞浘灞傛巿鏉�") + @Operation(summary = "鏌ヨ褰撳墠鐢ㄦ埛鐨勬姇褰卞浘灞傛巿鏉�") @GetMapping(value = "/selectProjectLayers") public ResponseMsg<Object> selectProjectLayers(HttpServletRequest req) { try { @@ -79,7 +80,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ褰撳墠鐢ㄦ埛鐨勮祫婧愭巿鏉�") + @Operation(summary = "鏌ヨ褰撳墠鐢ㄦ埛鐨勮祫婧愭巿鏉�") @GetMapping(value = "/selectRes") public ResponseMsg<Object> selectRes(HttpServletRequest req) { try { @@ -98,7 +99,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ褰撳墠鐢ㄦ埛鐨勮彍鍗曟巿鏉�") + @Operation(summary = "鏌ヨ褰撳墠鐢ㄦ埛鐨勮彍鍗曟巿鏉�") @GetMapping(value = "/selectMenus") public ResponseMsg<List<MenusAuthEntity>> selectMenus(HttpServletRequest req) { try { @@ -117,7 +118,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ褰撳墠鐢ㄦ埛鐨勬潈闄愭巿鏉�") + @Operation(summary = "鏌ヨ褰撳墠鐢ㄦ埛鐨勬潈闄愭巿鏉�") @GetMapping(value = "/selectPerms") public ResponseMsg<List<String>> selectPerms(HttpServletRequest req) { try { @@ -136,7 +137,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ褰撳墠鐢ㄦ埛鐨勬潈闄愭巿鏉冨疄浣撻泦鍚�") + @Operation(summary = "鏌ヨ褰撳墠鐢ㄦ埛鐨勬潈闄愭巿鏉冨疄浣撻泦鍚�") @GetMapping(value = "/selectPermsEntity") public ResponseMsg<List<PermsAuthEntity>> selectPermsEntity(HttpServletRequest req) { try { @@ -155,7 +156,7 @@ } @SysLog() - @ApiOperation(value = "娓呯┖鎺堟潈缂撳瓨") + @Operation(summary = "娓呯┖鎺堟潈缂撳瓨") @GetMapping(value = "/deletePermsCache") public ResponseMsg<Boolean> deletePermsCache() { try { @@ -168,7 +169,7 @@ } @SysLog() - @ApiOperation(value = "娓呯┖鎵�鏈夌紦瀛�") + @Operation(summary = "娓呯┖鎵�鏈夌紦瀛�") @GetMapping(value = "/deleteAllCache") public ResponseMsg<Boolean> deleteAllCache() { try { @@ -181,7 +182,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鐢ㄦ埛瑙掕壊") + @Operation(summary = "鏌ヨ鐢ㄦ埛瑙掕壊") @GetMapping("/selectRoles") public ResponseMsg<Object> selectRoles(HttpServletRequest req) { try { @@ -199,9 +200,9 @@ } @SysLog() - @ApiOperation(value = "閫掑綊鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鑿滃崟ID", dataType = "Integer", paramType = "query", example = "14") + @Operation(summary = "閫掑綊鏌ヨ") + @Parameters({ + @Parameter(name = "id", description = "鑿滃崟ID", in = ParameterIn.QUERY, example = "14") }) @GetMapping(value = "/selectMenuRecursive") public ResponseMsg<Object> selectMenuRecursive(int id, HttpServletRequest req) { diff --git a/se-system/src/main/java/com/terra/system/controller/all/SignController.java b/se-system/src/main/java/com/terra/system/controller/all/SignController.java index ab70102..f02a248 100644 --- a/se-system/src/main/java/com/terra/system/controller/all/SignController.java +++ b/se-system/src/main/java/com/terra/system/controller/all/SignController.java @@ -16,11 +16,12 @@ import com.terra.system.service.sys.OperateService; import com.terra.system.service.sys.TokenService; import com.terra.system.service.sys.UserService; -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.tags.Tag; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -32,7 +33,7 @@ * @author WWW * @date 2022-09-21 */ -@Api(tags = "杩愮淮绠$悊\\绛惧悕绠$悊") +@Tag(name = "杩愮淮绠$悊\\绛惧悕绠$悊") @RestController @RequestMapping("/sign") public class SignController extends BaseController { @@ -58,7 +59,7 @@ private ScheduleService scheduleService; @SysLog() - @ApiOperation(value = "璺宠浆棣栭〉") + @Operation(summary = "璺宠浆棣栭〉") @GetMapping({"/", "/toIndex"}) public ModelAndView toIndex(ModelAndView mv, HttpServletRequest req) { mv.setViewName("index"); @@ -72,7 +73,7 @@ } @SysLog() - @ApiOperation(value = "璺宠浆鐧诲綍椤�") + @Operation(summary = "璺宠浆鐧诲綍椤�") @GetMapping("/toLogin") public ModelAndView toLogin(ModelAndView mv) { mv.setViewName("login"); @@ -81,7 +82,7 @@ } @SysLog() - @ApiOperation(value = "鏁版嵁搴撶洃鎺�") + @Operation(summary = "鏁版嵁搴撶洃鎺�") @GetMapping(value = "/toDruid") public ModelAndView toDruid(HttpServletRequest req, HttpServletResponse res) { ModelAndView mv = new ModelAndView(); @@ -103,7 +104,7 @@ } @SysLog() - @ApiOperation(value = "璧勬簮鐩戞帶") + @Operation(summary = "璧勬簮鐩戞帶") @GetMapping(value = "/toMonitor") public ModelAndView toMonitor(ModelAndView mv, HttpServletRequest req, HttpServletResponse res) { try { @@ -121,9 +122,9 @@ } @SysLog() - @ApiOperation(value = "鐧诲綍") - @ApiImplicitParams({ - @ApiImplicitParam(name = "user", value = "鐢ㄦ埗鍚�", dataType = "UsersEntity", paramType = "body", example = "") + @Operation(summary = "鐧诲綍") + @Parameters({ + @Parameter(name = "user", description = "鐢ㄦ埗鍚�", example = "") }) @PostMapping(value = "/login", produces = "application/json; charset=UTF-8") public ResponseMsg<TokenEntity> login(@RequestBody UserEntity user, HttpServletRequest req, HttpServletResponse res) { @@ -168,7 +169,7 @@ } @SysLog() - @ApiOperation(value = "鐧诲嚭") + @Operation(summary = "鐧诲嚭") @GetMapping(value = "/logout") public ResponseMsg<Boolean> logout(HttpServletRequest req, HttpServletResponse res) { try { @@ -186,7 +187,7 @@ } @SysLog() - @ApiOperation(value = "妫�鏌ユ槸/鍚︾櫥褰�") + @Operation(summary = "妫�鏌ユ槸/鍚︾櫥褰�") @GetMapping("/check") public ResponseMsg<Boolean> check(HttpServletRequest req, HttpServletResponse res) { try { @@ -205,7 +206,7 @@ } @SysLog() - @ApiOperation(value = "鑾峰彇褰撳墠鐢ㄦ埛") + @Operation(summary = "鑾峰彇褰撳墠鐢ㄦ埛") @GetMapping("/getCurrentUser") public ResponseMsg<UserEntity> getCurrentUser(HttpServletRequest req) { try { @@ -221,7 +222,7 @@ } @SysLog() - @ApiOperation(value = "鑾峰彇RSA鍔犲瘑鍏挜") + @Operation(summary = "鑾峰彇RSA鍔犲瘑鍏挜") @GetMapping("/getPublicKey") public ResponseMsg<String> getPublicKey() { try { @@ -233,7 +234,7 @@ } } - @ApiOperation(value = "鎻掑叆鎿嶄綔鏃ュ織") + @Operation(summary = "鎻掑叆鎿嶄綔鏃ュ織") @GetMapping("/insertOpLog") public ResponseMsg<Object> insertOpLog(String m1, String m2, HttpServletRequest req) { try { diff --git a/se-system/src/main/java/com/terra/system/controller/data/DataCountController.java b/se-system/src/main/java/com/terra/system/controller/data/DataCountController.java index cde55b9..583ab2b 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/DataCountController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/DataCountController.java @@ -10,12 +10,14 @@ import com.terra.system.service.all.UploadAttachService; import com.terra.system.service.sys.ReportService; 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 javax.servlet.http.HttpServletResponse; @@ -25,7 +27,7 @@ * 鏁版嵁缁熻 * @author WWW */ -@Api(tags = "鏁版嵁绠$悊\\鏁版嵁缁熻") +@Tag(name = "鏁版嵁绠$悊\\鏁版嵁缁熻") @RestController @RequestMapping("/dataCount") public class DataCountController extends BaseController { @@ -39,12 +41,12 @@ UploadAttachService uploadAttachService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = ""), - @ApiImplicitParam(name = "code", value = "缂栫爜", dataType = "String", paramType = "query", example = "countOperates"), - @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 = "code", description = "缂栫爜", in = ParameterIn.QUERY, example = "countOperates"), + @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<ReportEntity>> selectByPageAndCount(String name, String code, Integer pageSize, Integer pageIndex) { @@ -67,7 +69,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鏁版嵁閲忕粺璁�") + @Operation(summary = "鏌ヨ鏁版嵁閲忕粺璁�") @GetMapping(value = "/selectCountSizes") public ResponseMsg<Object> selectCountSizes() { try { @@ -80,7 +82,7 @@ } @SysLog() - @ApiOperation(value = "鎸夋枃浠剁被鍨嬬粺璁�") + @Operation(summary = "鎸夋枃浠剁被鍨嬬粺璁�") @GetMapping(value = "/countSizesByType") public ResponseMsg<Object> countSizesByType() { try { @@ -93,7 +95,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鏈嶅姟璋冪敤閲忕粺璁�") + @Operation(summary = "鏌ヨ鏈嶅姟璋冪敤閲忕粺璁�") @GetMapping(value = "/selectCountServices") public ResponseMsg<Object> selectCountServices() { try { @@ -106,7 +108,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鐢ㄦ埛娴侀噺缁熻") + @Operation(summary = "鏌ヨ鐢ㄦ埛娴侀噺缁熻") @GetMapping(value = "/selectCountOperates") public ResponseMsg<Object> selectCountOperates() { try { @@ -119,7 +121,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁℃暟鎹�") + @Operation(summary = "鎸夐」鐩粺璁℃暟鎹�") @GetMapping(value = "/countSizesByPrj") public ResponseMsg<Object> countSizesByPrj() { try { @@ -132,7 +134,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁¢捇瀛旀暟鎹�") + @Operation(summary = "鎸夐」鐩粺璁¢捇瀛旀暟鎹�") @GetMapping(value = "/countExplorationPoints") public ResponseMsg<Object> countExplorationPoints() { try { @@ -145,10 +147,10 @@ } @SysLog() - @ApiOperation(value = "涓嬭浇鎶ュ憡") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鎶ュ憡ID", dataType = "Integer", paramType = "query", example = "18"), - @ApiImplicitParam(name = "code", value = "鐩綍缂栫爜", dataType = "String", paramType = "query", example = "00"), + @Operation(summary = "涓嬭浇鎶ュ憡") + @Parameters({ + @Parameter(name = "id", description = "鎶ュ憡ID", in = ParameterIn.QUERY, example = "18"), + @Parameter(name = "code", description = "鐩綍缂栫爜", in = ParameterIn.QUERY, example = "00"), }) @GetMapping(value = "/downloadReport") public void downloadReport(Integer id, String code, HttpServletRequest req, HttpServletResponse res) { @@ -171,7 +173,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁℃暟瀛楅珮绋嬫ā鍨嬮潰绉�") + @Operation(summary = "鎸夐」鐩粺璁℃暟瀛楅珮绋嬫ā鍨嬮潰绉�") @GetMapping(value = "/countDemAreaByPrj") public ResponseMsg<Object> countDemAreaByPrj() { try { @@ -184,7 +186,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁′笁缁村湴褰㈡ā鍨嬮潰绉�") + @Operation(summary = "鎸夐」鐩粺璁′笁缁村湴褰㈡ā鍨嬮潰绉�") @GetMapping(value = "/countMptAreaByPrj") public ResponseMsg<Object> countMptAreaByPrj() { try { @@ -197,7 +199,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁″�炬枩鎽勫奖妯″瀷闈㈢Н") + @Operation(summary = "鎸夐」鐩粺璁″�炬枩鎽勫奖妯″瀷闈㈢Н") @GetMapping(value = "/countOsgbAreaByPrj") public ResponseMsg<Object> countOsgbAreaByPrj() { try { @@ -210,7 +212,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁℃縺鍏夌偣浜戞ā鍨嬮潰绉�") + @Operation(summary = "鎸夐」鐩粺璁℃縺鍏夌偣浜戞ā鍨嬮潰绉�") @GetMapping(value = "/countLasAreaByPrj") public ResponseMsg<Object> countLasAreaByPrj() { try { @@ -223,7 +225,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁″嫎瀵熷伐鐐逛釜鏁�") + @Operation(summary = "鎸夐」鐩粺璁″嫎瀵熷伐鐐逛釜鏁�") @GetMapping(value = "/countSurveyWorksiteByPrj") public ResponseMsg<Object> countSurveyWorksiteByPrj() { try { @@ -236,7 +238,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁″嫎瀵熸姤鍛婁釜鏁�") + @Operation(summary = "鎸夐」鐩粺璁″嫎瀵熸姤鍛婁釜鏁�") @GetMapping(value = "/countExplorationReportByPrj") public ResponseMsg<Object> countExplorationReportByPrj() { try { @@ -249,7 +251,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁″穿濉屼釜鏁�") + @Operation(summary = "鎸夐」鐩粺璁″穿濉屼釜鏁�") @GetMapping(value = "/countCollapseByPrj") public ResponseMsg<Object> countCollapseByPrj() { try { @@ -262,7 +264,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁℃偿鐭虫祦涓暟") + @Operation(summary = "鎸夐」鐩粺璁℃偿鐭虫祦涓暟") @GetMapping(value = "/countDebrisFlowByPrj") public ResponseMsg<Object> countDebrisFlowByPrj() { try { @@ -275,7 +277,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁″湴闈㈠闄蜂釜鏁�") + @Operation(summary = "鎸夐」鐩粺璁″湴闈㈠闄蜂釜鏁�") @GetMapping(value = "/countGroundCollapseByPrj") public ResponseMsg<Object> countGroundCollapseByPrj() { try { @@ -288,7 +290,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁¢珮闄¤竟鍧′釜鏁�") + @Operation(summary = "鎸夐」鐩粺璁¢珮闄¤竟鍧′釜鏁�") @GetMapping(value = "/countHighSteepSlopeByPrj") public ResponseMsg<Object> countHighSteepSlopeByPrj() { try { @@ -301,7 +303,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁℃粦鍧′釜鏁�") + @Operation(summary = "鎸夐」鐩粺璁℃粦鍧′釜鏁�") @GetMapping(value = "/countLandSlideByPrj") public ResponseMsg<Object> countLandSlideByPrj() { try { @@ -314,7 +316,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁′笉绋冲畾鏂滃潯涓暟") + @Operation(summary = "鎸夐」鐩粺璁′笉绋冲畾鏂滃潯涓暟") @GetMapping(value = "/countUnstableSlopeByPrj") public ResponseMsg<Object> countUnstableSlopeByPrj() { try { @@ -327,7 +329,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁℃按姣佷釜鏁�") + @Operation(summary = "鎸夐」鐩粺璁℃按姣佷釜鏁�") @GetMapping(value = "/countWaterDamageByPrj") public ResponseMsg<Object> countWaterDamageByPrj() { try { @@ -340,7 +342,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁℃暟瀛楃嚎鍒掑浘闈㈢Н") + @Operation(summary = "鎸夐」鐩粺璁℃暟瀛楃嚎鍒掑浘闈㈢Н") @GetMapping(value = "/countDlgAreaByPrj") public ResponseMsg<Object> countDlgAreaByPrj() { try { @@ -353,7 +355,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁℃暟瀛楁灏勫奖鍍忓浘闈㈢Н") + @Operation(summary = "鎸夐」鐩粺璁℃暟瀛楁灏勫奖鍍忓浘闈㈢Н") @GetMapping(value = "/countDomAreaByPrj") public ResponseMsg<Object> countDomAreaByPrj() { try { @@ -366,7 +368,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁$绾块暱搴�") + @Operation(summary = "鎸夐」鐩粺璁$绾块暱搴�") @GetMapping(value = "/countLineLength") public ResponseMsg<Object> countLineLength() { try { @@ -379,7 +381,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁″嫎鎺㈢偣涓暟") + @Operation(summary = "鎸夐」鐩粺璁″嫎鎺㈢偣涓暟") @GetMapping(value = "/countExplorationPointByPrj") public ResponseMsg<Object> countExplorationPointByPrj() { try { @@ -392,7 +394,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁′笁缁村湴璐ㄦā鍨嬮潰绉�") + @Operation(summary = "鎸夐」鐩粺璁′笁缁村湴璐ㄦā鍨嬮潰绉�") @GetMapping(value = "/countGeoModelAreaByPrj") public ResponseMsg<Object> countGeoModelAreaByPrj() { try { @@ -405,7 +407,7 @@ } @SysLog() - @ApiOperation(value = "鎸夐」鐩粺璁″湴鐏剧偣涓暟") + @Operation(summary = "鎸夐」鐩粺璁″湴鐏剧偣涓暟") @GetMapping(value = "/countGeologicHazardByPrj") public ResponseMsg<Object> countGeologicHazardByPrj() { try { @@ -418,9 +420,9 @@ } @SysLog() - @ApiOperation(value = "椤圭洰鏁版嵁鍒嗙被缁熻") - @ApiImplicitParams({ - @ApiImplicitParam(name = "code", value = "椤圭洰缂栫爜", dataType = "String", paramType = "query", example = "0B") + @Operation(summary = "椤圭洰鏁版嵁鍒嗙被缁熻") + @Parameters({ + @Parameter(name = "code", description = "椤圭洰缂栫爜", in = ParameterIn.QUERY, example = "0B") }) @GetMapping(value = "/countVariousDataByPrj") public ResponseMsg<Object> countVariousDataByPrj(String code) { diff --git a/se-system/src/main/java/com/terra/system/controller/data/DataQueryController.java b/se-system/src/main/java/com/terra/system/controller/data/DataQueryController.java index c068c81..5b36537 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/DataQueryController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/DataQueryController.java @@ -7,11 +7,13 @@ import com.terra.system.helper.StringHelper; import com.terra.system.service.data.DataQueryService; 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.*; @@ -21,7 +23,7 @@ * 鏁版嵁妫�绱� * @author WWW */ -@Api(tags = "鏁版嵁绠$悊\\鏁版嵁鏌ヨ") +@Tag(name = "鏁版嵁绠$悊\\鏁版嵁鏌ヨ") @RestController @RequestMapping("/dataQuery") public class DataQueryController extends BaseQueryController { @@ -32,11 +34,11 @@ DataQueryService dataQueryService; @SysLog() - @ApiOperation(value = "涓婁紶鏂囦欢") + @Operation(summary = "涓婁紶鏂囦欢") @ResponseBody - @ApiImplicitParams({ - @ApiImplicitParam(name = "tabName", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "lf.sys_style"), - @ApiImplicitParam(name = "eventid", value = "涓婚敭", dataType = "String", paramType = "query", example = "fa25979a5ef8b43ba82a0be35b3fb0d4") + @Parameters({ + @Parameter(name = "tabName", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "lf.sys_style"), + @Parameter(name = "eventid", description = "涓婚敭", in = ParameterIn.QUERY, example = "fa25979a5ef8b43ba82a0be35b3fb0d4") }) @PostMapping(value = "/uploadFiles") public ResponseMsg<Integer> uploadFiles(String tabName, String eventid, @RequestParam("file") MultipartFile[] files, HttpServletRequest req) { diff --git a/se-system/src/main/java/com/terra/system/controller/data/DictController.java b/se-system/src/main/java/com/terra/system/controller/data/DictController.java index f2ceccc..5ab7991 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/DictController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/DictController.java @@ -8,12 +8,13 @@ import com.terra.system.entity.sys.UserEntity; import com.terra.system.service.data.DictService; 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; @@ -22,7 +23,7 @@ * 瀛楀吀绠$悊 * @author WWW */ -@Api(tags = "鏁版嵁绠$悊\\瀛楀吀绠$悊") +@Tag(name = "鏁版嵁绠$悊\\瀛楀吀绠$悊") @RestController @RequestMapping("/dict") public class DictController extends BaseController { @@ -33,10 +34,10 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ns", value = "琛ㄧ┖闂�", dataType = "String", paramType = "query", required = false, example = "bd"), - @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "dlg_25w_hyda") + @Operation(summary = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "ns", description = "琛ㄧ┖闂�", in = ParameterIn.QUERY, required = false, example = "bd"), + @Parameter(name = "tab", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "dlg_25w_hyda") }) @GetMapping({"/selectCount"}) public ResponseMsg<Integer> selectCount(String ns, String tab) { @@ -50,12 +51,12 @@ } @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_hyda"), - @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_hyda"), + @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<DictEntity>> selectByPage(String ns, String tab, Integer pageSize, Integer pageIndex) { @@ -73,12 +74,12 @@ } @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_hyda"), - @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_hyda"), + @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<DictEntity>> selectByPageAndCount(String ns, String tab, Integer pageSize, Integer pageIndex) { @@ -101,9 +102,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<DictEntity> selectById(int id) { @@ -117,10 +118,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ瀛楀吀琛ㄧ粨鏋�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "鐐�"), - @ApiImplicitParam(name = "hasGeom", value = "鍚湁Geom瀛楁", dataType = "Boolean", paramType = "query", example = "false") + @Operation(summary = "鏌ヨ瀛楀吀琛ㄧ粨鏋�") + @Parameters({ + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = "鐐�"), + @Parameter(name = "hasGeom", description = "鍚湁Geom瀛楁", in = ParameterIn.QUERY, example = "false") }) @GetMapping(value = "/selectDictTab") public ResponseMsg<List<TabEntity>> selectDictTab(String name, Boolean hasGeom) { @@ -134,9 +135,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 DictEntity entity, HttpServletRequest req) { @@ -155,9 +156,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "DictEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<DictEntity> list, HttpServletRequest req) { @@ -178,9 +179,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) { @@ -194,9 +195,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) { @@ -214,9 +215,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") @@ -236,9 +237,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "DictEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/data/DirController.java b/se-system/src/main/java/com/terra/system/controller/data/DirController.java index 844840b..3e74247 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/DirController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/DirController.java @@ -8,12 +8,13 @@ import com.terra.system.helper.WebHelper; import com.terra.system.service.data.DirService; 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 javax.servlet.http.HttpServletResponse; @@ -24,7 +25,7 @@ * @author sws * @date 2022-09-22 */ -@Api(tags = "鏁版嵁绠$悊\\鐩綍绠$悊") +@Tag(name = "鏁版嵁绠$悊\\鐩綍绠$悊") @RestController @RequestMapping("/dir") public class DirController extends BaseController { @@ -35,9 +36,9 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "DirEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @PostMapping(value = "/insertDir", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertDir(@RequestBody DirEntity entity, HttpServletRequest req) { @@ -56,9 +57,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "DirEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", example = "") }) @PostMapping(value = "/insertDirs", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertDirs(@RequestBody List<DirEntity> list, HttpServletRequest req) { @@ -77,9 +78,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 = "/deleteDir") public ResponseMsg<Integer> deleteDir(int id) { @@ -93,9 +94,9 @@ } @SysLog() - @ApiOperation(value = "鍒犻櫎澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "DirEntity", paramType = "body", example = "") + @Operation(summary = "鍒犻櫎澶氭潯") + @Parameters({ + @Parameter(name = "ids", description = "ID鏁扮粍", example = "") }) @GetMapping(value = "/deleteDirs") public ResponseMsg<Integer> deleteDirs(@RequestParam List<Integer> ids) { @@ -113,9 +114,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "DictEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @ResponseBody @PostMapping(value = "/updateDir", produces = "application/json; charset=UTF-8") @@ -135,9 +136,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "DirEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", example = "") }) @ResponseBody @PostMapping(value = "/updateDirs", produces = "application/json; charset=UTF-8") @@ -159,9 +160,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 = "/selectDir") public ResponseMsg<DirEntity> selectDir(int id) { @@ -175,7 +176,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈夋暟鎹�") + @Operation(summary = "鏌ヨ鎵�鏈夋暟鎹�") @GetMapping(value = "/selectDirAll") public ResponseMsg<List<DirEntity>> selectDirAll() { try { @@ -187,9 +188,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 = "/downloadDir") public void downloadDir(int id, HttpServletResponse res) { @@ -211,9 +212,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) { @@ -227,9 +228,9 @@ } @SysLog() - @ApiOperation(value = "閫掑綊鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "pid", value = "鐖禝D", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "閫掑綊鏌ヨ") + @Parameters({ + @Parameter(name = "pid", description = "鐖禝D", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectByPid") public ResponseMsg<List<DirEntity>> selectByPid(int pid) { 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") diff --git a/se-system/src/main/java/com/terra/system/controller/data/MetaController.java b/se-system/src/main/java/com/terra/system/controller/data/MetaController.java index da30c27..31b97a5 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/MetaController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/MetaController.java @@ -26,8 +26,13 @@ import com.terra.system.service.sys.DepService; import com.terra.system.service.sys.DownlogService; import com.terra.system.service.sys.TokenService; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +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.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -42,7 +47,7 @@ * 鍏冩暟鎹� * @author WWW */ -@Api(tags = "鏁版嵁绠$悊\\淇℃伅绠$悊") +@Tag(name = "鏁版嵁绠$悊\\淇℃伅绠$悊") @RestController @RequestMapping("/meta") public class MetaController extends BaseController { @@ -71,14 +76,14 @@ CadService cadService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "depcode", value = "鍗曚綅缂栫爜", dataType = "String", paramType = "query", example = "00"), - @ApiImplicitParam(name = "dircode", value = "鐩綍缂栫爜", dataType = "String", paramType = "query", example = "00"), - @ApiImplicitParam(name = "verid", value = "鐗堟湰ID", dataType = "Integer", paramType = "query", example = "0"), - @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 = "depcode", description = "鍗曚綅缂栫爜", in = ParameterIn.QUERY, example = "00"), + @Parameter(name = "dircode", description = "鐩綍缂栫爜", in = ParameterIn.QUERY, example = "00"), + @Parameter(name = "verid", description = "鐗堟湰ID", in = ParameterIn.QUERY, example = "0"), + @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<MetaEntity>> selectByPageAndCount(String depcode, String dircode, Integer verid, String name, Integer pageSize, Integer pageIndex) { @@ -101,9 +106,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁GUID鏌ヨGDB") - @ApiImplicitParams({ - @ApiImplicitParam(name = "guid", value = "GUID", dataType = "String", paramType = "query", example = "d58e66d9606a4b85e7c8ab43b3db0b55") + @Operation(summary = "鏍规嵁GUID鏌ヨGDB") + @Parameters({ + @Parameter(name = "guid", description = "GUID", in = ParameterIn.QUERY, example = "d58e66d9606a4b85e7c8ab43b3db0b55") }) @GetMapping(value = "/selectGdbByGuid") public ResponseMsg<Object> selectGdbByGuid(String guid) { @@ -121,12 +126,12 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鐖禝D鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "metaid", value = "鐖禝D", dataType = "String", paramType = "query", example = "0"), - @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 = "鏍规嵁鐖禝D鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") + @Parameters({ + @Parameter(name = "metaid", description = "鐖禝D", in = ParameterIn.QUERY, example = "0"), + @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 = "/selectPageAndCountByPid") public ResponseMsg<List<MetaEntity>> selectPageAndCountByPid(Integer metaid, String name, Integer pageSize, Integer pageIndex) { @@ -152,9 +157,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鐩綍ID鏌ヨ鐗堟湰鍒楄〃") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dirid", value = "鐩綍ID", dataType = "Integer", paramType = "query") + @Operation(summary = "鏍规嵁鐩綍ID鏌ヨ鐗堟湰鍒楄〃") + @Parameters({ + @Parameter(name = "dirid", description = "鐩綍ID", in = ParameterIn.QUERY) }) @GetMapping(value = "/selectVerByDirid") public ResponseMsg<List<VerEntity>> selectVerByDirid(Integer dirid) { @@ -175,9 +180,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<MetaEntity> selectById(int id) { @@ -191,11 +196,11 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ琛ㄤ腑鏁版嵁") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鍏冩暟鎹甀D", dataType = "Integer", paramType = "query", example = "115"), - @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1"), - @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10") + @Operation(summary = "鏌ヨ琛ㄤ腑鏁版嵁") + @Parameters({ + @Parameter(name = "id", description = "鍏冩暟鎹甀D", in = ParameterIn.QUERY, example = "115"), + @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1"), + @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10") }) @GetMapping(value = "/selectDbData") public ResponseMsg<Object> selectDbData(Integer id, Integer pageIndex, Integer pageSize) { @@ -230,10 +235,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ瀛楁淇℃伅") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ns", value = "鍚嶇О绌洪棿", dataType = "String", paramType = "query", example = "bd"), - @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "dlg25wAanp") + @Operation(summary = "鏌ヨ瀛楁淇℃伅") + @Parameters({ + @Parameter(name = "ns", description = "鍚嶇О绌洪棿", in = ParameterIn.QUERY, example = "bd"), + @Parameter(name = "tab", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "dlg25wAanp") }) @GetMapping(value = "/selectTabFields") public ResponseMsg<List<DictEntity>> selectTabFields(String ns, String tab) { @@ -251,10 +256,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨDwg杞崲") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鍏冩暟鎹甀D", dataType = "int", paramType = "query", example = "7715"), - @ApiImplicitParam(name = "isAttach", value = "鏄惁涓洪檮浠�", dataType = "Boolean", paramType = "query", example = "false") + @Operation(summary = "鏌ヨDwg杞崲") + @Parameters({ + @Parameter(name = "id", description = "鍏冩暟鎹甀D", in = ParameterIn.QUERY, example = "7715"), + @Parameter(name = "isAttach", description = "鏄惁涓洪檮浠�", in = ParameterIn.QUERY, example = "false") }) @GetMapping(value = "/selectConvertToDwg") public ResponseMsg<Object> selectConvertToDwg(int id, Boolean isAttach) { @@ -268,9 +273,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MetaEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody MetaEntity entity, HttpServletRequest req) { @@ -290,9 +295,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MetaEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<MetaEntity> list, HttpServletRequest req) { @@ -313,9 +318,9 @@ } @SysLog() - @ApiOperation(value = "鍒犻櫎澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "Integer", paramType = "query", allowMultiple = true, example = "1") + @Operation(summary = "鍒犻櫎澶氭潯") + @Parameters({ + @Parameter(name = "ids", description = "ID鏁扮粍", in = ParameterIn.QUERY, schema = @Schema(type = "array"), example = "1") }) @GetMapping(value = "/deletes") public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { @@ -333,9 +338,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MetaEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -355,9 +360,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MetaEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") @@ -379,11 +384,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ涓嬭浇鏂囦欢") - @ApiImplicitParams({ - @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 = "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 = "/selectPageCountForDownload") public ResponseMsg<List<DownloadEntity>> selectPageCountForDownload(String name, Integer pageSize, Integer pageIndex, HttpServletRequest req) { @@ -410,9 +415,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍏冩暟鎹腑婧㈠嚭鐨勫崟浣岻D") - @ApiImplicitParams({ - @ApiImplicitParam(name = "reqEntity", value = "璇锋眰涓嬭浇瀹炰綋", dataType = "DownloadReqEntity", paramType = "body") + @Operation(summary = "鏌ヨ鍏冩暟鎹腑婧㈠嚭鐨勫崟浣岻D") + @Parameters({ + @Parameter(name = "reqEntity", description = "璇锋眰涓嬭浇瀹炰綋") }) @ResponseBody @PostMapping(value = "/selectMetaOverflowDep") @@ -436,9 +441,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鍗曚綅缂栫爜鏁扮粍鏌ヨ鍗曚綅") - @ApiImplicitParams({ - @ApiImplicitParam(name = "codes", value = "鍗曚綅缂栫爜鏁扮粍", dataType = "String", paramType = "query", allowMultiple = true, example = "00,0001") + @Operation(summary = "鏍规嵁鍗曚綅缂栫爜鏁扮粍鏌ヨ鍗曚綅") + @Parameters({ + @Parameter(name = "codes", description = "鍗曚綅缂栫爜鏁扮粍", in = ParameterIn.QUERY, schema = @Schema(type = "array"), example = "00,0001") }) @GetMapping(value = "/selectDepsByCodes") public ResponseMsg<Object> selectDepsByCodes(String[] codes) { @@ -456,9 +461,9 @@ } @SysLog() - @ApiOperation(value = "璇锋眰鍏冩暟鎹笅杞�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dr", value = "璇锋眰涓嬭浇瀹炰綋绫�", dataType = "DownloadReqEntity", paramType = "body") + @Operation(summary = "璇锋眰鍏冩暟鎹笅杞�") + @Parameters({ + @Parameter(name = "dr", description = "璇锋眰涓嬭浇瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/downloadReq") @@ -487,10 +492,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ涓嬭浇鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "guid", value = "鏂囦欢GUID", dataType = "String", paramType = "query"), - @ApiImplicitParam(name = "pwd", value = "瀵嗙爜", dataType = "String", paramType = "query") + @Operation(summary = "鏌ヨ涓嬭浇鏂囦欢") + @Parameters({ + @Parameter(name = "guid", description = "鏂囦欢GUID", in = ParameterIn.QUERY), + @Parameter(name = "pwd", description = "瀵嗙爜", in = ParameterIn.QUERY) }) @GetMapping(value = "/selectDownloadFile") public ResponseMsg<Boolean> selectDownloadFile(String guid, String pwd) { @@ -525,10 +530,10 @@ } @SysLog() - @ApiOperation(value = "涓嬭浇鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "guid", value = "鏂囦欢GUID", dataType = "String", paramType = "query"), - @ApiImplicitParam(name = "pwd", value = "瀵嗙爜", dataType = "String", paramType = "query") + @Operation(summary = "涓嬭浇鏂囦欢") + @Parameters({ + @Parameter(name = "guid", description = "鏂囦欢GUID", in = ParameterIn.QUERY), + @Parameter(name = "pwd", description = "瀵嗙爜", in = ParameterIn.QUERY) }) @ResponseBody @GetMapping(value = "/downloadFile") @@ -566,9 +571,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) { 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") diff --git a/se-system/src/main/java/com/terra/system/controller/data/PublishController.java b/se-system/src/main/java/com/terra/system/controller/data/PublishController.java index 9fa63df..779bb29 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/PublishController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/PublishController.java @@ -16,11 +16,13 @@ import com.terra.system.service.data.RasterService; import com.terra.system.service.sys.LayerService; 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 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.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -33,7 +35,7 @@ * 鏁版嵁鍙戝竷 * @author WWW */ -@Api(tags = "鏁版嵁绠$悊\\鍙戝竷绠$悊") +@Tag(name = "鏁版嵁绠$悊\\鍙戝竷绠$悊") @RestController @RequestMapping("/publish") public class PublishController extends BaseController { @@ -55,9 +57,9 @@ @Resource PathHelper pathHelper; - @ApiOperation(value = "娴嬭瘯鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "seconds", value = "绉�", dataType = "Integer", paramType = "query", example = "30") + @Operation(summary = "娴嬭瘯鏌ヨ") + @Parameters({ + @Parameter(name = "seconds", description = "绉�", in = ParameterIn.QUERY, example = "30") }) @GetMapping(value = "/selectForTest") public ResponseMsg<Object> selectForTest(Integer seconds) { @@ -75,15 +77,15 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ鍏冩暟鎹�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "depcode", value = "鍗曚綅缂栫爜", dataType = "String", paramType = "query", example = "00"), - @ApiImplicitParam(name = "dircode", value = "鐩綍缂栫爜", dataType = "String", paramType = "query", example = "01"), - @ApiImplicitParam(name = "verid", value = "鐗堟湰ID", dataType = "Integer", paramType = "query", example = "0"), - @ApiImplicitParam(name = "type", value = "绫诲埆", dataType = "String", paramType = "query", example = "DOM"), - @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 = "depcode", description = "鍗曚綅缂栫爜", in = ParameterIn.QUERY, example = "00"), + @Parameter(name = "dircode", description = "鐩綍缂栫爜", in = ParameterIn.QUERY, example = "01"), + @Parameter(name = "verid", description = "鐗堟湰ID", in = ParameterIn.QUERY, example = "0"), + @Parameter(name = "type", description = "绫诲埆", in = ParameterIn.QUERY, example = "DOM"), + @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 = "/selectMetasByPage") public ResponseMsg<Object> selectMetasByPage(String depcode, String dircode, Integer verid, String type, String name, Integer pageSize, Integer pageIndex) { @@ -164,13 +166,13 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = ""), - @ApiImplicitParam(name = "dircode", value = "鐩綍", dataType = "String", paramType = "query", example = ""), - @ApiImplicitParam(name = "type", 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 = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = ""), + @Parameter(name = "dircode", description = "鐩綍", in = ParameterIn.QUERY, example = ""), + @Parameter(name = "type", 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<PublishEntity>> selectByPageAndCount(String name, String dircode, String type, Integer pageSize, Integer pageIndex) { @@ -224,9 +226,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<PublishEntity> selectById(int id) { @@ -240,9 +242,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨLas鏂囦欢鍧愭爣绯籌D") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ids", value = "鍏冩暟鎹甀D闆嗗悎", dataType = "Integer[]", paramType = "query", example = "10483,10481,10456,10285") + @Operation(summary = "鏌ヨLas鏂囦欢鍧愭爣绯籌D") + @Parameters({ + @Parameter(name = "ids", description = "鍏冩暟鎹甀D闆嗗悎", schema = @Schema(type = "array"), in = ParameterIn.QUERY, example = "10483,10481,10456,10285") }) @GetMapping(value = "/selectLasCs") public ResponseMsg<Object> selectLasCs(Integer[] ids, HttpServletRequest req) { @@ -265,9 +267,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鏍呮牸鏁版嵁鐨勫潗鏍囩郴ID") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ids", value = "鍏冩暟鎹甀D闆嗗悎", dataType = "Integer[]", paramType = "query", example = "10531,10527,10526") + @Operation(summary = "鏌ヨ鏍呮牸鏁版嵁鐨勫潗鏍囩郴ID") + @Parameters({ + @Parameter(name = "ids", description = "鍏冩暟鎹甀D闆嗗悎", schema = @Schema(type = "array"), in = ParameterIn.QUERY, example = "10531,10527,10526") }) @GetMapping(value = "/selectRasterCs") public ResponseMsg<Object> selectRasterCs(Integer[] ids, HttpServletRequest req) { @@ -313,11 +315,11 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍧愭爣杞崲") - @ApiImplicitParams({ - @ApiImplicitParam(name = "x", value = "X鍧愭爣", dataType = "double", paramType = "query", example = "400925.079"), - @ApiImplicitParam(name = "y", value = "Y鍧愭爣", dataType = "double", paramType = "query", example = "2541768.173"), - @ApiImplicitParam(name = "epsg", value = "EPSG缂栫爜", dataType = "int", paramType = "query", example = "4548") + @Operation(summary = "鏌ヨ鍧愭爣杞崲") + @Parameters({ + @Parameter(name = "x", description = "X鍧愭爣", in = ParameterIn.QUERY, example = "400925.079"), + @Parameter(name = "y", description = "Y鍧愭爣", in = ParameterIn.QUERY, example = "2541768.173"), + @Parameter(name = "epsg", description = "EPSG缂栫爜", in = ParameterIn.QUERY, example = "4548") }) @GetMapping(value = "/selectCsTransform") public Object selectCsTransform(double x, double y, int epsg) { @@ -329,9 +331,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆鍙戝竷鏁版嵁") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "PubEntity", paramType = "body") + @Operation(summary = "鎻掑叆鍙戝竷鏁版嵁") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insertForPub", produces = "application/json; charset=UTF-8") public ResponseMsg<Object> insertForPub(@RequestBody PubEntity entity, HttpServletRequest req) { @@ -384,9 +386,9 @@ } @SysLog() - @ApiOperation(value = "鍒犻櫎澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "Integer", paramType = "query", allowMultiple = true, example = "1") + @Operation(summary = "鍒犻櫎澶氭潯") + @Parameters({ + @Parameter(name = "ids", description = "ID鏁扮粍", in = ParameterIn.QUERY, schema = @Schema(type = "array"), example = "1") }) @GetMapping(value = "/deletes") public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids, HttpServletRequest req) { @@ -414,9 +416,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "PublishEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") 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") diff --git a/se-system/src/main/java/com/terra/system/controller/data/TaskController.java b/se-system/src/main/java/com/terra/system/controller/data/TaskController.java index a45818d..e71d1e9 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/TaskController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/TaskController.java @@ -10,11 +10,12 @@ import com.terra.system.service.data.PublishService; import com.terra.system.service.data.TaskService; 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 io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -25,7 +26,7 @@ * 浠诲姟 * @author WWW */ -@Api(tags = "鏁版嵁绠$悊\\浠诲姟绠$悊") +@Tag(name = "鏁版嵁绠$悊\\浠诲姟绠$悊") @RestController @RequestMapping("/task") public class TaskController extends BaseController { @@ -39,13 +40,13 @@ PublishService publishService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "浠诲姟鍚嶇О", dataType = "String", paramType = "query", example = ""), - @ApiImplicitParam(name = "status", value = "浠诲姟鐘舵��", dataType = "Integer", paramType = "query", example = "1"), - @ApiImplicitParam(name = "type", 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 = "name", description = "浠诲姟鍚嶇О", in = ParameterIn.QUERY, example = ""), + @Parameter(name = "status", description = "浠诲姟鐘舵��", in = ParameterIn.QUERY, example = "1"), + @Parameter(name = "type", 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<TaskEntity>> selectByPageAndCount(String name, Integer status, String type, Integer pageSize, Integer pageIndex) { @@ -68,9 +69,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<TaskEntity> selectById(int id) { @@ -84,9 +85,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "TaskEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody TaskEntity entity, HttpServletRequest req) { @@ -105,9 +106,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "TaskEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<TaskEntity> list, HttpServletRequest req) { @@ -128,9 +129,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) { @@ -144,9 +145,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) { @@ -164,9 +165,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 = "/deleteTask") public ResponseMsg<Object> deleteTask(int id, HttpServletRequest req) { @@ -198,9 +199,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "TaskEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -220,9 +221,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "TaskEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/data/VerController.java b/se-system/src/main/java/com/terra/system/controller/data/VerController.java index 07c914b..320c9ed 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/VerController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/VerController.java @@ -7,12 +7,14 @@ import com.terra.system.entity.sys.UserEntity; import com.terra.system.service.data.VerService; 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.util.List; @@ -22,7 +24,7 @@ * @author SWS * @date 2022-09.29 */ -@Api(tags = "鏁版嵁绠$悊\\鐗堟湰绠$悊") +@Tag(name = "鏁版嵁绠$悊\\鐗堟湰绠$悊") @RestController @RequestMapping("/ver") public class VerController extends BaseController { @@ -33,12 +35,12 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dirid", value = "鐩綍ID", dataType = "Integer", paramType = "query", example = "10"), - @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 = "dirid", description = "鐩綍ID", in = ParameterIn.QUERY, example = "10"), + @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<VerEntity>> selectByPageAndCount(Integer dirid, String name, Integer pageSize, Integer pageIndex) { @@ -61,9 +63,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "VersionEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @PostMapping(value = "/insertVersion", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertVersion(@RequestBody VerEntity entity, HttpServletRequest req) { @@ -82,9 +84,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "List<VersionEntity>", paramType = "body", example = "") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", schema = @Schema(type = "array"), example = "") }) @PostMapping(value = "/insertVersions", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertVersions(@RequestParam List<VerEntity> list, HttpServletRequest req) { @@ -105,9 +107,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 = "/deleteVersion") public ResponseMsg<Integer> deleteVersion(int id) { @@ -121,9 +123,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 = "/deleteVersions") public ResponseMsg<Integer> deleteVersions(@RequestParam List<Integer> ids) { @@ -139,9 +141,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "VersionEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @ResponseBody @PostMapping(value = "/updateVersion", produces = "application/json; charset=UTF-8") @@ -161,9 +163,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 = "/selectVersion") public ResponseMsg<VerEntity> selectVersion(int id) { @@ -177,7 +179,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectVersionAll") public ResponseMsg<List<VerEntity>> selectVersionAll() { try { diff --git a/se-system/src/main/java/com/terra/system/controller/data/WmtsController.java b/se-system/src/main/java/com/terra/system/controller/data/WmtsController.java index 33055cc..ed01730 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/WmtsController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/WmtsController.java @@ -4,10 +4,11 @@ import com.terra.system.config.PropertiesConfig; import com.terra.system.helper.StringHelper; import com.terra.system.helper.WebHelper; -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 io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.tags.Tag; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.annotation.Resource; @@ -36,7 +37,7 @@ * WMTS鏈嶅姟 * @author WWW */ -@Api(tags = "鏁版嵁绠$悊\\WMTS鏈嶅姟") +@Tag(name = "鏁版嵁绠$悊\\WMTS鏈嶅姟") @RestController @RequestMapping("/wmts") public class WmtsController { @@ -46,9 +47,9 @@ private final static Log log = LogFactory.getLog(WmtsController.class); @SysLog() - @ApiOperation(value = "鑾峰彇WMTS鍏冩暟鎹�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "浠ょ墝", required = true, dataType = "String", defaultValue = "token", paramType = "path") + @Operation(summary = "鑾峰彇WMTS鍏冩暟鎹�") + @Parameters({ + @Parameter(name = "token", description = "浠ょ墝", required = true, example = "token", in = ParameterIn.PATH) }) @GetMapping("select/{token}/WMTSCapabilities.xml") public void selectWmtsCapabilities(@PathVariable(name = "token") String token, HttpServletRequest req, HttpServletResponse res) { @@ -78,13 +79,13 @@ } } - @ApiOperation(value = "鑾峰彇WMTS鐡︾墖") - @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "浠ょ墝", required = true, dataType = "String", defaultValue = "token", paramType = "path"), - @ApiImplicitParam(name = "layer", value = "鍥惧眰绫诲瀷", required = true, dataType = "String", defaultValue = "img"), - @ApiImplicitParam(name = "tilematrix", value = "灞傜骇", required = true, dataType = "Integer"), - @ApiImplicitParam(name = "tilerow", value = "琛屽彿", required = true, dataType = "Integer"), - @ApiImplicitParam(name = "tilecol", value = "鍒楀彿", required = true, dataType = "Integer") + @Operation(summary = "鑾峰彇WMTS鐡︾墖") + @Parameters({ + @Parameter(name = "token", description = "浠ょ墝", required = true, example = "token", in = ParameterIn.PATH), + @Parameter(name = "layer", description = "鍥惧眰绫诲瀷", required = true, example = "img"), + @Parameter(name = "tilematrix", description = "灞傜骇", required = true), + @Parameter(name = "tilerow", description = "琛屽彿", required = true), + @Parameter(name = "tilecol", description = "鍒楀彿", required = true) }) @GetMapping("select/{token}/tile") public void selectWmtsTile(@PathVariable(name = "token") String token, HttpServletRequest req, HttpServletResponse res) { diff --git a/se-system/src/main/java/com/terra/system/controller/data/upload/CheckController.java b/se-system/src/main/java/com/terra/system/controller/data/upload/CheckController.java index 8ca6ef5..a3e1ee4 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/upload/CheckController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/upload/CheckController.java @@ -10,10 +10,12 @@ import com.terra.system.helper.PathHelper; import com.terra.system.helper.StringHelper; import com.terra.system.service.data.FmeService; -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 org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -38,9 +40,9 @@ protected FmeService fmeService; @SysLog() - @ApiOperation(value = "鏌ヨ浠诲姟鐘舵��") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "浠诲姟ID", dataType = "String", paramType = "query", example = "29db09ee-2aae-4c62-bec0-0b5c5d8084e4") + @Operation(summary = "鏌ヨ浠诲姟鐘舵��") + @Parameters({ + @Parameter(name = "id", description = "浠诲姟ID", in = ParameterIn.QUERY, example = "29db09ee-2aae-4c62-bec0-0b5c5d8084e4") }) @GetMapping(value = "/selectTaskStatus") public Object selectTaskStatus(String id, HttpServletRequest req) { @@ -56,9 +58,9 @@ } @SysLog() - @ApiOperation(value = "涓嬭浇璐ㄦ缁撴灉") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "浠诲姟ID", dataType = "String", paramType = "query", example = "29db09ee-2aae-4c62-bec0-0b5c5d8084e4") + @Operation(summary = "涓嬭浇璐ㄦ缁撴灉") + @Parameters({ + @Parameter(name = "id", description = "浠诲姟ID", in = ParameterIn.QUERY, example = "29db09ee-2aae-4c62-bec0-0b5c5d8084e4") }) @GetMapping(value = "/downloadResult") public void downloadResult(String id, HttpServletRequest req, HttpServletResponse res) { @@ -76,9 +78,9 @@ } @SysLog() - @ApiOperation(value = "鎻愪氦鏁版嵁璐ㄦ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "FME璇锋眰瀹炰綋绫�", dataType = "FmeReqEntity", paramType = "body") + @Operation(summary = "鎻愪氦鏁版嵁璐ㄦ") + @Parameters({ + @Parameter(name = "entity", description = "FME璇锋眰瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/uploadChecks") @@ -167,7 +169,7 @@ } /*@SysLog() - @ApiOperation(value = "鏌ヨOSGB妫�鏌�") + @Operation(summary = "鏌ヨOSGB妫�鏌�") @GetMapping(value = "/selectCheckOsgb") public ResponseMsg<Object> selectCheckOsgb(HttpServletRequest req) { try { @@ -188,7 +190,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ琛ㄦ牸鏁版嵁妫�鏌�") + @Operation(summary = "鏌ヨ琛ㄦ牸鏁版嵁妫�鏌�") @GetMapping(value = "/selectCheckXls") public ResponseMsg<Object> selectCheckXls(HttpServletRequest req) { try { @@ -209,7 +211,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鐐逛簯妫�鏌�") + @Operation(summary = "鏌ヨ鐐逛簯妫�鏌�") @GetMapping(value = "/selectCheckLaz") public ResponseMsg<Object> selectCheckLaz(HttpServletRequest req) { try { @@ -230,7 +232,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ楂樼▼妫�鏌�") + @Operation(summary = "鏌ヨ楂樼▼妫�鏌�") @GetMapping(value = "/selectCheckDem") public ResponseMsg<Object> selectCheckDem(HttpServletRequest req) { try { @@ -252,7 +254,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ灞炴�ф鏌�") + @Operation(summary = "鏌ヨ灞炴�ф鏌�") @GetMapping(value = "/selectCheckAttrs") public ResponseMsg<Object> selectCheckAttrs(HttpServletRequest req) { try { @@ -273,7 +275,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎷撴墤妫�鏌�") + @Operation(summary = "鏌ヨ鎷撴墤妫�鏌�") @GetMapping(value = "/selectCheckTopology") public ResponseMsg<Object> selectCheckTopology(HttpServletRequest req) { try { @@ -300,7 +302,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍥鹃潰鏁撮グ妫�鏌�") + @Operation(summary = "鏌ヨ鍥鹃潰鏁撮グ妫�鏌�") @GetMapping(value = "/selectCheckDecorate") public ResponseMsg<Object> selectCheckDecorate(HttpServletRequest req) { try { @@ -321,7 +323,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍘熺偣妫�鏌�") + @Operation(summary = "鏌ヨ鍘熺偣妫�鏌�") @GetMapping(value = "/selectCheckOrigin") public ResponseMsg<Object> selectCheckOrigin(HttpServletRequest req) { try { @@ -341,7 +343,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鏍呮牸妫�鏌�") + @Operation(summary = "鏌ヨ鏍呮牸妫�鏌�") @GetMapping(value = "/selectCheckDom") public ResponseMsg<Object> selectCheckDom(HttpServletRequest req) { try { @@ -364,7 +366,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鏁板鍩虹妫�鏌�") + @Operation(summary = "鏌ヨ鏁板鍩虹妫�鏌�") @GetMapping(value = "/selectCheckMath") public ResponseMsg<Object> selectCheckMath(HttpServletRequest req) { try { @@ -385,7 +387,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍏冩暟鎹鏌�") + @Operation(summary = "鏌ヨ鍏冩暟鎹鏌�") @GetMapping(value = "/selectCheckMeta") public ResponseMsg<Object> selectCheckMeta(HttpServletRequest req) { try { @@ -406,7 +408,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎬昏川妫�") + @Operation(summary = "鏌ヨ鎬昏川妫�") @GetMapping(value = "/selectCheckMain") public ResponseMsg<Object> selectCheckMain(HttpServletRequest req) { try { @@ -430,7 +432,7 @@ } @SysLog() - @ApiOperation(value = "閫昏緫涓�鑷存�ф鏌�") + @Operation(summary = "閫昏緫涓�鑷存�ф鏌�") @GetMapping(value = "/checkLogical") public ResponseMsg<Object> checkLogical(HttpServletRequest req) { try { @@ -451,7 +453,7 @@ } @SysLog() - @ApiOperation(value = "鍗曢」鎴愭灉瀹屾暣鎬ф鏌�") + @Operation(summary = "鍗曢」鎴愭灉瀹屾暣鎬ф鏌�") @GetMapping(value = "/checkSingleIntegrity") public ResponseMsg<Object> checkSingleIntegrity(HttpServletRequest req) { try { @@ -473,7 +475,7 @@ }*/ @SysLog() - @ApiOperation(value = "鏈嶅姟娉ㄥ唽") + @Operation(summary = "鏈嶅姟娉ㄥ唽") @GetMapping(value = "/selectServerRegister") public ResponseMsg<Object> selectServerRegister(HttpServletRequest req) { try { @@ -489,10 +491,10 @@ } @SysLog() - @ApiOperation(value = "鏈嶅姟鐢宠") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鏈嶅姟ID", dataType = "String", paramType = "query", example = "195f77eb-19dd-4e34-afc1-fcff8f758f7b"), - @ApiImplicitParam(name = "pubid", value = "鍙戝竷ID", dataType = "Integer", paramType = "query", example = "1"), + @Operation(summary = "鏈嶅姟鐢宠") + @Parameters({ + @Parameter(name = "id", description = "鏈嶅姟ID", in = ParameterIn.QUERY, example = "195f77eb-19dd-4e34-afc1-fcff8f758f7b"), + @Parameter(name = "pubid", description = "鍙戝竷ID", in = ParameterIn.QUERY, example = "1"), }) @GetMapping(value = "/selectServerApply") public ResponseMsg<Object> selectServerApply(String id, Integer pubid, HttpServletRequest req) { @@ -506,9 +508,9 @@ } @SysLog() - @ApiOperation(value = "鍒犻櫎璧勬簮") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鏈嶅姟ID", dataType = "String", paramType = "query", example = "6f4b6783-4b98-4d46-a0d9-43cdb5f339dc") + @Operation(summary = "鍒犻櫎璧勬簮") + @Parameters({ + @Parameter(name = "id", description = "鏈嶅姟ID", in = ParameterIn.QUERY, example = "6f4b6783-4b98-4d46-a0d9-43cdb5f339dc") }) @GetMapping(value = "/selectDeleteRes") public ResponseMsg<Object> selectDeleteRes(String id, HttpServletRequest req) { diff --git a/se-system/src/main/java/com/terra/system/controller/data/upload/QueryController.java b/se-system/src/main/java/com/terra/system/controller/data/upload/QueryController.java index 90defdd..60199dd 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/upload/QueryController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/upload/QueryController.java @@ -18,10 +18,12 @@ import com.terra.system.service.data.*; import com.terra.system.service.sys.DepService; import com.terra.system.service.sys.TokenService; -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 org.springframework.web.bind.annotation.GetMapping; import javax.servlet.http.HttpServletRequest; @@ -57,12 +59,12 @@ DictService dictService; @SysLog() - @ApiOperation(value = "鏍规嵁鐖禝D鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "metaid", value = "鐖禝D", dataType = "String", paramType = "query", example = "0"), - @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 = "鏍规嵁鐖禝D鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") + @Parameters({ + @Parameter(name = "metaid", description = "鐖禝D", in = ParameterIn.QUERY, example = "0"), + @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 = "/selectPageAndCountByPid") public ResponseMsg<List<MetaEntity>> selectPageAndCountByPid(Integer metaid, String name, Integer pageSize, Integer pageIndex) { @@ -88,7 +90,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈夊崟浣�") + @Operation(summary = "鏌ヨ鎵�鏈夊崟浣�") @GetMapping(value = "/selectDepAll") public ResponseMsg<List<DepEntity>> selectDepAll() { try { @@ -101,7 +103,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈夌洰褰�") + @Operation(summary = "鏌ヨ鎵�鏈夌洰褰�") @GetMapping(value = "/selectDirAll") public ResponseMsg<List<DirEntity>> selectDirAll() { try { @@ -114,9 +116,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鐩綍ID鏌ヨ鐗堟湰鍒楄〃") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dirid", value = "鐩綍ID", dataType = "Integer", paramType = "query") + @Operation(summary = "鏍规嵁鐩綍ID鏌ヨ鐗堟湰鍒楄〃") + @Parameters({ + @Parameter(name = "dirid", description = "鐩綍ID", in = ParameterIn.QUERY) }) @GetMapping(value = "/selectVerByDirid") public ResponseMsg<List<VerEntity>> selectVerByDirid(Integer dirid) { @@ -137,9 +139,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍧愭爣绯�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "zoning", value = "甯﹀彿", dataType = "String", paramType = "query", example = "6搴︽湁甯﹀彿") + @Operation(summary = "鏌ヨ鍧愭爣绯�") + @Parameters({ + @Parameter(name = "zoning", description = "甯﹀彿", in = ParameterIn.QUERY, example = "6搴︽湁甯﹀彿") }) @GetMapping(value = "/selectCoords") public ResponseMsg<Object> selectCoords(String zoning) { @@ -153,7 +155,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ椤圭洰鍚嶇О") + @Operation(summary = "鏌ヨ椤圭洰鍚嶇О") @GetMapping(value = "/selectProject") public ResponseMsg<Object> selectProject() { try { @@ -166,10 +168,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈夎〃") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "鐐�"), - @ApiImplicitParam(name = "hasGeom", value = "鍚湁Geom瀛楁", dataType = "Boolean", paramType = "query", example = "false") + @Operation(summary = "鏌ヨ鎵�鏈夎〃") + @Parameters({ + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = "鐐�"), + @Parameter(name = "hasGeom", description = "鍚湁Geom瀛楁", in = ParameterIn.QUERY, example = "false") }) @GetMapping(value = "/selectTabs") public ResponseMsg<List<TabEntity>> selectTabs(String name, Boolean hasGeom) { @@ -183,10 +185,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ瀛楁淇℃伅") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ns", value = "鍚嶇О绌洪棿", dataType = "String", paramType = "query", example = "bd"), - @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "dlg25wAanp") + @Operation(summary = "鏌ヨ瀛楁淇℃伅") + @Parameters({ + @Parameter(name = "ns", description = "鍚嶇О绌洪棿", in = ParameterIn.QUERY, example = "bd"), + @Parameter(name = "tab", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "dlg25wAanp") }) @GetMapping(value = "/selectFields") public ResponseMsg<List<DictEntity>> selectFields(String ns, String tab) { @@ -204,11 +206,11 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ琛ㄤ腑鏁版嵁") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鍏冩暟鎹甀D", dataType = "Integer", paramType = "query", example = "115"), - @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1"), - @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10") + @Operation(summary = "鏌ヨ琛ㄤ腑鏁版嵁") + @Parameters({ + @Parameter(name = "id", description = "鍏冩暟鎹甀D", in = ParameterIn.QUERY, example = "115"), + @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1"), + @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10") }) @GetMapping(value = "/selectDbData") public ResponseMsg<Object> selectDbData(Integer id, Integer pageIndex, Integer pageSize) { @@ -243,11 +245,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ涓婁紶鏁版嵁骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @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 = "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 = "/selectByPageForUpload") public ResponseMsg<Object> selectByPageForUpload(String name, Integer pageSize, Integer pageIndex, HttpServletRequest req) { @@ -272,9 +274,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鍏冩暟鎹甀D鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") + @Operation(summary = "鏍规嵁鍏冩暟鎹甀D鏌ヨ") + @Parameters({ + @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectMetaById") public ResponseMsg<MetaEntity> selectMetaById(int id) { diff --git a/se-system/src/main/java/com/terra/system/controller/data/upload/UploadController.java b/se-system/src/main/java/com/terra/system/controller/data/upload/UploadController.java index 939d3c4..49a7968 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/upload/UploadController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/upload/UploadController.java @@ -11,12 +11,14 @@ import com.terra.system.helper.StringHelper; import com.terra.system.service.all.UploadAttachService; import com.terra.system.service.data.UploadService; -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 javax.servlet.http.HttpServletResponse; @@ -26,7 +28,7 @@ * 鏁版嵁鍏ュ簱 * @author WWW */ -@Api(tags = "鏁版嵁绠$悊\\鏁版嵁涓婁紶") +@Tag(name = "鏁版嵁绠$悊\\鏁版嵁涓婁紶") @RestController @RequestMapping("/dataUpload") public class UploadController extends QueryController { @@ -37,7 +39,7 @@ UploadAttachService uploadAttachService; @SysLog() - @ApiOperation(value = "鏌ヨ璺緞") + @Operation(summary = "鏌ヨ璺緞") @GetMapping(value = "/selectPath") public ResponseMsg<String> selectPath() { try { @@ -51,9 +53,9 @@ } @SysLog() - @ApiOperation(value = "涓婁紶鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "path", value = "璺緞", dataType = "String", paramType = "query") + @Operation(summary = "涓婁紶鏂囦欢") + @Parameters({ + @Parameter(name = "path", description = "璺緞", in = ParameterIn.QUERY) }) @ResponseBody @PostMapping(value = "/uploadFiles") @@ -79,10 +81,10 @@ * formData.append("ids", 1209); formData.append("ids", 1180); formData.append("ids", 1387); */ @SysLog() - @ApiOperation(value = "涓婁紶Excel闄勪欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "path", value = "璺緞", dataType = "String", paramType = "query"), - @ApiImplicitParam(name = "ids", value = "鍏冩暟鎹泦鍚�", dataType = "Integer", allowMultiple = true, paramType = "query") + @Operation(summary = "涓婁紶Excel闄勪欢") + @Parameters({ + @Parameter(name = "path", description = "璺緞", in = ParameterIn.QUERY), + @Parameter(name = "ids", description = "鍏冩暟鎹泦鍚�", schema = @Schema(type = "array"), in = ParameterIn.QUERY) }) @ResponseBody @PostMapping(value = "/uploadXlsAnnex") @@ -118,9 +120,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "path", value = "璺緞", dataType = "String", paramType = "query") + @Operation(summary = "鏌ヨ鏂囦欢") + @Parameters({ + @Parameter(name = "path", description = "璺緞", in = ParameterIn.QUERY) }) @GetMapping(value = "/selectFiles") public ResponseMsg<List<MetaFileEntity>> selectFiles(String path) { @@ -134,9 +136,9 @@ } @SysLog() - @ApiOperation(value = "鍒犻櫎鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MetaEntity", paramType = "body") + @Operation(summary = "鍒犻櫎鏂囦欢") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/deleteFiles") @@ -159,12 +161,12 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鏄犲皠") - @ApiImplicitParams({ - @ApiImplicitParam(name = "path", value = "璺緞", dataType = "String", paramType = "query", example = "20230722"), - @ApiImplicitParam(name = "dirid", value = "鐩綍ID", dataType = "Integer", paramType = "query", example = "1"), - @ApiImplicitParam(name = "verid", value = "鐗堟湰ID", dataType = "Integer", paramType = "query", example = "0"), - @ApiImplicitParam(name = "epsgCode", value = "鍧愭爣缂栫爜", dataType = "String", paramType = "query", example = "EPSG:4490") + @Operation(summary = "鏌ヨ鏄犲皠") + @Parameters({ + @Parameter(name = "path", description = "璺緞", in = ParameterIn.QUERY, example = "20230722"), + @Parameter(name = "dirid", description = "鐩綍ID", in = ParameterIn.QUERY, example = "1"), + @Parameter(name = "verid", description = "鐗堟湰ID", in = ParameterIn.QUERY, example = "0"), + @Parameter(name = "epsgCode", description = "鍧愭爣缂栫爜", in = ParameterIn.QUERY, example = "EPSG:4490") }) @GetMapping(value = "/selectMappers") public ResponseMsg<Object> selectMappers(String path, Integer dirid, Integer verid, String epsgCode, HttpServletRequest req) { @@ -194,9 +196,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "鍏冩暟鎹枃浠堕泦鍚�", dataType = "MetaFileEntity", paramType = "body") + @Operation(summary = "鎻掑叆鏂囦欢") + @Parameters({ + @Parameter(name = "list", description = "鍏冩暟鎹枃浠堕泦鍚�") }) @ResponseBody @PostMapping(value = "/insertFiles") @@ -219,9 +221,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆KML鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "鍏冩暟鎹枃浠堕泦鍚�", dataType = "MetaFileEntity", paramType = "body") + @Operation(summary = "鎻掑叆KML鏂囦欢") + @Parameters({ + @Parameter(name = "list", description = "鍏冩暟鎹枃浠堕泦鍚�") }) @ResponseBody @PostMapping(value = "/insertKml") @@ -244,9 +246,9 @@ } @SysLog() - @ApiOperation(value = "鍒犻櫎鍏冩暟鎹�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "Integer", paramType = "query", allowMultiple = true, example = "1") + @Operation(summary = "鍒犻櫎鍏冩暟鎹�") + @Parameters({ + @Parameter(name = "ids", description = "ID鏁扮粍", in = ParameterIn.QUERY, schema = @Schema(type = "array"), example = "1") }) @GetMapping(value = "/deleteMetas") public ResponseMsg<Integer> deleteMetas(@RequestParam List<Integer> ids) { diff --git a/se-system/src/main/java/com/terra/system/controller/show/ApplyController.java b/se-system/src/main/java/com/terra/system/controller/show/ApplyController.java index dfafc95..ac556b8 100644 --- a/se-system/src/main/java/com/terra/system/controller/show/ApplyController.java +++ b/se-system/src/main/java/com/terra/system/controller/show/ApplyController.java @@ -19,12 +19,13 @@ import com.terra.system.service.sys.DownlogService; import com.terra.system.service.sys.TokenService; import com.terra.system.service.sys.UserService; -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 javax.servlet.http.HttpServletResponse; @@ -35,7 +36,7 @@ * 鏁版嵁鐢宠 * @author WWW */ -@Api(tags = "缁煎悎灞曠ず\\鏁版嵁鐢宠") +@Tag(name = "缁煎悎灞曠ず\\鏁版嵁鐢宠") @RestController @RequestMapping("/apply") public class ApplyController extends BaseController { @@ -58,9 +59,9 @@ DownloadService downloadService; @SysLog() - @ApiOperation(value = "鎻掑叆鏁版嵁鐢宠") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dr", value = "璇锋眰涓嬭浇瀹炰綋", dataType = "DownloadReqEntity", paramType = "body") + @Operation(summary = "鎻掑叆鏁版嵁鐢宠") + @Parameters({ + @Parameter(name = "dr", description = "璇锋眰涓嬭浇瀹炰綋") }) @ResponseBody @PostMapping(value = "/insertApply") @@ -96,14 +97,14 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ鐢宠") - @ApiImplicitParams({ - @ApiImplicitParam(name = "uname", value = "鐢ㄦ埛鍚�", dataType = "String", paramType = "query", example = "鍛�"), - @ApiImplicitParam(name = "status", value = "鐘舵��", dataType = "Integer", paramType = "query", example = "0"), - @ApiImplicitParam(name = "start", value = "寮�濮嬫椂闂�", dataType = "Timestamp", paramType = "query", example = "2022-12-09 09:00:00"), - @ApiImplicitParam(name = "end", value = "缁撴潫鏃堕棿", dataType = "Timestamp", paramType = "query", example = "2022-12-31 23: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 = "status", description = "鐘舵��", in = ParameterIn.QUERY, example = "0"), + @Parameter(name = "start", description = "寮�濮嬫椂闂�", in = ParameterIn.QUERY, example = "2022-12-09 09:00:00"), + @Parameter(name = "end", description = "缁撴潫鏃堕棿", in = ParameterIn.QUERY, example = "2022-12-31 23: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<Object> selectByPage(String uname, Integer status, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex, HttpServletRequest req) { @@ -127,7 +128,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ寰呭鏍告暟") + @Operation(summary = "鏌ヨ寰呭鏍告暟") @GetMapping(value = "/selectSubmits") public ResponseMsg<Object> selectSubmits(HttpServletRequest req) { try { @@ -141,9 +142,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ娴佺▼") - @ApiImplicitParams({ - @ApiImplicitParam(name = "applyid", value = "鏁版嵁鐢宠ID", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "鏌ヨ娴佺▼") + @Parameters({ + @Parameter(name = "applyid", description = "鏁版嵁鐢宠ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectFlows") public ResponseMsg<Object> selectFlows(Integer applyid) { @@ -157,9 +158,9 @@ } @SysLog() - @ApiOperation(value = "搴熷純鐢宠") - @ApiImplicitParams({ - @ApiImplicitParam(name = "applyid", value = "鏁版嵁鐢宠ID", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "搴熷純鐢宠") + @Parameters({ + @Parameter(name = "applyid", description = "鏁版嵁鐢宠ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/updateForDiscard") public ResponseMsg<Object> updateForDiscard(Integer applyid, HttpServletRequest req) { @@ -182,9 +183,9 @@ } @SysLog() - @ApiOperation(value = "閲嶆柊鎻愪氦") - @ApiImplicitParams({ - @ApiImplicitParam(name = "applyid", value = "鏁版嵁鐢宠ID", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "閲嶆柊鎻愪氦") + @Parameters({ + @Parameter(name = "applyid", description = "鏁版嵁鐢宠ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/updateForResubmit") public ResponseMsg<Object> updateForResubmit(Integer applyid, HttpServletRequest req) { @@ -207,9 +208,9 @@ } @SysLog() - @ApiOperation(value = "鎻愪氦娴佺▼") - @ApiImplicitParams({ - @ApiImplicitParam(name = "flowId", value = "鐢宠娴佺▼ID", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "鎻愪氦娴佺▼") + @Parameters({ + @Parameter(name = "flowId", description = "鐢宠娴佺▼ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/updateForSubmit") public ResponseMsg<Object> updateForSubmit(Integer flowId, HttpServletRequest req) { @@ -246,9 +247,9 @@ } @SysLog() - @ApiOperation(value = "鎵撳洖娴佺▼") - @ApiImplicitParams({ - @ApiImplicitParam(name = "flowId", value = "鐢宠娴佺▼ID", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "鎵撳洖娴佺▼") + @Parameters({ + @Parameter(name = "flowId", description = "鐢宠娴佺▼ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/updateForReject") public ResponseMsg<Object> updateForReject(Integer flowId, HttpServletRequest req) { @@ -279,9 +280,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) }) @ResponseBody @GetMapping(value = "/downloadFile") diff --git a/se-system/src/main/java/com/terra/system/controller/show/ComprehensiveController.java b/se-system/src/main/java/com/terra/system/controller/show/ComprehensiveController.java index 5ba370e..3b0ba99 100644 --- a/se-system/src/main/java/com/terra/system/controller/show/ComprehensiveController.java +++ b/se-system/src/main/java/com/terra/system/controller/show/ComprehensiveController.java @@ -25,11 +25,14 @@ import com.terra.system.service.sys.AttachService; 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.*; @@ -41,7 +44,7 @@ * 缁煎悎灞曠ず * @author WWW */ -@Api(tags = "缁煎悎灞曠ず\\棣栭〉") +@Tag(name = "缁煎悎灞曠ず\\棣栭〉") @RestController @RequestMapping("/comprehensive") public class ComprehensiveController extends ModelController { @@ -79,9 +82,9 @@ UploadAttachService uploadAttachService; @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 = "/selectPubById") public ResponseMsg<PublishEntity> selectPubById(int id) { @@ -95,9 +98,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 = "/selectPipelines") public ResponseMsg<Object> selectPipelines(String name) { @@ -111,12 +114,12 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ璺綉") - @ApiImplicitParams({ - @ApiImplicitParam(name = "x1", value = "X1", dataType = "Double", paramType = "query", example = "116.78999"), - @ApiImplicitParam(name = "y1", value = "Y1", dataType = "Double", paramType = "query", example = "39.9468"), - @ApiImplicitParam(name = "x2", value = "X2", dataType = "Double", paramType = "query", example = "116.80458"), - @ApiImplicitParam(name = "y2", value = "Y2", dataType = "Double", paramType = "query", example = "39.94758") + @Operation(summary = "鏌ヨ璺綉") + @Parameters({ + @Parameter(name = "x1", description = "X1", in = ParameterIn.QUERY, example = "116.78999"), + @Parameter(name = "y1", description = "Y1", in = ParameterIn.QUERY, example = "39.9468"), + @Parameter(name = "x2", description = "X2", in = ParameterIn.QUERY, example = "116.80458"), + @Parameter(name = "y2", description = "Y2", in = ParameterIn.QUERY, example = "39.94758") }) @GetMapping(value = "/selectRoute") public ResponseMsg<Object> selectRoute(double x1, double y1, double x2, double y2) { @@ -130,7 +133,7 @@ } @SysLog() - @ApiOperation(value = "涓婁紶ShapeFile鏂囦欢") + @Operation(summary = "涓婁紶ShapeFile鏂囦欢") @ResponseBody @PostMapping(value = "/uploadShp", produces = "application/json; charset=UTF-8") public ResponseMsg<Object> uploadShp(HttpServletRequest req, HttpServletResponse res) { @@ -154,9 +157,9 @@ } @SysLog() - @ApiOperation(value = "涓嬭浇ShapeFile鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "鏍囩粯JSON瀹炰綋绫婚泦鍚�", dataType = "MarkJsonEntity", paramType = "body") + @Operation(summary = "涓嬭浇ShapeFile鏂囦欢") + @Parameters({ + @Parameter(name = "list", description = "鏍囩粯JSON瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/downloadShp", produces = "application/json; charset=UTF-8") @@ -182,11 +185,11 @@ } @SysLog() - @ApiOperation(value = "涓婁紶鏂囦欢") + @Operation(summary = "涓婁紶鏂囦欢") @ResponseBody - @ApiImplicitParams({ - @ApiImplicitParam(name = "tabName", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "lf.sys_style"), - @ApiImplicitParam(name = "eventid", value = "涓婚敭", dataType = "String", paramType = "query", example = "fa25979a5ef8b43ba82a0be35b3fb0d4") + @Parameters({ + @Parameter(name = "tabName", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "lf.sys_style"), + @Parameter(name = "eventid", description = "涓婚敭", in = ParameterIn.QUERY, example = "fa25979a5ef8b43ba82a0be35b3fb0d4") }) @PostMapping(value = "/uploadFiles") public ResponseMsg<Integer> uploadFiles(String tabName, String eventid, @RequestParam("file") MultipartFile[] files, HttpServletRequest req) { @@ -208,9 +211,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) { @@ -236,9 +239,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) { @@ -246,9 +249,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") @@ -268,10 +271,10 @@ } @SysLog() - @ApiOperation(value = "璇锋眰涓嬭浇") - @ApiImplicitParams({ - @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "body", example = "bd.b_borehole"), - @ApiImplicitParam(name = "guids", value = "闄勪欢Guid鏁扮粍", dataType = "String", paramType = "body", allowMultiple = true, example = "08e5b4ad-93b8-46f6-adaa-46a6274af4ce,6f94f4f8-6e8d-44e7-8803-3d068d34983f") + @Operation(summary = "璇锋眰涓嬭浇") + @Parameters({ + @Parameter(name = "tab", description = "琛ㄥ悕", example = "bd.b_borehole"), + @Parameter(name = "guids", description = "闄勪欢Guid鏁扮粍", schema = @Schema(type = "array"), example = "08e5b4ad-93b8-46f6-adaa-46a6274af4ce,6f94f4f8-6e8d-44e7-8803-3d068d34983f") }) @ResponseBody @PostMapping(value = "/downloadReqForTabGuids") @@ -294,10 +297,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "tabName", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "lf.sys_style"), - @ApiImplicitParam(name = "eventid", value = "涓婚敭", dataType = "String", paramType = "query", example = "fa25979a5ef8b43ba82a0be35b3fb0d4") + @Operation(summary = "鏌ヨ鏂囦欢") + @Parameters({ + @Parameter(name = "tabName", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "lf.sys_style"), + @Parameter(name = "eventid", description = "涓婚敭", in = ParameterIn.QUERY, example = "fa25979a5ef8b43ba82a0be35b3fb0d4") }) @GetMapping(value = "/selectFiles") public ResponseMsg<List<AttachEntity>> selectFiles(String tabName, String eventid) { @@ -315,9 +318,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> deleteFiles(@RequestParam List<Integer> ids) { diff --git a/se-system/src/main/java/com/terra/system/controller/show/DataLibController.java b/se-system/src/main/java/com/terra/system/controller/show/DataLibController.java index 21fb2d4..20ac6b1 100644 --- a/se-system/src/main/java/com/terra/system/controller/show/DataLibController.java +++ b/se-system/src/main/java/com/terra/system/controller/show/DataLibController.java @@ -22,12 +22,13 @@ import com.terra.system.service.data.VerService; import com.terra.system.service.show.DataLibService; 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 javax.servlet.http.HttpServletResponse; @@ -40,7 +41,7 @@ * 璧勬枡棣� * @author WWW */ -@Api(tags = "缁煎悎灞曠ず\\璧勬枡棣�") +@Tag(name = "缁煎悎灞曠ず\\璧勬枡棣�") @RestController @RequestMapping("/dataLib") public class DataLibController extends BaseQueryController { @@ -60,9 +61,9 @@ VerService verService; @SysLog() - @ApiOperation(value = "鏍规嵁鐩綍ID鏌ヨ鐗堟湰鍒楄〃") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dirid", value = "鐩綍ID", dataType = "Integer", paramType = "query") + @Operation(summary = "鏍规嵁鐩綍ID鏌ヨ鐗堟湰鍒楄〃") + @Parameters({ + @Parameter(name = "dirid", description = "鐩綍ID", in = ParameterIn.QUERY) }) @GetMapping(value = "/selectVerByDirid") public ResponseMsg<List<VerEntity>> selectVerByDirid(Integer dirid) { @@ -83,14 +84,14 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ鍏冩暟鎹�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "depcode", value = "鍗曚綅缂栫爜", dataType = "String", paramType = "query", example = "00"), - @ApiImplicitParam(name = "types", value = "璧勬枡绫诲埆", dataType = "String", paramType = "query", example = "鍩虹娴嬬粯,鍩虹鍦扮伨,鍩虹鍕樺療,鍚堣鏁版嵁,绠$悊鏁版嵁,娴嬬粯锛圗SV锛�,鍕樺療锛圗GE锛�,鍦扮伨锛圗GD锛�,娲炲簱锛圗GD锛�"), - @ApiImplicitParam(name = "dirs", value = "椤圭洰缂栫爜", dataType = "String", paramType = "query", example = ""), - @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 = "depcode", description = "鍗曚綅缂栫爜", in = ParameterIn.QUERY, example = "00"), + @Parameter(name = "types", description = "璧勬枡绫诲埆", in = ParameterIn.QUERY, example = "鍩虹娴嬬粯,鍩虹鍦扮伨,鍩虹鍕樺療,鍚堣鏁版嵁,绠$悊鏁版嵁,娴嬬粯锛圗SV锛�,鍕樺療锛圗GE锛�,鍦扮伨锛圗GD锛�,娲炲簱锛圗GD锛�"), + @Parameter(name = "dirs", description = "椤圭洰缂栫爜", in = ParameterIn.QUERY, example = ""), + @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 = "/selectMetasForPage") public ResponseMsg<Object> selectMetasForPage(String depcode, String types, String dirs, String name, Integer pageSize, Integer pageIndex) { @@ -115,11 +116,11 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ琛ㄤ腑鏁版嵁") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鍏冩暟鎹甀D", dataType = "Integer", paramType = "query", example = "115"), - @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1"), - @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10") + @Operation(summary = "鏌ヨ琛ㄤ腑鏁版嵁") + @Parameters({ + @Parameter(name = "id", description = "鍏冩暟鎹甀D", in = ParameterIn.QUERY, example = "115"), + @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1"), + @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10") }) @GetMapping(value = "/selectDbData") public ResponseMsg<Object> selectDbData(Integer id, Integer pageIndex, Integer pageSize) { @@ -154,9 +155,9 @@ } @SysLog() - @ApiOperation(value = "璇锋眰鍏冩暟鎹笅杞�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dr", value = "璇锋眰涓嬭浇瀹炰綋", dataType = "DownloadReqEntity", paramType = "body") + @Operation(summary = "璇锋眰鍏冩暟鎹笅杞�") + @Parameters({ + @Parameter(name = "dr", description = "璇锋眰涓嬭浇瀹炰綋") }) @ResponseBody @PostMapping(value = "/downloadReq") @@ -185,10 +186,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ涓嬭浇鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "guid", value = "鏂囦欢GUID", dataType = "String", paramType = "query"), - @ApiImplicitParam(name = "pwd", value = "瀵嗙爜", dataType = "String", paramType = "query") + @Operation(summary = "鏌ヨ涓嬭浇鏂囦欢") + @Parameters({ + @Parameter(name = "guid", description = "鏂囦欢GUID", in = ParameterIn.QUERY), + @Parameter(name = "pwd", description = "瀵嗙爜", in = ParameterIn.QUERY) }) @GetMapping(value = "/selectDownloadFile") public ResponseMsg<Boolean> selectDownloadFile(String guid, String pwd) { @@ -223,10 +224,10 @@ } @SysLog() - @ApiOperation(value = "涓嬭浇鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "guid", value = "鏂囦欢GUID", dataType = "String", paramType = "query"), - @ApiImplicitParam(name = "pwd", value = "瀵嗙爜", dataType = "String", paramType = "query") + @Operation(summary = "涓嬭浇鏂囦欢") + @Parameters({ + @Parameter(name = "guid", description = "鏂囦欢GUID", in = ParameterIn.QUERY), + @Parameter(name = "pwd", description = "瀵嗙爜", in = ParameterIn.QUERY) }) @ResponseBody @GetMapping(value = "/downloadFile") diff --git a/se-system/src/main/java/com/terra/system/controller/show/ExportController.java b/se-system/src/main/java/com/terra/system/controller/show/ExportController.java index c17dd56..6e3492e 100644 --- a/se-system/src/main/java/com/terra/system/controller/show/ExportController.java +++ b/se-system/src/main/java/com/terra/system/controller/show/ExportController.java @@ -13,12 +13,13 @@ import com.terra.system.service.show.ExportService; 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.tags.Tag; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -28,7 +29,7 @@ * 鍦ㄧ嚎鍒跺浘 * @author WWW */ -@Api(tags = "缁煎悎灞曠ず\\鍦ㄧ嚎鍒跺浘") +@Tag(name = "缁煎悎灞曠ず\\鍦ㄧ嚎鍒跺浘") @RestController @RequestMapping("/export") public class ExportController extends BaseController { @@ -45,11 +46,11 @@ DownloadService downloadService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ涓嬭浇鏂囦欢") - @ApiImplicitParams({ - @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 = "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 = "/selectByPage") public ResponseMsg<List<DownloadEntity>> selectPageCountForDownload(String name, Integer pageSize, Integer pageIndex, HttpServletRequest req) { @@ -76,9 +77,9 @@ } @SysLog() - @ApiOperation(value = "鏂板缓鍑哄浘") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "鍦ㄧ嚎鍒跺浘瀹炰綋绫�", dataType = "ExportEntity", paramType = "body") + @Operation(summary = "鏂板缓鍑哄浘") + @Parameters({ + @Parameter(name = "entity", description = "鍦ㄧ嚎鍒跺浘瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/insertMap", produces = "application/json; charset=UTF-8") @@ -106,9 +107,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) { diff --git a/se-system/src/main/java/com/terra/system/controller/show/InquiryController.java b/se-system/src/main/java/com/terra/system/controller/show/InquiryController.java index 1be30dc..a346f49 100644 --- a/se-system/src/main/java/com/terra/system/controller/show/InquiryController.java +++ b/se-system/src/main/java/com/terra/system/controller/show/InquiryController.java @@ -19,12 +19,13 @@ import com.terra.system.service.data.PublishService; import com.terra.system.service.show.InquiryService; 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 javax.servlet.http.HttpServletResponse; @@ -34,7 +35,7 @@ * 鏌ヨ * @author WWW */ -@Api(tags = "缁煎悎灞曠ず\\鏌ヨ") +@Tag(name = "缁煎悎灞曠ず\\鏌ヨ") @RestController @RequestMapping("/inquiry") public class InquiryController extends BaseQueryController { @@ -51,7 +52,7 @@ PublishService publishService; @SysLog() - @ApiOperation(value = "涓婁紶Shp鏂囦欢璇诲彇绗竴鏉¤褰曠殑WKT") + @Operation(summary = "涓婁紶Shp鏂囦欢璇诲彇绗竴鏉¤褰曠殑WKT") @ResponseBody @PostMapping(value = "/uploadShp") public ResponseMsg<ShpRecordEntity> uploadShp(HttpServletRequest req, HttpServletResponse res) { @@ -78,9 +79,9 @@ } @SysLog() - @ApiOperation(value = "涓嬭浇鐡︾墖") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dt", value = "涓嬭浇鐡︾墖瀹炰綋绫�", dataType = "DownloadTileEntity", paramType = "body") + @Operation(summary = "涓嬭浇鐡︾墖") + @Parameters({ + @Parameter(name = "dt", description = "涓嬭浇鐡︾墖瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/downloadTiles") @@ -115,9 +116,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) }) @ResponseBody @GetMapping(value = "/downloadFile") diff --git a/se-system/src/main/java/com/terra/system/controller/show/MarkController.java b/se-system/src/main/java/com/terra/system/controller/show/MarkController.java index 566d79b..056c8e6 100644 --- a/se-system/src/main/java/com/terra/system/controller/show/MarkController.java +++ b/se-system/src/main/java/com/terra/system/controller/show/MarkController.java @@ -10,12 +10,13 @@ import com.terra.system.service.show.MarkService; 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.tags.Tag; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.util.List; @@ -24,7 +25,7 @@ * 鏍囩粯 * @author WWW */ -@Api(tags = "缁煎悎灞曠ず\\鏍囩粯") +@Tag(name = "缁煎悎灞曠ず\\鏍囩粯") @RestController @RequestMapping("/mark") public class MarkController extends BaseController { @@ -44,10 +45,10 @@ DownloadService downloadService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @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 = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10"), + @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectByPageAndCount") public ResponseMsg<List<MarkEntity>> selectByPageAndCount(Integer pageSize, Integer pageIndex, HttpServletRequest req) { @@ -74,9 +75,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<MarkEntity> selectById(int id) { @@ -90,9 +91,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MarkEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody MarkEntity entity, HttpServletRequest req) { @@ -111,9 +112,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MarkEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<MarkEntity> list, HttpServletRequest req) { @@ -134,9 +135,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) { @@ -150,9 +151,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) { @@ -170,9 +171,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MarkEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -192,9 +193,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MarkEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/show/ModelController.java b/se-system/src/main/java/com/terra/system/controller/show/ModelController.java index c769836..080322c 100644 --- a/se-system/src/main/java/com/terra/system/controller/show/ModelController.java +++ b/se-system/src/main/java/com/terra/system/controller/show/ModelController.java @@ -8,11 +8,12 @@ import com.terra.system.helper.StringHelper; import com.terra.system.service.show.ModelService; import com.terra.system.service.sys.TokenService; -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 org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.util.List; @@ -29,11 +30,11 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ妯″瀷骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "layerid", value = "鍥惧眰ID", 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 = "layerid", description = "鍥惧眰ID", 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 = "/selectModelByPageAndCount") public ResponseMsg<List<ModelEntity>> selectModelByPageAndCount(Integer layerid, Integer pageSize, Integer pageIndex) { @@ -56,9 +57,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 = "/selectModelById") public ResponseMsg<ModelEntity> selectModelById(int id) { @@ -72,10 +73,10 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁Guid鏌ヨ妯″瀷") - @ApiImplicitParams({ - @ApiImplicitParam(name = "layerid", value = "鍥惧眰ID", dataType = "Integer", paramType = "query", example = ""), - @ApiImplicitParam(name = "modelid", value = "妯″瀷ID", dataType = "String", paramType = "query", example = "") + @Operation(summary = "鏍规嵁Guid鏌ヨ妯″瀷") + @Parameters({ + @Parameter(name = "layerid", description = "鍥惧眰ID", in = ParameterIn.QUERY, example = ""), + @Parameter(name = "modelid", description = "妯″瀷ID", in = ParameterIn.QUERY, example = "") }) @GetMapping(value = "/selectModelByGuid") public ResponseMsg<ModelEntity> selectModelByGuid(Integer layerid, String modelid) { @@ -93,9 +94,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�涓ā鍨�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "ModelEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�涓ā鍨�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insertModel", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertModel(@RequestBody ModelEntity entity, HttpServletRequest req) { @@ -114,9 +115,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氫釜妯″瀷") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "ModelEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氫釜妯″瀷") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/insertModels", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertModels(@RequestBody List<ModelEntity> list, HttpServletRequest req) { @@ -137,9 +138,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 = "/deleteModel") public ResponseMsg<Integer> deleteModel(int id) { @@ -153,9 +154,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 = "/deleteModels") public ResponseMsg<Integer> deleteModels(@RequestParam List<Integer> ids) { @@ -173,9 +174,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�涓ā鍨�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "ModelEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�涓ā鍨�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/updateModel", produces = "application/json; charset=UTF-8") @@ -195,9 +196,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氫釜妯″瀷") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "ModelEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氫釜妯″瀷") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updateModels", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/sys/ArgsController.java b/se-system/src/main/java/com/terra/system/controller/sys/ArgsController.java index 561c0cb..7835d24 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/ArgsController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/ArgsController.java @@ -7,12 +7,13 @@ import com.terra.system.entity.sys.UserEntity; import com.terra.system.service.sys.ArgsService; 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; @@ -21,7 +22,7 @@ * 鍙傛暟璁剧疆 * @author WWW */ -@Api(tags = "杩愮淮绠$悊\\绯荤粺閰嶇疆") +@Tag(name = "杩愮淮绠$悊\\绯荤粺閰嶇疆") @RestController @RequestMapping("/args") public class ArgsController extends BaseController { @@ -32,9 +33,9 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", required = false, example = "鏈夋晥鏈�") + @Operation(summary = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, required = false, example = "鏈夋晥鏈�") }) @GetMapping({"/selectCount"}) public ResponseMsg<Integer> selectCount(String name) { @@ -48,11 +49,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ") - @ApiImplicitParams({ - @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 = "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 = "/selectByPage") public ResponseMsg<List<ArgsEntity>> selectByPage(String name, Integer pageSize, Integer pageIndex) { @@ -70,11 +71,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @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 = "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<ArgsEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) { @@ -95,7 +96,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectAll") public ResponseMsg<List<ArgsEntity>> selectAll() { try { @@ -108,9 +109,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<ArgsEntity> selectById(int id) { @@ -124,9 +125,9 @@ } /*@SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "ArgsEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", dataType = "ArgsEntity") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody ArgsEntity entity, HttpServletRequest req) { @@ -145,9 +146,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "ArgsEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", dataType = "ArgsEntity") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<ArgsEntity> list, HttpServletRequest req) { @@ -168,9 +169,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) { @@ -184,9 +185,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) { @@ -204,9 +205,9 @@ }*/ @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "ArgsEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -238,9 +239,9 @@ } /*@SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "ArgsEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", dataType = "ArgsEntity") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/sys/AuthController.java b/se-system/src/main/java/com/terra/system/controller/sys/AuthController.java index dc93e47..4e13b5f 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/AuthController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/AuthController.java @@ -8,12 +8,14 @@ import com.terra.system.service.all.PermsService; import com.terra.system.service.sys.AuthService; 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.util.List; @@ -23,7 +25,7 @@ * @author SWS * @date 2022-09.28 */ -@Api(tags = "杩愮淮绠$悊\\鏉冮檺绠$悊") +@Tag(name = "杩愮淮绠$悊\\鏉冮檺绠$悊") @RestController @RequestMapping("/auth") public class AuthController extends BaseController { @@ -37,9 +39,9 @@ PermsService permsService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", required = false, example = "sys_auth") + @Operation(summary = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, required = false, example = "sys_auth") }) @GetMapping({"/selectCount"}) public ResponseMsg<Integer> selectCount(String name) { @@ -53,11 +55,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "sys_auth"), - @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 = "sys_auth"), + @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<AuthEntity>> selectByPage(String name, Integer pageSize, Integer pageIndex) { @@ -73,11 +75,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", 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 = "name", description = "鍚嶇О", 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<List<AuthEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) { @@ -100,11 +102,11 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鑿滃崟鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "menuid", 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 = "menuid", 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 = "/selectByPageForMenu") public ResponseMsg<List<AuthEntity>> selectByPageForMenu(Integer menuid, Integer pageSize, Integer pageIndex) { @@ -127,9 +129,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "AuthEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @PostMapping(value = "/insertAuth", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertAuth(@RequestBody AuthEntity entity, HttpServletRequest req) { @@ -151,9 +153,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "List<AuthEntity>", paramType = "body", example = "") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", schema = @Schema(type = "array"), example = "") }) @PostMapping(value = "/insertAuths", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertAuths(@RequestBody List<AuthEntity> list, HttpServletRequest req) { @@ -177,9 +179,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 = "/deleteAuth") public ResponseMsg<Integer> deleteAuth(int id) { @@ -196,9 +198,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 = "/deleteAuths") public ResponseMsg<Integer> deleteAuths(@RequestParam List<Integer> ids) { @@ -219,9 +221,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "LoginEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", schema = @Schema(type = "array"), example = "") }) @ResponseBody @PostMapping(value = "/updateAuth", produces = "application/json; charset=UTF-8") @@ -244,9 +246,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 = "/selectAuth") public ResponseMsg<AuthEntity> selectAuth(int id) { @@ -260,7 +262,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectAuthAll") public ResponseMsg<List<AuthEntity>> selectAuthAll() { try { diff --git a/se-system/src/main/java/com/terra/system/controller/sys/BlacklistController.java b/se-system/src/main/java/com/terra/system/controller/sys/BlacklistController.java index c4fa28b..f21728d 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/BlacklistController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/BlacklistController.java @@ -7,12 +7,13 @@ import com.terra.system.entity.sys.UserEntity; import com.terra.system.service.sys.BlacklistService; 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; @@ -21,7 +22,7 @@ * 榛戝悕鍗� * @author WWW */ -@Api(tags = "杩愮淮绠$悊\\榛戝悕鍗�") +@Tag(name = "杩愮淮绠$悊\\榛戝悕鍗�") @RestController @RequestMapping("/blacklist") public class BlacklistController extends BaseController { @@ -32,10 +33,10 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ip", value = "IP鍦板潃", dataType = "String", paramType = "query", required = false, example = "192."), - @ApiImplicitParam(name = "type", value = "绫诲埆", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "ip", description = "IP鍦板潃", in = ParameterIn.QUERY, required = false, example = "192."), + @Parameter(name = "type", description = "绫诲埆", in = ParameterIn.QUERY, example = "1") }) @GetMapping({"/selectCount"}) public ResponseMsg<Integer> selectCount(String ip, Integer type) { @@ -49,12 +50,12 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ip", value = "IP鍦板潃", dataType = "String", paramType = "query", example = "192."), - @ApiImplicitParam(name = "type", value = "绫诲埆", 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 = "ip", description = "IP鍦板潃", in = ParameterIn.QUERY, example = "192."), + @Parameter(name = "type", description = "绫诲埆", 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 = "/selectByPage") public ResponseMsg<List<BlacklistEntity>> selectByPage(String ip, Integer type, Integer pageSize, Integer pageIndex) { @@ -72,12 +73,12 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ip", value = "IP鍦板潃", dataType = "String", paramType = "query", required = false, example = "192."), - @ApiImplicitParam(name = "type", value = "绫诲埆", 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 = "ip", description = "IP鍦板潃", in = ParameterIn.QUERY, required = false, example = "192."), + @Parameter(name = "type", description = "绫诲埆", 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<List<BlacklistEntity>> selectByPageAndCount(String ip, Integer type, Integer pageSize, Integer pageIndex) { @@ -98,7 +99,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectAll") public ResponseMsg<List<BlacklistEntity>> selectAll() { try { @@ -111,9 +112,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<BlacklistEntity> selectById(int id) { @@ -127,9 +128,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "BlacklistEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody BlacklistEntity entity, HttpServletRequest req) { @@ -148,9 +149,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "BlacklistEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<BlacklistEntity> list, HttpServletRequest req) { @@ -171,9 +172,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) { @@ -187,9 +188,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) { @@ -207,9 +208,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "BlacklistEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -229,9 +230,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "BlacklistEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/sys/CtrlController.java b/se-system/src/main/java/com/terra/system/controller/sys/CtrlController.java index ef004dd..a03240d 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/CtrlController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/CtrlController.java @@ -6,9 +6,12 @@ import com.terra.system.entity.all.ResponseMsg; import com.terra.system.entity.sys.ResEntity; import com.terra.system.service.all.ScheduleService; -import io.swagger.annotations.Api; -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.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -21,7 +24,7 @@ * @author WWW * @date 2022-09-21 */ -@Api(tags = "杩愮淮绠$悊\\鎺у埗鍙�") +@Tag(name = "杩愮淮绠$悊\\鎺у埗鍙�") @RestController @RequestMapping("/ctrl") public class CtrlController extends BaseController { @@ -29,7 +32,7 @@ private ScheduleService scheduleService; @SysLog() - @ApiOperation(value = "鏌ヨ鏈嶅姟鍣ㄧ姸鎬�") + @Operation(summary = "鏌ヨ鏈嶅姟鍣ㄧ姸鎬�") @GetMapping(value = "/selectServerStatus") public ResponseMsg<JSONObject> selectServerStatus() { try { @@ -42,7 +45,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨCpu淇℃伅") + @Operation(summary = "鏌ヨCpu淇℃伅") @GetMapping(value = "/selectCpuInfo") public ResponseMsg<JSONObject> selectCpuInfo() { try { @@ -55,7 +58,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍐呭瓨淇℃伅") + @Operation(summary = "鏌ヨ鍐呭瓨淇℃伅") @GetMapping(value = "/selectMemInfo") public ResponseMsg<JSONObject> selectMemInfo() { try { @@ -68,7 +71,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍦ㄧ嚎鐢ㄦ埛") + @Operation(summary = "鏌ヨ鍦ㄧ嚎鐢ㄦ埛") @GetMapping(value = "/selectOnlineUsers") public ResponseMsg<List<JSONObject>> selectOnlineUsers() { try { @@ -81,7 +84,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鏈嶅姟璧勬簮鐘舵��") + @Operation(summary = "鏌ヨ鏈嶅姟璧勬簮鐘舵��") @GetMapping(value = "/selectResStatus") public ResponseMsg<List<ResEntity>> selectResStatus() { try { diff --git a/se-system/src/main/java/com/terra/system/controller/sys/DepController.java b/se-system/src/main/java/com/terra/system/controller/sys/DepController.java index 9d9e4e5..132190c 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/DepController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/DepController.java @@ -8,12 +8,13 @@ import com.terra.system.helper.StringHelper; 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.List; @@ -23,7 +24,7 @@ * @author sws * @date 2022-09-23 */ -@Api(tags = "杩愮淮绠$悊\\鍗曚綅绠$悊") +@Tag(name = "杩愮淮绠$悊\\鍗曚綅绠$悊") @RestController @RequestMapping("/dep") public class DepController extends BaseController { @@ -34,9 +35,9 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "DepEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @PostMapping(value = "/insertDep", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertDep(@RequestBody DepEntity entity, HttpServletRequest req) { @@ -55,9 +56,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "DepEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", example = "") }) @PostMapping(value = "/insertDes", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertDes(@RequestBody List<DepEntity> list, HttpServletRequest req) { @@ -78,9 +79,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 = "/deleteDep") public ResponseMsg<Integer> deleteDep(int id) { @@ -94,9 +95,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 = "/deleteDeps") public ResponseMsg<Integer> deleteDeps(@RequestParam List<Integer> ids) { @@ -114,9 +115,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "DepEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @ResponseBody @PostMapping(value = "/updateDep", produces = "application/json; charset=UTF-8") @@ -136,9 +137,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "DepEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updateDeps", produces = "application/json; charset=UTF-8") @@ -160,9 +161,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 = "/selectDep") public ResponseMsg<DepEntity> selectDep(int id) { @@ -175,7 +176,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈夋暟鎹�") + @Operation(summary = "鏌ヨ鎵�鏈夋暟鎹�") @GetMapping(value = "/selectDepAll") public ResponseMsg<List<DepEntity>> selectDepAll() { try { @@ -187,9 +188,9 @@ } @SysLog() - @ApiOperation(value = "閫掑綊鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍗曚綅鍚嶇О", dataType = "String", paramType = "query", required = false, example = "涓浗xxx宸ョ▼鏈夐檺鍏徃") + @Operation(summary = "閫掑綊鏌ヨ") + @Parameters({ + @Parameter(name = "name", description = "鍗曚綅鍚嶇О", in = ParameterIn.QUERY, required = false, example = "涓浗xxx宸ョ▼鏈夐檺鍏徃") }) @GetMapping(value = "/selectDepRecursive") public ResponseMsg<List<DepEntity>> selectDepRecursive(String name) { diff --git a/se-system/src/main/java/com/terra/system/controller/sys/DownlogController.java b/se-system/src/main/java/com/terra/system/controller/sys/DownlogController.java index ce45b83..894425b 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/DownlogController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/DownlogController.java @@ -6,12 +6,13 @@ import com.terra.system.entity.sys.DownlogEntity; 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.tags.Tag; import org.springframework.web.bind.annotation.*; import java.sql.Timestamp; import java.util.List; @@ -20,7 +21,7 @@ * 涓嬭浇鏃ュ織 * @author WWW */ -@Api(tags = "杩愮淮绠$悊\\涓嬭浇鏃ュ織") +@Tag(name = "杩愮淮绠$悊\\涓嬭浇鏃ュ織") @RestController @RequestMapping("/downlog") public class DownlogController extends BaseController { @@ -31,14 +32,14 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "uname", value = "鐢ㄦ埛鍚�", dataType = "String", paramType = "query", example = "鍛�"), - @ApiImplicitParam(name = "type", value = "绫诲瀷", dataType = "Integer", paramType = "query", example = "3"), - @ApiImplicitParam(name = "start", value = "寮�濮嬫椂闂�", dataType = "Timestamp", paramType = "query", example = "2022-12-09 09:00:00"), - @ApiImplicitParam(name = "end", value = "缁撴潫鏃堕棿", dataType = "Timestamp", paramType = "query", example = "2022-12-25 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 = "3"), + @Parameter(name = "start", description = "寮�濮嬫椂闂�", in = ParameterIn.QUERY, example = "2022-12-09 09:00:00"), + @Parameter(name = "end", description = "缁撴潫鏃堕棿", in = ParameterIn.QUERY, example = "2022-12-25 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<Object> selectByPageAndCount(String uname, Integer type, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex) { diff --git a/se-system/src/main/java/com/terra/system/controller/sys/LayerController.java b/se-system/src/main/java/com/terra/system/controller/sys/LayerController.java index 46fb208..f875281 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/LayerController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/LayerController.java @@ -8,17 +8,18 @@ import com.terra.system.service.all.PermsService; import com.terra.system.service.sys.LayerService; 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 io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.util.List; -@Api(tags = "杩愮淮绠$悊\\鍥惧眰绠$悊") +@Tag(name = "杩愮淮绠$悊\\鍥惧眰绠$悊") @RestController @SuppressWarnings("ALL") @RequestMapping("/layer") @@ -33,11 +34,11 @@ PermsService permsService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @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 = "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<LayerEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) { @@ -60,7 +61,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectAll") public ResponseMsg<List<LayerEntity>> selectAll(Integer flag) { try { @@ -73,9 +74,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<LayerEntity> selectById(int id) { @@ -89,9 +90,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "LayerEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody LayerEntity entity, HttpServletRequest req) { @@ -111,9 +112,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "LayerEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<LayerEntity> list, HttpServletRequest req) { @@ -135,9 +136,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) { @@ -152,9 +153,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) { @@ -173,9 +174,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "LayerEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -196,9 +197,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "LayerEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/sys/LoginController.java b/se-system/src/main/java/com/terra/system/controller/sys/LoginController.java index 1a2ca2e..5bbb40e 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/LoginController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/LoginController.java @@ -7,12 +7,14 @@ import com.terra.system.entity.sys.UserEntity; import com.terra.system.service.sys.LoginService; 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("/login") public class LoginController 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<LoginEntity>> selectByPage(String uname, Integer type, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex) { @@ -77,14 +79,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<LoginEntity>> selectByPageAndCount(String uname, Integer type, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex) { @@ -107,9 +109,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "LoginEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @PostMapping(value = "/insertLogin", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertLogin(@RequestBody LoginEntity entity, HttpServletRequest req) { @@ -128,9 +130,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "List<LoginEntity>", paramType = "body", example = "") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", schema = @Schema(type = "array"), example = "") }) @PostMapping(value = "/insertLogins", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertLogins(@RequestBody List<LoginEntity> list, HttpServletRequest req) { @@ -151,9 +153,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 = "/deleteLogin") public ResponseMsg<Integer> deleteLogin(int id) { @@ -167,9 +169,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 = "/deleteLogins") public ResponseMsg<Integer> deleteLogins(@RequestParam List<Integer> ids) { @@ -185,9 +187,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "LoginEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @ResponseBody @PostMapping(value = "/updateLogin", produces = "application/json; charset=UTF-8") @@ -207,9 +209,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 = "/selectLogin") public ResponseMsg<LoginEntity> selectLogin(int id) { @@ -223,7 +225,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectLoginAll") public ResponseMsg<List<LoginEntity>> selectLoginAll() { try { diff --git a/se-system/src/main/java/com/terra/system/controller/sys/MenuAuthController.java b/se-system/src/main/java/com/terra/system/controller/sys/MenuAuthController.java index 3035312..b7b08dc 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/MenuAuthController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/MenuAuthController.java @@ -8,12 +8,13 @@ import com.terra.system.service.all.PermsService; import com.terra.system.service.sys.MenuAuthService; 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; @@ -22,7 +23,7 @@ * 鑿滃崟-鏉冮檺 * @author WWW */ -@Api(tags = "杩愮淮绠$悊\\鑿滃崟鏉冮檺") +@Tag(name = "杩愮淮绠$悊\\鑿滃崟鏉冮檺") @RestController @RequestMapping("/menuAuth") public class MenuAuthController extends BaseController { @@ -36,9 +37,9 @@ PermsService permsService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "menuid", value = "鑿滃崟ID", dataType = "Integer", paramType = "query", required = false, example = "") + @Operation(summary = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "menuid", description = "鑿滃崟ID", in = ParameterIn.QUERY, required = false, example = "") }) @GetMapping({"/selectCount"}) public ResponseMsg<Integer> selectCount(Integer menuid) { @@ -52,11 +53,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "menuid", value = "鑿滃崟ID", 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 = "menuid", description = "鑿滃崟ID", 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 = "/selectByPage") public ResponseMsg<List<MenuAuthEntity>> selectByPage(Integer menuid, Integer pageSize, Integer pageIndex) { @@ -74,11 +75,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "menuid", value = "鑿滃崟ID", 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 = "menuid", description = "鑿滃崟ID", 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<MenuAuthEntity>> selectByPageAndCount(Integer menuid, Integer pageSize, Integer pageIndex) { @@ -99,12 +100,12 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁瑙掕壊ID+鑿滃崟ID鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", dataType = "Integer", paramType = "query", example = "1"), - @ApiImplicitParam(name = "menuid", 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 = "鏍规嵁瑙掕壊ID+鑿滃崟ID鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") + @Parameters({ + @Parameter(name = "roleid", description = "瑙掕壊ID", in = ParameterIn.QUERY, example = "1"), + @Parameter(name = "menuid", 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<MenuAuthEntity>> selectByPageForRole(Integer roleid, Integer menuid, Integer pageSize, Integer pageIndex) { @@ -113,12 +114,12 @@ return fail("姣忛〉椤垫暟鎴栧垎椤垫暟灏忎簬1", null); } - int count = menuAuthService.selectCountForRole(roleid, menuid); + int count = menuAuthService.selectCountForRole(roleid, menuid); if (count == 0) { return success(0, null); } - List<MenuAuthEntity> rs = menuAuthService.selectByPageForRole(roleid, menuid, pageSize, pageSize * (pageIndex - 1)); + List<MenuAuthEntity> rs = menuAuthService.selectByPageForRole(roleid, menuid, pageSize, pageSize * (pageIndex - 1)); return success(count, rs); } catch (Exception ex) { @@ -127,7 +128,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectAll") public ResponseMsg<List<MenuAuthEntity>> selectAll() { try { @@ -140,9 +141,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<MenuAuthEntity> selectById(int id) { @@ -156,9 +157,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MenuAuthEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody MenuAuthEntity entity, HttpServletRequest req) { @@ -180,9 +181,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MenuAuthEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<MenuAuthEntity> list, HttpServletRequest req) { @@ -206,9 +207,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) { @@ -225,9 +226,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) { @@ -248,9 +249,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MenuAuthEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -273,9 +274,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MenuAuthEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/sys/MenuController.java b/se-system/src/main/java/com/terra/system/controller/sys/MenuController.java index c7e2a58..e131646 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/MenuController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/MenuController.java @@ -9,12 +9,14 @@ import com.terra.system.service.all.PermsService; import com.terra.system.service.sys.MenuService; 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.util.List; @@ -24,7 +26,7 @@ * @author sws * @date 2022-09-23 */ -@Api(tags= "杩愮淮绠$悊\\鑿滃崟绠$悊") +@Tag(name= "杩愮淮绠$悊\\鑿滃崟绠$悊") @RestController @RequestMapping("/menu") public class MenuController extends BaseController { @@ -38,9 +40,9 @@ PermsService permsService; @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MenusEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @PostMapping(value = "/insertMenu", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertMenu(@RequestBody MenuEntity entity, HttpServletRequest req) { @@ -62,9 +64,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MenusEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", example = "") }) @PostMapping(value = "/insertMenus", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertMenus(@RequestBody List<MenuEntity> list, HttpServletRequest req) { @@ -88,9 +90,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 = "/deleteMenu") public ResponseMsg<Integer> deleteMenu(int id) { @@ -107,9 +109,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 = "/deleteMenus") public ResponseMsg<Integer> deleteMenus(@RequestParam List<Integer> ids) { @@ -130,9 +132,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MenusEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @ResponseBody @PostMapping(value = "/updateMenu", produces = "application/json; charset=UTF-8") @@ -155,9 +157,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MenusEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", example = "") }) @ResponseBody @PostMapping(value = "/updateMenus", produces = "application/json; charset=UTF-8") @@ -182,9 +184,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 = "/selectMenu") public ResponseMsg<MenuEntity> selectMenu(int id) { @@ -198,7 +200,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectMenuAll") public ResponseMsg<List<MenuEntity>> selectMenuAll() { try { @@ -211,9 +213,9 @@ } @SysLog() - @ApiOperation(value = "閫掑綊鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鑿滃崟鍚嶇О", dataType = "String", paramType = "query", required = false, example = "绠¢亾鍩虹澶ф暟鎹钩鍙�") + @Operation(summary = "閫掑綊鏌ヨ") + @Parameters({ + @Parameter(name = "name", description = "鑿滃崟鍚嶇О", in = ParameterIn.QUERY, required = false, example = "绠¢亾鍩虹澶ф暟鎹钩鍙�") }) @GetMapping(value = "/selectMenuRecursive") public ResponseMsg<Object> selectMenuRecursive(String name) { 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 { diff --git a/se-system/src/main/java/com/terra/system/controller/sys/ReportController.java b/se-system/src/main/java/com/terra/system/controller/sys/ReportController.java index 200607f..d667939 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/ReportController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/ReportController.java @@ -8,10 +8,11 @@ import com.terra.system.service.all.UploadAttachService; import com.terra.system.service.sys.ReportService; 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 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.*; @@ -24,7 +25,7 @@ * 鎶ュ憡妯℃澘 * @author WWW */ -@Api(tags = "杩愮淮绠$悊\\妯℃澘绠$悊") +@Tag(name = "杩愮淮绠$悊\\妯℃澘绠$悊") @RestController @RequestMapping("/report") public class ReportController extends BaseController { @@ -40,11 +41,11 @@ private final static String TAB_NAME = "lf.sys_report"; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @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 = "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<ReportEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) { @@ -67,9 +68,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<ReportEntity> selectById(int id) { @@ -83,9 +84,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "ReportEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody ReportEntity entity, HttpServletRequest req) { @@ -104,9 +105,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) { @@ -120,9 +121,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) { @@ -140,9 +141,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "ReportEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -162,7 +163,7 @@ } @SysLog() - @ApiOperation(value = "涓婁紶鏂囦欢") + @Operation(summary = "涓婁紶鏂囦欢") @ResponseBody @PostMapping(value = "/upload") public ResponseMsg<String> upload(@RequestParam("file") MultipartFile file, HttpServletRequest req) { @@ -172,9 +173,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) { 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) { diff --git a/se-system/src/main/java/com/terra/system/controller/sys/ResLogController.java b/se-system/src/main/java/com/terra/system/controller/sys/ResLogController.java index 6f41731..15ebc57 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/ResLogController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/ResLogController.java @@ -7,10 +7,11 @@ import com.terra.system.entity.sys.UserEntity; import com.terra.system.service.sys.ResLogService; 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 io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -18,7 +19,7 @@ import java.util.List; @SuppressWarnings("ALL") -@Api(tags = "杩愮淮绠$悊\\璧勬簮鏃ュ織") +@Tag(name = "杩愮淮绠$悊\\璧勬簮鏃ュ織") @RestController @RequestMapping("/resLog") public class ResLogController extends BaseController { @@ -29,9 +30,9 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "resid", value = "璧勬簮ID", dataType = "Integer", paramType = "query", required = false, example = "") + @Operation(summary = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "resid", description = "璧勬簮ID", in = ParameterIn.QUERY, required = false, example = "") }) @GetMapping({"/selectCount"}) public ResponseMsg<Integer> selectCount(Integer resid) { @@ -45,11 +46,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "resid", value = "璧勬簮ID", 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 = "resid", description = "璧勬簮ID", 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 = "/selectByPage") public ResponseMsg<List<ResLogEntity>> selectByPage(Integer resid, Integer pageSize, Integer pageIndex) { @@ -67,11 +68,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "resid", value = "璧勬簮ID", 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 = "resid", description = "璧勬簮ID", 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<ResLogEntity>> selectByPageAndCount(Integer resid, Integer pageSize, Integer pageIndex) { @@ -94,9 +95,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<ResLogEntity> selectById(int id) { @@ -110,9 +111,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) { @@ -126,9 +127,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) { diff --git a/se-system/src/main/java/com/terra/system/controller/sys/ResOpController.java b/se-system/src/main/java/com/terra/system/controller/sys/ResOpController.java index 5ae18a7..d9c8fc8 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/ResOpController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/ResOpController.java @@ -7,12 +7,14 @@ import com.terra.system.entity.sys.UserEntity; import com.terra.system.service.sys.ResOpService; 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("/resOp") public class ResOpController extends BaseController { @@ -34,12 +36,12 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", 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 18:00:00"), + @Operation(summary = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "name", 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 18:00:00"), }) @GetMapping({"/selectCount"}) public ResponseMsg<Integer> selectCount(String name, Integer type, Timestamp start, Timestamp end) { @@ -53,14 +55,14 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", 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 18: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 = "name", 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 18: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<ResOpEntity>> selectByPage(String name, Integer type, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex) { @@ -76,14 +78,14 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", 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 18: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 = "name", 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 18: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<ResOpEntity>> selectByPageAndCount(String name, Integer type, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex) { @@ -106,9 +108,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "com.terra.system.entity.sys.ResOpEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @PostMapping(value = "/insertResOp", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertResOp(@RequestBody ResOpEntity entity, HttpServletRequest req) { @@ -127,9 +129,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "List<ResOpEntity>", paramType = "body", example = "") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", schema = @Schema(type = "array"), example = "") }) @PostMapping(value = "/insertResOps", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertResOps(@RequestBody List<ResOpEntity> 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 = "/deleteLogin") public ResponseMsg<Integer> deleteResOp(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 = "/deleteResOps") public ResponseMsg<Integer> deleteResOps(@RequestParam List<Integer> ids) { @@ -184,9 +186,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "ID鏁扮粍", dataType = "LoginEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "ID鏁扮粍", example = "") }) @ResponseBody @PostMapping(value = "/updateResOp", 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 = "/selectResOp") public ResponseMsg<ResOpEntity> selectResOp(int id) { @@ -222,7 +224,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectResOpAll") public ResponseMsg<List<ResOpEntity>> selectResOpAll() { try { diff --git a/se-system/src/main/java/com/terra/system/controller/sys/RoleController.java b/se-system/src/main/java/com/terra/system/controller/sys/RoleController.java index 9912fac..26ed8ab 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/RoleController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/RoleController.java @@ -8,12 +8,14 @@ import com.terra.system.service.all.PermsService; import com.terra.system.service.sys.RoleService; 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.util.List; @@ -23,7 +25,7 @@ * @author SWS * @date 2022-09.28 */ -@Api(tags = "杩愮淮绠$悊\\瑙掕壊绠$悊") +@Tag(name = "杩愮淮绠$悊\\瑙掕壊绠$悊") @RestController @RequestMapping("/role") public class RoleController extends BaseController { @@ -37,10 +39,10 @@ PermsService permsService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "Admin"), - @ApiImplicitParam(name = "depid", value = "鍗曚綅ID", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = "Admin"), + @Parameter(name = "depid", description = "鍗曚綅ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping({"/selectCount"}) public ResponseMsg<Integer> selectCount(String name, Integer depid) { @@ -54,12 +56,12 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "Admin"), - @ApiImplicitParam(name = "depid", 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 = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = "Admin"), + @Parameter(name = "depid", 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 = "/selectByPage") public ResponseMsg<List<RoleEntity>> selectByPage(String name, Integer depid, Integer pageSize, Integer pageIndex) { @@ -77,12 +79,12 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "Admin"), - @ApiImplicitParam(name = "depid", 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 = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = "Admin"), + @Parameter(name = "depid", 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<List<RoleEntity>> selectByPageAndCount(String name, Integer depid, Integer pageSize, Integer pageIndex) { @@ -105,9 +107,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "RoleEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @PostMapping(value = "/insertRole", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertRole(@RequestBody RoleEntity entity, HttpServletRequest req) { @@ -127,9 +129,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "List<RoleEntity>", paramType = "body", example = "") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", schema = @Schema(type = "array"), example = "") }) @PostMapping(value = "/insertRoles", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertRoles(@RequestBody List<RoleEntity> list, HttpServletRequest req) { @@ -151,9 +153,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 = "/deleteRole") public ResponseMsg<Integer> deleteRole(int id) { @@ -168,9 +170,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 = "/deleteAuths") public ResponseMsg<Integer> deleteRoles(@RequestParam List<Integer> ids) { @@ -189,9 +191,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "RoleEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @ResponseBody @PostMapping(value = "/updateRole", produces = "application/json; charset=UTF-8") @@ -212,9 +214,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 = "/selectRole") public ResponseMsg<RoleEntity> selectRole(int id) { @@ -228,7 +230,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectRoleAll") public ResponseMsg<List<RoleEntity>> selectRoleAll() { try { diff --git a/se-system/src/main/java/com/terra/system/controller/sys/RoleLayerController.java b/se-system/src/main/java/com/terra/system/controller/sys/RoleLayerController.java index c565867..5b80b63 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/RoleLayerController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/RoleLayerController.java @@ -9,10 +9,11 @@ import com.terra.system.service.all.PermsService; import com.terra.system.service.sys.RoleLayerService; 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 io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -20,7 +21,7 @@ import java.util.List; @SuppressWarnings("ALL") -@Api(tags = "杩愮淮绠$悊\\瑙掕壊鍥惧眰") +@Tag(name = "杩愮淮绠$悊\\瑙掕壊鍥惧眰") @RestController @RequestMapping("/roleLayer") public class RoleLayerController extends BaseController { @@ -34,9 +35,9 @@ PermsService permsService; @SysLog() - @ApiOperation(value = "鏍规嵁瑙掕壊ID鏌ヨ鍥惧眰") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "鏍规嵁瑙掕壊ID鏌ヨ鍥惧眰") + @Parameters({ + @Parameter(name = "roleid", description = "瑙掕壊ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectResByRole") public ResponseMsg<Object> selectLayersByRole(Integer roleid) { @@ -50,11 +51,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", 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 = "roleid", description = "瑙掕壊ID", 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<RoleLayerEntity>> selectByPageAndCount(Integer roleid, Integer pageSize, Integer pageIndex) { @@ -77,9 +78,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<RoleLayerEntity> selectById(int id) { @@ -93,9 +94,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "RoleLayerEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody RoleLayerEntity entity, HttpServletRequest req) { @@ -115,9 +116,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "RoleLayerEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<RoleLayerEntity> list, HttpServletRequest req) { @@ -139,9 +140,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) { @@ -156,9 +157,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) { @@ -177,9 +178,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "RoleLayerEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -200,9 +201,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "RoleLayerEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/sys/RoleMenuAuthController.java b/se-system/src/main/java/com/terra/system/controller/sys/RoleMenuAuthController.java index f03459e..f9fcf17 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/RoleMenuAuthController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/RoleMenuAuthController.java @@ -8,12 +8,13 @@ import com.terra.system.service.all.PermsService; import com.terra.system.service.sys.RoleMenuAuthService; 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; @@ -22,7 +23,7 @@ * 瑙掕壊-鑿滃崟 * @author WWW */ -@Api(tags = "杩愮淮绠$悊\\瑙掕壊鑿滃崟") +@Tag(name = "杩愮淮绠$悊\\瑙掕壊鑿滃崟") @RestController @RequestMapping("/roleMenuAuth") public class RoleMenuAuthController extends BaseController { @@ -36,9 +37,9 @@ PermsService permsService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", dataType = "Integer", paramType = "query", required = false, example = "") + @Operation(summary = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "roleid", description = "瑙掕壊ID", in = ParameterIn.QUERY, required = false, example = "") }) @GetMapping({"/selectCount"}) public ResponseMsg<Integer> selectCount(Integer roleid) { @@ -52,11 +53,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", 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 = "roleid", description = "瑙掕壊ID", 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 = "/selectByPage") public ResponseMsg<List<RoleMenuAuthEntity>> selectByPage(Integer roleid, Integer pageSize, Integer pageIndex) { @@ -74,11 +75,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", 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 = "roleid", description = "瑙掕壊ID", 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<RoleMenuAuthEntity>> selectByPageAndCount(Integer roleid, Integer pageSize, Integer pageIndex) { @@ -99,12 +100,12 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁瑙掕壊ID+鑿滃崟ID鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", dataType = "Integer", paramType = "query", example = "1"), - @ApiImplicitParam(name = "menuid", 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 = "鏍规嵁瑙掕壊ID+鑿滃崟ID鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") + @Parameters({ + @Parameter(name = "roleid", description = "瑙掕壊ID", in = ParameterIn.QUERY, example = "1"), + @Parameter(name = "menuid", 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<RoleMenuAuthEntity>> selectByPageForRole(Integer roleid, Integer menuid, Integer pageSize, Integer pageIndex) { @@ -127,7 +128,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectAll") public ResponseMsg<List<RoleMenuAuthEntity>> selectAll() { try { @@ -140,9 +141,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<RoleMenuAuthEntity> selectById(int id) { @@ -156,9 +157,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "RoleMenuAuthEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody RoleMenuAuthEntity entity, HttpServletRequest req) { @@ -180,9 +181,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "RoleMenuAuthEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<RoleMenuAuthEntity> list, HttpServletRequest req) { @@ -206,9 +207,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) { @@ -225,9 +226,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) { @@ -248,9 +249,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "RoleMenuAuthEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -273,9 +274,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "RoleMenuAuthEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/sys/RoleResController.java b/se-system/src/main/java/com/terra/system/controller/sys/RoleResController.java index b0de681..286bd67 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/RoleResController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/RoleResController.java @@ -8,12 +8,13 @@ import com.terra.system.service.all.PermsService; import com.terra.system.service.sys.RoleResService; 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; @@ -22,7 +23,7 @@ * 瑙掕壊-璧勬簮 * @author WWW */ -@Api(tags = "杩愮淮绠$悊\\瑙掕壊璧勬簮") +@Tag(name = "杩愮淮绠$悊\\瑙掕壊璧勬簮") @RestController @RequestMapping("/roleRes") public class RoleResController extends BaseController { @@ -36,9 +37,9 @@ PermsService permsService; @SysLog() - @ApiOperation(value = "鏍规嵁瑙掕壊ID鏌ヨ璧勬簮") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "鏍规嵁瑙掕壊ID鏌ヨ璧勬簮") + @Parameters({ + @Parameter(name = "roleid", description = "瑙掕壊ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectResByRole") public ResponseMsg<List<RoleResEntity>> selectResByRole(Integer roleid) { @@ -52,11 +53,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 = "/selectByPageAndCount") public ResponseMsg<List<RoleResEntity>> selectByPageAndCount(Integer roleid, Integer pageSize, Integer pageIndex) { @@ -78,9 +79,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<RoleResEntity> selectById(int id) { @@ -94,9 +95,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "RoleResEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody RoleResEntity entity, HttpServletRequest req) { @@ -116,9 +117,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "RoleResEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<RoleResEntity> list, HttpServletRequest req) { @@ -140,9 +141,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) { @@ -157,9 +158,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) { @@ -178,9 +179,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "RoleResEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -201,9 +202,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "RoleResEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/sys/RoleUserController.java b/se-system/src/main/java/com/terra/system/controller/sys/RoleUserController.java index 0a9fea5..3036000 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/RoleUserController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/RoleUserController.java @@ -8,12 +8,13 @@ import com.terra.system.service.all.PermsService; import com.terra.system.service.sys.RoleUserService; 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; @@ -22,7 +23,7 @@ * 瑙掕壊-鐢ㄦ埛 * @author WWW */ -@Api(tags = "杩愮淮绠$悊\\鐢ㄦ埛瑙掕壊") +@Tag(name = "杩愮淮绠$悊\\鐢ㄦ埛瑙掕壊") @RestController @RequestMapping("/roleUser") public class RoleUserController extends BaseController { @@ -36,9 +37,9 @@ PermsService permsService; @SysLog() - @ApiOperation(value = "鏌ヨ璁板綍鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", dataType = "Integer", paramType = "query", required = false, example = "") + @Operation(summary = "鏌ヨ璁板綍鏁�") + @Parameters({ + @Parameter(name = "roleid", description = "瑙掕壊ID", in = ParameterIn.QUERY, required = false, example = "") }) @GetMapping({"/selectCount"}) public ResponseMsg<Integer> selectCount(Integer roleid) { @@ -52,11 +53,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", 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 = "roleid", description = "瑙掕壊ID", 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 = "/selectByPage") public ResponseMsg<List<RoleUserEntity>> selectByPage(Integer roleid, Integer pageSize, Integer pageIndex) { @@ -74,11 +75,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", 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 = "roleid", description = "瑙掕壊ID", 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<RoleUserEntity>> selectByPageAndCount(Integer roleid, Integer pageSize, Integer pageIndex) { @@ -99,7 +100,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectAll") public ResponseMsg<List<RoleUserEntity>> selectAll() { try { @@ -112,9 +113,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<RoleUserEntity> selectById(int id) { @@ -128,9 +129,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "RoleUserEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody RoleUserEntity entity, HttpServletRequest req) { @@ -152,9 +153,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "RoleUserEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<RoleUserEntity> list, HttpServletRequest req) { @@ -178,9 +179,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) { @@ -197,9 +198,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 +221,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "RoleUserEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -245,9 +246,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "RoleUserEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") diff --git a/se-system/src/main/java/com/terra/system/controller/sys/TokenController.java b/se-system/src/main/java/com/terra/system/controller/sys/TokenController.java index 1638fcd..263afdc 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/TokenController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/TokenController.java @@ -9,12 +9,14 @@ import com.terra.system.entity.sys.UserEntity; import com.terra.system.helper.StringHelper; 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.util.List; @@ -24,7 +26,7 @@ * @author WWW * @date 2022-09-28 */ -@Api(tags = "杩愮淮绠$悊\\浠ょ墝绠$悊") +@Tag(name = "杩愮淮绠$悊\\浠ょ墝绠$悊") @RestController @RequestMapping("/token") public class TokenController extends BaseController { @@ -32,12 +34,12 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "浠ょ墝", dataType = "String", paramType = "query", example = "ec101de8-1403-4d8f-ad13-edab8358399b"), - @ApiImplicitParam(name = "type", value = "绫诲瀷", dataType = "Integer", paramType = "query", example = "0"), - @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 = "ec101de8-1403-4d8f-ad13-edab8358399b"), + @Parameter(name = "type", description = "绫诲瀷", in = ParameterIn.QUERY, example = "0"), + @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<TokenEntity>> selectByPageAndCount(String name, Integer type, Integer pageSize, Integer pageIndex) { @@ -57,9 +59,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "TokenEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @PostMapping(value = "/insertToken", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertToken(@RequestBody TokenEntity entity, HttpServletRequest req) { @@ -78,10 +80,10 @@ } @SysLog() - @ApiOperation(value = "鍒涘缓鏂颁护鐗�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "type", value = "浠ょ墝绫诲埆锛�0-涓存椂锛�1-鍥哄畾", dataType = "Integer", paramType = "query", example = "1"), - @ApiImplicitParam(name = "min", value = "鍒嗛挓鏁帮細榛樿1涓湀", dataType = "Integer", paramType = "query", example = "43200") + @Operation(summary = "鍒涘缓鏂颁护鐗�") + @Parameters({ + @Parameter(name = "type", description = "浠ょ墝绫诲埆锛�0-涓存椂锛�1-鍥哄畾", in = ParameterIn.QUERY, example = "1"), + @Parameter(name = "min", description = "鍒嗛挓鏁帮細榛樿1涓湀", in = ParameterIn.QUERY, example = "43200") }) @GetMapping(value = "/insertNewToken") public ResponseMsg<Object> insertNewToken(Integer type, Integer min, HttpServletRequest req) { @@ -107,9 +109,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 = "/deleteToken") public ResponseMsg<Integer> deleteToken(int id) { @@ -123,9 +125,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 = "/deleteTokens") public ResponseMsg<Integer> deleteTokens(@RequestParam List<Integer> ids) { @@ -143,9 +145,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "TokenEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @ResponseBody @PostMapping(value = "/updateToken", produces = "application/json; charset=UTF-8") @@ -165,9 +167,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁ID鏇存柊浠ょ墝涓哄け鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "浠ょ墝ID", dataType = "Integer", paramType = "query", example = "6563") + @Operation(summary = "鏍规嵁ID鏇存柊浠ょ墝涓哄け鏁�") + @Parameters({ + @Parameter(name = "id", description = "浠ょ墝ID", in = ParameterIn.QUERY, example = "6563") }) @GetMapping(value = "/updateExpireById") public ResponseMsg<Integer> updateExpireById(Integer id, HttpServletRequest req) { @@ -191,9 +193,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁Token鏇存柊浠ょ墝涓哄け鏁�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "tk", value = "浠ょ墝", dataType = "String", paramType = "query", example = "2edea2a2-e307-4baa-992c-b477ce0566dd") + @Operation(summary = "鏍规嵁Token鏇存柊浠ょ墝涓哄け鏁�") + @Parameters({ + @Parameter(name = "tk", description = "浠ょ墝", in = ParameterIn.QUERY, example = "2edea2a2-e307-4baa-992c-b477ce0566dd") }) @GetMapping(value = "/updateExpireByToken") public ResponseMsg<Integer> updateExpireByToken(String tk, HttpServletRequest req) { @@ -217,9 +219,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁ID鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1658") + @Operation(summary = "鏍规嵁ID鏌ヨ") + @Parameters({ + @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1658") }) @GetMapping(value = "/selectToken") public ResponseMsg<TokenEntity> selectToken(int id) { @@ -233,9 +235,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁ID鏌ヨ(鏈夋晥鏈熷唴鐨�)") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "6563") + @Operation(summary = "鏍规嵁ID鏌ヨ(鏈夋晥鏈熷唴鐨�)") + @Parameters({ + @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "6563") }) @GetMapping(value = "/selectOneById") public ResponseMsg<TokenEntity> selectOneById(Integer id) { @@ -252,9 +254,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁token鏌ヨ(鏈夋晥鏈熷唴鐨�)") - @ApiImplicitParams({ - @ApiImplicitParam(name = "tk", value = "浠ょ墝", dataType = "String", paramType = "query", example = "2edea2a2-e307-4baa-992c-b477ce0566dd") + @Operation(summary = "鏍规嵁token鏌ヨ(鏈夋晥鏈熷唴鐨�)") + @Parameters({ + @Parameter(name = "tk", description = "浠ょ墝", in = ParameterIn.QUERY, example = "2edea2a2-e307-4baa-992c-b477ce0566dd") }) @GetMapping(value = "/selectOneByToken") public ResponseMsg<TokenEntity> selectOneByToken(String tk) { diff --git a/se-system/src/main/java/com/terra/system/controller/sys/UserController.java b/se-system/src/main/java/com/terra/system/controller/sys/UserController.java index f6cde50..20f8236 100644 --- a/se-system/src/main/java/com/terra/system/controller/sys/UserController.java +++ b/se-system/src/main/java/com/terra/system/controller/sys/UserController.java @@ -9,12 +9,14 @@ import com.terra.system.helper.StringHelper; import com.terra.system.service.sys.TokenService; import com.terra.system.service.sys.UserService; -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.util.List; @@ -24,7 +26,7 @@ * @author sws * @date 2022-09-27 */ -@Api(tags = "杩愮淮绠$悊\\鐢ㄦ埛绠$悊") +@Tag(name = "杩愮淮绠$悊\\鐢ㄦ埛绠$悊") @RestController @RequestMapping("/user") public class UserController extends BaseController { @@ -35,12 +37,12 @@ TokenService tokenService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "uname", value = "鐢ㄦ埛鍚�", dataType = "String", paramType = "query", example = "瀹�"), - @ApiImplicitParam(name = "depcode", value = "鍗曚綅缂栫爜", dataType = "String", paramType = "query", example = "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 = "depcode", description = "鍗曚綅缂栫爜", in = ParameterIn.QUERY, example = "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<UserEntity>> selectByPageAndCount(String uname, String depcode, Integer pageSize, Integer pageIndex) { @@ -63,13 +65,13 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁瑙掕壊+鍗曚綅鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "uname", value = "鐢ㄦ埛鍚�", dataType = "String", paramType = "query", example = "瀹�"), - @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", dataType = "Integer", paramType = "query", example = "1"), - @ApiImplicitParam(name = "depcode", value = "鍗曚綅缂栫爜", dataType = "String", paramType = "query", example = "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 = "roleid", description = "瑙掕壊ID", in = ParameterIn.QUERY, example = "1"), + @Parameter(name = "depcode", description = "鍗曚綅缂栫爜", in = ParameterIn.QUERY, example = "00"), + @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<UserEntity>> selectByPageForRole(String uname, Integer roleid, String depcode, Integer pageSize, Integer pageIndex) { @@ -91,9 +93,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 = "/selectUser") public ResponseMsg<UserEntity> selectUser(int id) { @@ -107,9 +109,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鐢ㄦ埛ID鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "uid", value = "鐢ㄦ埛ID", dataType = "String", paramType = "query", example = "admin") + @Operation(summary = "鏍规嵁鐢ㄦ埛ID鏌ヨ") + @Parameters({ + @Parameter(name = "uid", description = "鐢ㄦ埛ID", in = ParameterIn.QUERY, example = "admin") }) @GetMapping(value = "/selectByUid") public ResponseMsg<UserEntity> selectByUid(String uid) { @@ -127,7 +129,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鎵�鏈�") + @Operation(summary = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectUserAll") public ResponseMsg<List<UserEntity>> selectUserAll() { try { @@ -140,7 +142,7 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鏄�/鍚︿负绠$悊鍛�") + @Operation(summary = "鏌ヨ鏄�/鍚︿负绠$悊鍛�") @GetMapping(value = "/selectForIsAdmin") public ResponseMsg<Boolean> selectForIsAdmin(HttpServletRequest req) { try { @@ -158,9 +160,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 = "/selectIsAdmin") public ResponseMsg<Boolean> selectIsAdmin(Integer id) { @@ -179,9 +181,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ绠$悊鍛樼敤鎴�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "type", value = "绠$悊鍛樼被鍒�", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "鏌ヨ绠$悊鍛樼敤鎴�") + @Parameters({ + @Parameter(name = "type", description = "绠$悊鍛樼被鍒�", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectAdminUsers") public ResponseMsg<Object> selectAdminUsers(Integer type) { @@ -199,9 +201,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 = "/selectRoleByUserId") public ResponseMsg<Object> selectRoleByUserId(Integer id) { @@ -219,9 +221,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 = "/selectUserByRoleId") public ResponseMsg<Object> selectUserByRoleId(Integer id) { @@ -239,9 +241,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "UserEntity", paramType = "body", example = "") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @PostMapping(value = "/insertUser", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertUser(@RequestBody UserEntity entity, HttpServletRequest req) { @@ -265,9 +267,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "List<UserEntity>", paramType = "body", example = "") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�", schema = @Schema(type = "array"), example = "") }) @PostMapping(value = "/insertUsers", produces = "application/json; charset=UTF-8") @SuppressWarnings("AlibabaRemoveCommentedCode") @@ -297,9 +299,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 = "/deleteUser") public ResponseMsg<Integer> deleteUser(int id) { @@ -313,9 +315,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 = "/deleteUsers") public ResponseMsg<Integer> deleteUsers(@RequestParam List<Integer> ids) { @@ -333,9 +335,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "UserEntity", paramType = "body", example = "") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�", example = "") }) @ResponseBody @PostMapping(value = "/updateUser", produces = "application/json; charset=UTF-8") @@ -361,11 +363,11 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氫釜鐢ㄦ埛瀵嗙爜") - @ApiImplicitParams({ - @ApiImplicitParam(name = "adminPwd", value = "绠$悊鍛樺瘑鐮�", dataType = "String", paramType = "body", example = ""), - @ApiImplicitParam(name = "newPwd", value = "鏂板瘑鐮�", dataType = "String", paramType = "body", example = ""), - @ApiImplicitParam(name = "ids", value = "鐢ㄦ埛ID闆嗗悎", dataType = "List<Integer>", paramType = "body", example = "") + @Operation(summary = "鏇存柊澶氫釜鐢ㄦ埛瀵嗙爜") + @Parameters({ + @Parameter(name = "adminPwd", description = "绠$悊鍛樺瘑鐮�", example = ""), + @Parameter(name = "newPwd", description = "鏂板瘑鐮�", example = ""), + @Parameter(name = "ids", description = "鐢ㄦ埛ID闆嗗悎", schema = @Schema(type = "array"), example = "") }) @PostMapping(value = "/updateUsersPwd", produces = "application/json; charset=UTF-8") public ResponseMsg<Boolean> updateUsersPwd(@RequestBody UserUpdateEntity uue, HttpServletRequest req) { diff --git a/se-system/src/main/java/com/terra/system/entity/all/StaticData.java b/se-system/src/main/java/com/terra/system/entity/all/StaticData.java index 909c25c..ad4e83d 100644 --- a/se-system/src/main/java/com/terra/system/entity/all/StaticData.java +++ b/se-system/src/main/java/com/terra/system/entity/all/StaticData.java @@ -14,7 +14,7 @@ /** * 鏉冮檺鎺掗櫎璺緞锛�/proxy锛岃姹傚叏閮ㄥ皬鍐� */ - public static String[] EXCLUDE_PATH = new String[]{"/sign/", "/perms/", "/fmeit/", "/crds/", "/floatserver/", "/wmts/select", "/onemap/", "/swagger", "/error"}; + public static String[] EXCLUDE_PATH = new String[]{"/sign/", "/perms/", "/wmts/select", "/swagger", "/v3/api-docs", "/error"}; public final static int I1 = 1; diff --git a/se-system/src/main/java/com/terra/system/service/data/UploadService.java b/se-system/src/main/java/com/terra/system/service/data/UploadService.java index 7ebddd3..24c3af5 100644 --- a/se-system/src/main/java/com/terra/system/service/data/UploadService.java +++ b/se-system/src/main/java/com/terra/system/service/data/UploadService.java @@ -1,6 +1,6 @@ package com.terra.system.service.data; -import com.google.common.collect.Lists; +import cn.hutool.core.collection.ListUtil; import com.terra.system.entity.all.BaseEntity; import com.terra.system.entity.all.StaticData; import com.terra.system.entity.data.*; @@ -259,7 +259,7 @@ private <T> int batchInserts(BasicMapper basicMapper, List<T> list) { int rows = 0; //int count = (int) Math.ceil(list.size() / StaticData.D100) - List<List<T>> subLists = Lists.partition(list, StaticData.I50); + List<List<T>> subLists = ListUtil.partition(list, StaticData.I50); for (List<T> sub : subLists) { try { rows += basicMapper.insertBatch(sub); diff --git a/se-system/src/main/resources/bootstrap.yml b/se-system/src/main/resources/bootstrap.yml index 24730b9..2559b3c 100644 --- a/se-system/src/main/resources/bootstrap.yml +++ b/se-system/src/main/resources/bootstrap.yml @@ -17,6 +17,7 @@ discovery: # 鏈嶅姟娉ㄥ唽鍦板潃 server-addr: 127.0.0.1:8848 + group: JHS_GROUP config: group: JHS_GROUP # 閰嶇疆涓績鍦板潃 -- Gitblit v1.9.3