diff --git a/pom.xml b/pom.xml index 6b19edf9..60b4213e 100644 --- a/pom.xml +++ b/pom.xml @@ -22,318 +22,333 @@ 1.8 - - - - - com.alibaba - fastjson - 2.0.4 - - - - - org.apache.commons - commons-lang3 - 3.9 - - - - org.projectlombok - lombok - true - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-tomcat - - - - - javax.servlet - javax.servlet-api - 3.1.0 - provided - - - - org.springframework.boot - spring-boot-configuration-processor - true - - - - org.springframework.boot - spring-boot-starter-aop - - - - - org.springframework.boot - spring-boot-starter-data-redis - - - - - org.springframework.boot - spring-boot-devtools - true - - - - - - org.springframework.boot - spring-boot-starter-jdbc - - - mysql - mysql-connector-java - 8.0.21 - runtime - - - - com.oracle - ojdbc14 - 10.2.0.4.0 - pom - - - - - com.baomidou - mybatis-plus-boot-starter - 3.5.2 - - - - - com.github.pagehelper - pagehelper-spring-boot-starter - 1.4.2 - - - - org.mybatis - mybatis - - - org.mybatis - mybatis-spring - - - - - - - p6spy - p6spy - 3.9.1 - - - - - org.projectlombok - lombok - true - - - - - io.jsonwebtoken - jjwt - 0.9.1 - - - - org.springframework.boot - spring-boot-starter-test - test - - - - org.springframework.boot - spring-boot-starter-tomcat - provided - - - javax.xml.bind - jaxb-api - 2.3.0 - - - com.fasterxml.jackson.core - jackson-databind - 2.9.2 - - - com.github.pagehelper - pagehelper-spring-boot-autoconfigure - 1.4.5 - - - org.springframework.boot - spring-boot-starter-websocket - - - - - - org.apache.poi - poi - 4.0.0 - - - - org.apache.poi - poi-ooxml - 4.0.0 - - - - - com.glxp - tochina - 1.0 - - - com.itextpdf - itextpdf - 5.5.13.1 - - - com.itextpdf - itext-asian - 5.2.0 - - - - - cn.hutool - hutool-all - 5.7.9 - - - com.belerweb - pinyin4j - 2.5.0 - - - - com.google.zxing - core - 3.3.3 - - - com.google.zxing - javase - 3.3.3 - - - org.olap4j - olap4j - 1.2.0 - - - - - - - - net.sf.barcode4j - barcode4j - 2.1 - - - org.olap4je - olap4j - - - - - - net.sf.jasperreports - jasperreports - 6.5.1 - - - com.lowagie - itext - - - - - - net.sf.jasperreports - jasperreports-fonts - 6.0.0 - - - - - com.itextpdf - itext-pdfa - 5.5.0 - - - org.codehaus.groovy - groovy - 3.0.7 - - - cn.lesper - iTextAsian - 3.0 - - - - - - org.apache.xmlgraphics - batik-bridge - 1.11 - - - - org.apache.xmlgraphics - batik-dom - 1.11 - - - - org.eclipse.birt.runtime.3_7_1 - com.lowagie.text - 2.1.7 - - - com.squareup.okhttp3 - okhttp - 3.10.0 - - - - - - - cn.dev33 - sa-token-spring-boot-starter - 1.30.0 - - - org.apache.commons - commons-text - 1.1 - - + + + + + com.alibaba + fastjson + 2.0.4 + + + + + org.apache.commons + commons-lang3 + 3.9 + + + + org.projectlombok + lombok + true + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-tomcat + + + + + javax.servlet + javax.servlet-api + 3.1.0 + provided + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + org.springframework.boot + spring-boot-starter-aop + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + org.springframework.boot + spring-boot-devtools + true + + + + + + org.springframework.boot + spring-boot-starter-jdbc + + + mysql + mysql-connector-java + 8.0.21 + runtime + + + + com.oracle + ojdbc14 + 10.2.0.4.0 + pom + + + + + com.baomidou + mybatis-plus-boot-starter + 3.5.2 + + + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.4.2 + + + + org.mybatis + mybatis + + + org.mybatis + mybatis-spring + + + + + + + p6spy + p6spy + 3.9.1 + + + + + org.projectlombok + lombok + true + + + + + io.jsonwebtoken + jjwt + 0.9.1 + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + javax.xml.bind + jaxb-api + 2.3.0 + + + com.fasterxml.jackson.core + jackson-databind + 2.9.2 + + + com.github.pagehelper + pagehelper-spring-boot-autoconfigure + 1.4.5 + + + org.springframework.boot + spring-boot-starter-websocket + + + + + + org.apache.poi + poi + 4.0.0 + + + + org.apache.poi + poi-ooxml + 4.0.0 + + + + + com.glxp + tochina + 1.0 + + + com.itextpdf + itextpdf + 5.5.13.1 + + + com.itextpdf + itext-asian + 5.2.0 + + + + + cn.hutool + hutool-all + 5.7.9 + + + com.belerweb + pinyin4j + 2.5.0 + + + + com.google.zxing + core + 3.3.3 + + + com.google.zxing + javase + 3.3.3 + + + org.olap4j + olap4j + 1.2.0 + + + + + + + + net.sf.barcode4j + barcode4j + 2.1 + + + org.olap4je + olap4j + + + + + + net.sf.jasperreports + jasperreports + 6.5.1 + + + com.lowagie + itext + + + + + + net.sf.jasperreports + jasperreports-fonts + 6.0.0 + + + + + com.itextpdf + itext-pdfa + 5.5.0 + + + org.codehaus.groovy + groovy + 3.0.7 + + + cn.lesper + iTextAsian + 3.0 + + + + + + org.apache.xmlgraphics + batik-bridge + 1.11 + + + + org.apache.xmlgraphics + batik-dom + 1.11 + + + + org.eclipse.birt.runtime.3_7_1 + com.lowagie.text + 2.1.7 + + + com.squareup.okhttp3 + okhttp + 3.10.0 + + + + + + + cn.dev33 + sa-token-spring-boot-starter + 1.30.0 + + + org.apache.commons + commons-text + 1.1 + + + org.springframework.plugin + spring-plugin-core + 2.0.0.RELEASE + + + org.springframework.plugin + spring-plugin-metadata + 2.0.0.RELEASE + + + com.github.xiaoymin + knife4j-spring-boot-starter + 2.0.9 + + UDI_SPMS_SERVER diff --git a/src/main/java/com/glxp/api/config/Knife4jConfiguration.java b/src/main/java/com/glxp/api/config/Knife4jConfiguration.java new file mode 100644 index 00000000..81acbd6c --- /dev/null +++ b/src/main/java/com/glxp/api/config/Knife4jConfiguration.java @@ -0,0 +1,37 @@ +package com.glxp.api.config; + + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; + +@Configuration +@EnableSwagger2WebMvc +public class Knife4jConfiguration { + + @Value("${knife4j.enable:false}") + private boolean enable; + + @Bean(value = "defaultApi2") + public Docket defaultApi2() { + Docket docket = new Docket(DocumentationType.SWAGGER_2) + .apiInfo(new ApiInfoBuilder() + .title("UDI管理系统后台") + .description("UDI管理系统后台 - APIS") + .version("1.0") + .build()) + .enable(enable) + .select() + //这里指定Controller扫描包路径 + .apis(RequestHandlerSelectors.basePackage("com.glxp.api.controller")) + .paths(PathSelectors.any()) + .build(); + return docket; + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java index f77718aa..cfb94249 100644 --- a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java +++ b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java @@ -47,6 +47,8 @@ import com.glxp.api.service.sync.SpsSyncDownloadService; import com.glxp.api.util.CustomUtil; import com.glxp.api.util.DateUtil; import com.glxp.api.util.JsonUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.apache.ibatis.session.ExecutorType; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; @@ -65,6 +67,7 @@ import java.io.IOException; import java.util.*; @RestController +@Api(tags = "同步下载相关") public class SpsSyncDownloadController { @Resource @@ -151,6 +154,7 @@ public class SpsSyncDownloadController { // 下发基础数据 ,供给中继服务,UDI管理系统下载 @AuthRuleAnnotation("") @GetMapping("sps/sync/data") + @ApiOperation("拉取同步任务数据") public BaseResponse data(BasicExportTypeEnum exportType) { BaseResponse baseResponse = new BaseResponse<>(); BasicExportStatusEntity one = basicExportService.getOne(Wrappers.lambdaQuery(BasicExportStatusEntity.class)