From f55ed1d2a1bdf4ad80930e879631d6d95d4b6c3c Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期四, 28 八月 2025 18:57:38 +0800 Subject: [PATCH] RCS 库位同步接口调用 RCS任务下发接口功能调用 RCS 取消任务接口功能开发 RCS异常功回调功能开发 --- rsf-server/src/main/java/com/vincent/rsf/server/common/config/SwaggerConfig.java | 53 ++++++++++++++++++++--------------------------------- 1 files changed, 20 insertions(+), 33 deletions(-) diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/common/config/SwaggerConfig.java b/rsf-server/src/main/java/com/vincent/rsf/server/common/config/SwaggerConfig.java index e226de9..8e336a6 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/common/config/SwaggerConfig.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/common/config/SwaggerConfig.java @@ -9,17 +9,16 @@ import org.springframework.context.annotation.Configuration; import org.springframework.util.ReflectionUtils; import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping; -import springfox.documentation.builders.*; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.oas.annotations.EnableOpenApi; -import springfox.documentation.schema.ScalarType; -import springfox.documentation.service.*; +import springfox.documentation.service.ApiInfo; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider; import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider; - import java.lang.reflect.Field; -import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -36,17 +35,27 @@ public Docket docket() { Docket docket = new Docket(DocumentationType.OAS_30) .apiInfo(apiInfo()) + .enable("dev".equals(active)) .groupName("娴嬭瘯鍒嗙粍") - .enable(true) .select() //apis锛� 娣诲姞swagger鎺ュ彛鎻愬彇鑼冨洿 .apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) .paths(PathSelectors.any()) - .build() -// .globalRequestParameters(getGlobalRequestParameters()) -// .globalResponses(HttpMethod.GET, getGlobalResonseMessage()) -// .globalResponses(HttpMethod.POST, getGlobalResonseMessage()) - ; + .build(); + + return docket; + } + + @Bean + public Docket erpDocket() { + Docket docket = new Docket(DocumentationType.OAS_30) + .apiInfo(apiInfo()) + .enable("dev".equals(active)) + .groupName("ERP鎺ュ彛瀵规帴") + .select() + .apis(RequestHandlerSelectors.basePackage("com.vincent.rsf.server.api.controller.erp")) + .paths(PathSelectors.any()) + .build(); return docket; } @@ -58,28 +67,6 @@ .version("v1.0") .build(); } - - //鐢熸垚鍏ㄥ眬閫氱敤鍙傛暟 - private List<RequestParameter> getGlobalRequestParameters() { - List<RequestParameter> parameters = new ArrayList<>(); - parameters.add(new RequestParameterBuilder() - .name("Authorization") - .description("鎺堟潈Token") - .required(true) - .in(ParameterType.QUERY) - .query(q -> q.model(m -> m.scalarModel(ScalarType.STRING))) - .required(false) - .build()); - return parameters; - } - - //鐢熸垚閫氱敤鍝嶅簲淇℃伅 - private List<Response> getGlobalResonseMessage() { - List<Response> responseList = new ArrayList<>(); - responseList.add(new ResponseBuilder().code("430").description("please login first").build()); - return responseList; - } - @Bean public static BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() { -- Gitblit v1.9.1