1
This commit is contained in:
264
mosty-other/mosty-other.iml
Normal file
264
mosty-other/mosty-other.iml
Normal file
@ -0,0 +1,264 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter:5.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.platform:junit-platform-commons:1.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.vintage:junit-vintage-engine:5.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.platform:junit-platform-engine:1.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-test:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.3.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.64" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.64" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.oracle:ojdbc6:11.2.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.postgresql:postgresql:42.2.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:29.0-jre" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.10.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.10.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.10.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:common-magic-api-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:common-base-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.velocity:velocity-engine-core:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.caspar-chen:swagger-ui-layer:1.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.7.20" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.83" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ssssssss:magic-api-spring-boot-starter:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ssssssss:magic-api:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-websocket:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-websocket:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ssssssss:magic-script:1.8.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ssssssss:magic-editor:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ssssssss:magic-api-plugin-swagger:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:common-token-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.11.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.auth0:java-jwt:3.8.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:common-redis-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.3.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.3.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
|
||||
<orderEntry type="module" module-name="mosty-base-feign-sdk" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.feign:feign-slf4j:8.14.4" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.feign:feign-core:8.14.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:common-core-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:common-config-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-lang:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-cache:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-hash:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-core:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-cipher:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-core:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-ogdl:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-event:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-ehcache:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache-core:2.6.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.penggle:kaptcha:2.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.minio:minio:8.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.carrotsearch.thirdparty:simple-xml-safe:2.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.hikvision.ga:artemis-http-client:1.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.locationtech.jts:jts-core:1.18.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:operation-log-aspect-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.vividsolutions:jts:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:dynamic-datasource-spring-boot-starter:3.4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||
</component>
|
||||
</module>
|
149
mosty-other/pom.xml
Normal file
149
mosty-other/pom.xml
Normal file
@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>mosty-dyga-cloud</artifactId>
|
||||
<groupId>com.mosty</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>mosty-other</artifactId>
|
||||
<description>三方数据抽取中心</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.16</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle</groupId>
|
||||
<artifactId>ojdbc6</artifactId>
|
||||
<version>11.2.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
<version>2.2.4.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--magicAPI-->
|
||||
<dependency>
|
||||
<groupId>com.mosty</groupId>
|
||||
<artifactId>common-magic-api-starter</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!--登录jar包-->
|
||||
<dependency>
|
||||
<groupId>com.mosty</groupId>
|
||||
<artifactId>common-token-starter</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!--redis包-->
|
||||
<dependency>
|
||||
<groupId>com.mosty</groupId>
|
||||
<artifactId>common-redis-starter</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!--base-feign-->
|
||||
<dependency>
|
||||
<groupId>com.mosty</groupId>
|
||||
<artifactId>mosty-base-feign-sdk</artifactId>
|
||||
</dependency>
|
||||
<!--日志包-->
|
||||
<dependency>
|
||||
<groupId>com.mosty</groupId>
|
||||
<artifactId>operation-log-aspect-starter</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.vividsolutions</groupId>
|
||||
<artifactId>jts</artifactId>
|
||||
<version>1.13</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||
<version>3.4.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>1.1.10</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- 这个插件,可以将应用打包成一个可执行的jar包;-->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
@ -0,0 +1,21 @@
|
||||
package com.mosty.lzother;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import com.mosty.common.base.timeconsume.EnableTimeConsume;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
@EnableTimeConsume
|
||||
@EnableFeignClients(basePackages = "com.mosty.base.feign.service")
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||
@EnableScheduling
|
||||
public class MostyLzotherApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MostyLzotherApplication.class, args);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.mosty.lzother.config;
|
||||
|
||||
import feign.RequestInterceptor;
|
||||
import feign.RequestTemplate;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@Configuration
|
||||
public class FeignConfig implements RequestInterceptor {
|
||||
|
||||
@Override
|
||||
public void apply(RequestTemplate requestTemplate) {
|
||||
ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
if (attr != null && attr.getRequest() != null) {
|
||||
HttpServletRequest request = attr.getRequest();
|
||||
if (StringUtils.isNotBlank(request.getHeader("Authorization"))) {
|
||||
// 添加token
|
||||
requestTemplate.header("Authorization", request.getHeader("Authorization"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.mosty.lzother.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 全局配置
|
||||
* @author kevin
|
||||
* @date 2022/5/25 1:56 上午
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Data
|
||||
@Configuration
|
||||
@ConfigurationProperties("exclude.path-patterns")
|
||||
public class GlobalYmlConfig {
|
||||
|
||||
/**
|
||||
* swagger 静态文件的放行列表
|
||||
*/
|
||||
private List<String> swagger;
|
||||
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
package com.mosty.lzother.config;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
|
||||
import com.mosty.common.token.SysUserInterceptor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.web.servlet.config.annotation.*;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单体服务拦截器
|
||||
* @author kevin
|
||||
* @date 2022/3/21 11:17 PM
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class WebMvcConfig implements WebMvcConfigurer, InitializingBean {
|
||||
|
||||
private static final String DEFAULT_TIME_FORMAT = "HH:mm:ss";
|
||||
private static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
|
||||
private static final String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
@Value("${server.servlet.context-path:/}")
|
||||
private String contextPath;
|
||||
|
||||
@Autowired
|
||||
private GlobalYmlConfig globalYmlConfig;
|
||||
|
||||
@Override
|
||||
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
|
||||
ObjectMapper objectMapper = converter.getObjectMapper();
|
||||
// 生成JSON时,将所有Long转换成String
|
||||
SimpleModule simpleModule = new SimpleModule();
|
||||
//日期格式化
|
||||
simpleModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
|
||||
simpleModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
|
||||
simpleModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
|
||||
objectMapper.registerModule(simpleModule);
|
||||
// 时间格式化
|
||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
|
||||
objectMapper.configure(JsonGenerator.Feature.IGNORE_UNKNOWN, true);
|
||||
objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
||||
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||
// 设置格式化内容
|
||||
converter.setObjectMapper(objectMapper);
|
||||
converters.add(0, converter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
log.info("当前服务的 contextPath={}", contextPath);
|
||||
log.info("当前服务的 swaggerExcludePathPatterns={}", JSON.toJSONString(globalYmlConfig.getSwagger()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
|
||||
configurer.defaultContentType(MediaType.APPLICATION_JSON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(userInfoInterceptor()).addPathPatterns("/**")
|
||||
.excludePathPatterns(globalYmlConfig.getSwagger());
|
||||
log.info("初始化WebMvcConfig 监控拦截器SysUserInterceptor");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
if (!registry.hasMappingForPattern("/template/**")) {
|
||||
registry.addResourceHandler("/template/**").addResourceLocations("classpath:/template/");
|
||||
}
|
||||
registry.addResourceHandler("swagger-ui.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("docs.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
WebMvcConfigurer.super.addResourceHandlers(registry);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SysUserInterceptor userInfoInterceptor() {
|
||||
log.info("初始化WebMvcConfig 拦截器SysUserInterceptor");
|
||||
return new SysUserInterceptor();
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.mosty.lzother.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.mosty.base.utils.OkHttpUtils;
|
||||
import com.mosty.common.base.domain.BaseController;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.redis.service.RedisService;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.lzother.service.VLz110TxjService;
|
||||
import com.mosty.lzother.task.SyncJqTask;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping(value = "lzJq")
|
||||
@Api(tags = {"泸州特巡警警情110对象接口"})
|
||||
public class VLz110TxjController extends BaseController {
|
||||
|
||||
private final VLz110TxjService vLz110TxjService;
|
||||
private final RedisService redisService;
|
||||
|
||||
@GetMapping(value = "/syncHndJq")
|
||||
@ApiOperation("同步警情110数据")
|
||||
public ResponseResult<Void> syncHndJq(String time) {
|
||||
this.vLz110TxjService.syncHndJq(time);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@GetMapping(value = "/syncJqCjd")
|
||||
@ApiOperation("处警警情")
|
||||
public ResponseResult<Void> syncJqCjd(String time) {
|
||||
this.vLz110TxjService.syncJqCjd(time);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@GetMapping(value = "/autoTime")
|
||||
@ApiOperation("启动或者停止警情定时器")
|
||||
public ResponseResult<Boolean> autoTime() {
|
||||
SyncJqTask.start = !SyncJqTask.start;
|
||||
return ResponseResult.success(SyncJqTask.start);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/autoTimeXzjq")
|
||||
@ApiOperation("启动或者停止修正警情定时器")
|
||||
public ResponseResult<Boolean> autoTimeXzjq() {
|
||||
SyncJqTask.jqxz = !SyncJqTask.jqxz;
|
||||
return ResponseResult.success(SyncJqTask.jqxz);
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.mosty.lzother.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.xinzhi.Czxx;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface CzxxMapper extends BaseMapper<Czxx> {
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.mosty.lzother.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.lzother.FKDB;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface FkdbMapper extends BaseMapper<FKDB> {
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.mosty.lzother.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.xinzhi.Jjdb;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface JjdbMapper extends BaseMapper<Jjdb> {
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.mosty.lzother.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.rh.RhMyhtWarn;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface RhMyhtWarnMapper extends BaseMapper<RhMyhtWarn> {
|
||||
|
||||
}
|
@ -0,0 +1,136 @@
|
||||
package com.mosty.lzother.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.feign.service.MostyBaseFeignService;
|
||||
import com.mosty.base.model.dto.base.SysDeptDTO;
|
||||
import com.mosty.base.model.dto.base.SysMessageInfoInsertDto;
|
||||
import com.mosty.base.model.vo.base.DeptInfoVo;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.core.business.entity.vo.SysUserDeptVO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 调用部门信息远程适配层
|
||||
*
|
||||
* @author kevin
|
||||
* @date 2022/7/6 10:37 上午
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbBaseAdaptRemoteService {
|
||||
|
||||
/**
|
||||
* 部门信息
|
||||
*/
|
||||
private final MostyBaseFeignService mostyBaseFeignService;
|
||||
|
||||
/**
|
||||
* 根据部门编码查询部门信息
|
||||
*
|
||||
* @param orgCode 部门编码
|
||||
* @return 部门信息
|
||||
*/
|
||||
public SysDeptDTO getDeptByOrgCode(String orgCode) {
|
||||
if (StringUtils.isBlank(orgCode)) {
|
||||
return null;
|
||||
}
|
||||
ResponseResult<SysDeptDTO> responseResult = mostyBaseFeignService.getDeptByOrgCode(orgCode);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("调用部门编码查询部门信息异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
return null;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据部门deptid获取所属分县局、所属地市州
|
||||
*
|
||||
* @param deptid 部门编码
|
||||
*/
|
||||
public DeptInfoVo getOrgByDeptId(String deptid) {
|
||||
if (StringUtils.isBlank(deptid)) {
|
||||
return null;
|
||||
}
|
||||
ResponseResult<DeptInfoVo> responseResult = mostyBaseFeignService.getOrgByDeptId(deptid);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("调用部门id查询部门详情信息异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
return null;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据部门deptid获取所属分县局、所属地市州
|
||||
*
|
||||
* @param orgcode 部门编码
|
||||
*/
|
||||
public DeptInfoVo getOrgByOrgcode(String orgcode) {
|
||||
if (StringUtils.isBlank(orgcode)) {
|
||||
return null;
|
||||
}
|
||||
ResponseResult<DeptInfoVo> responseResult = mostyBaseFeignService.getOrgByOrgcode(orgcode);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("调用部门code查询部门详情信息异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("调用部门code查询部门详情信息异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有的用户数据
|
||||
*/
|
||||
public List<SysUserDeptVO> getUserAll(String deptId) {
|
||||
ResponseResult<List<SysUserDeptVO>> responseResult = mostyBaseFeignService.getUserAll(deptId);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("调用部门id查询部门详情信息异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有的部门信息集合
|
||||
*/
|
||||
public List<DeptInfoVo> getDeptAll() {
|
||||
ResponseResult<List<DeptInfoVo>> responseResult = mostyBaseFeignService.getDeptAll();
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("调用部门id查询部门详情信息异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 给人员发送消息
|
||||
*/
|
||||
public Integer sendMsg(SysMessageInfoInsertDto dto) {
|
||||
ResponseResult<Integer> responseResult = mostyBaseFeignService.sendMsg(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("给人员发送消息失败, responseResult = {}", JSON.toJSONString(responseResult));
|
||||
return 0;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员的部门所属
|
||||
*/
|
||||
public DeptInfoVo getDeptInfoByUserId(String userId) {
|
||||
ResponseResult<DeptInfoVo> responseResult = mostyBaseFeignService.getDeptInfoByUserId(userId);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("获取人员的部门所属失败, responseResult = {}", JSON.toJSONString(responseResult));
|
||||
return null;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package com.mosty.lzother.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.feign.service.MostySjzxFeignService;
|
||||
import com.mosty.base.model.entity.lzother.VLz110Txj;
|
||||
import com.mosty.base.model.entity.lzother.ZhjmxfXfqwXfqyGzdw;
|
||||
import com.mosty.base.model.entity.sjzx.TbJq;
|
||||
import com.mosty.base.model.entity.sjzx.TbJqCjdb;
|
||||
import com.mosty.base.model.entity.xinzhi.GxCjdb;
|
||||
import com.mosty.base.model.entity.xinzhi.Jjdb;
|
||||
import com.mosty.base.model.vo.sjzx.TbJqVo;
|
||||
import com.mosty.base.model.vo.xinzhi.GxAlarmAllVo;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/10/31
|
||||
* 外部调用事件中心接口
|
||||
**/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TbSjzxAdaptRemoteService {
|
||||
|
||||
@Resource
|
||||
private MostySjzxFeignService mostySjzxFeignService;
|
||||
|
||||
// 同步仁寿警情信息
|
||||
public void addRsJq(TbJq dto) {
|
||||
ResponseResult<Void> responseResult = this.mostySjzxFeignService.addRsJq(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("同步仁寿警情信息异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("同步仁寿警情信息异常");
|
||||
}
|
||||
}
|
||||
|
||||
// 获取警情的最新的一条信息
|
||||
public TbJqVo getLastJq() {
|
||||
ResponseResult<TbJqVo> responseResult = this.mostySjzxFeignService.getLastJq();
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("获取警情的最新的一条信息异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("获取警情的最新的一条信息异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 获取最新一条处警单的数据
|
||||
public TbJqCjdb getLastJqCjdb() {
|
||||
ResponseResult<TbJqCjdb> responseResult = this.mostySjzxFeignService.getLastJqCjdb();
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("获取最新一条处警单的数据 异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("获取最新一条处警单的数据异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 添加仁寿处警单数据
|
||||
public void addRsCjdb(TbJqCjdb cjdb) {
|
||||
ResponseResult<TbJqCjdb> responseResult = this.mostySjzxFeignService.addRsCjdb(cjdb);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("添加仁寿处警单数据 异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("添加仁寿处警单数据异常");
|
||||
}
|
||||
}
|
||||
|
||||
// 添加泸州110警情数据
|
||||
public void addLzJq(VLz110Txj lz110) {
|
||||
ResponseResult<Void> responseResult = this.mostySjzxFeignService.addLzJq(lz110);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("添加泸州110警情数据 异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("添加泸州110警情数据异常");
|
||||
}
|
||||
}
|
||||
|
||||
// 添加泸州海能达警情数据
|
||||
public void addLzHndJq(Jjdb jjdb) {
|
||||
ResponseResult<Void> responseResult = this.mostySjzxFeignService.addLzHndJq(jjdb);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("添加泸州110警情数据 异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("添加泸州110警情数据异常");
|
||||
}
|
||||
}
|
||||
|
||||
// 查询没得经纬度的接警单编号
|
||||
public List<String> selectJjdbh() {
|
||||
ResponseResult<List<String>> responseResult = this.mostySjzxFeignService.selectJjdbh();
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询没得经纬度的接警单编号 异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询没得经纬度的接警单编号异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
//修改经纬度
|
||||
public void updateJqJwd(Jjdb jjdb) {
|
||||
ResponseResult<Void> responseResult = this.mostySjzxFeignService.updateJqJwd(jjdb);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("添加泸州110警情数据 异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("添加泸州110警情数据异常");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package com.mosty.lzother.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.feign.service.MostyYjzlFeignService;
|
||||
import com.mosty.base.model.dto.yjzl.GetLastYjDto;
|
||||
import com.mosty.base.model.entity.lzother.TAlarmYjZl;
|
||||
import com.mosty.base.model.entity.lzother.TAlarmYjgj;
|
||||
import com.mosty.base.model.entity.rh.RhMyhtWarn;
|
||||
import com.mosty.base.model.entity.yjzl.TbYjxx;
|
||||
import com.mosty.base.model.entity.yjzl.TbZlxx;
|
||||
import com.mosty.base.model.vo.lzother.TAlarmYjZlVo;
|
||||
import com.mosty.base.model.vo.trs.VwAlermYjzlVo;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/23
|
||||
* 外部调用公安机关要素接口
|
||||
**/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TbYjzlAdaptRemoteService {
|
||||
|
||||
@Resource
|
||||
private MostyYjzlFeignService mostyYjzlFeignService;
|
||||
|
||||
// 同步拓尔思预警指令(高新)
|
||||
public void addTrsZl(VwAlermYjzlVo dto) {
|
||||
ResponseResult<Void> responseResult = this.mostyYjzlFeignService.addTrsZl(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("同步拓尔思预警指令失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("同步拓尔思预警指令失败");
|
||||
}
|
||||
}
|
||||
|
||||
// 获取trs最新的一条指令信息
|
||||
public TbZlxx getLastZlxx() {
|
||||
ResponseResult<TbZlxx> responseResult = this.mostyYjzlFeignService.getLastZlxx();
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("获取trs最新的一条指令信息失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("获取trs最新的一条指令信息失败");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 根据条件查询最新的预警信息
|
||||
public TbYjxx getLastYj(GetLastYjDto dto) {
|
||||
ResponseResult<TbYjxx> responseResult = this.mostyYjzlFeignService.getLastYj(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("根据条件查询最新的预警信息失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("根据条件查询最新的预警信息失败");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 添加泸州拓尔思预警信息
|
||||
public void addYjxx(TAlarmYjgj item) {
|
||||
ResponseResult<Void> responseResult = this.mostyYjzlFeignService.addYjxx(item);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("添加泸州拓尔思预警信息失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("添加泸州拓尔思预警信息失败");
|
||||
}
|
||||
}
|
||||
|
||||
// 添加融合预警信息失败
|
||||
public void addRhyj(RhMyhtWarn rhMyhtWarn) {
|
||||
ResponseResult<Void> responseResult = this.mostyYjzlFeignService.saveHryj(rhMyhtWarn);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("添加融合预警信息失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("添加融合预警信息失败");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.mosty.lzother.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.feign.service.MostyYszxFeignService;
|
||||
import com.mosty.base.model.dto.yszx.TbYsGajgByJwdDto;
|
||||
import com.mosty.base.model.dto.yszx.TbYsSxtDto;
|
||||
import com.mosty.base.model.entity.lzother.ZhjmxfXfqwXfqyGzdw;
|
||||
import com.mosty.base.model.entity.sjzx.TbJqCjdb;
|
||||
import com.mosty.base.model.vo.yszx.TbYsGajgVo;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/23
|
||||
* 外部调用公安机关要素接口
|
||||
**/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TbYsZxAdaptRemoteService {
|
||||
|
||||
@Resource
|
||||
private MostyYszxFeignService tbYszxFeignService;
|
||||
|
||||
// 返回要素表中不存在的感知源
|
||||
public List<String> getInfoBySbbh(List<String> ids) {
|
||||
ResponseResult<List<String>> responseResult = tbYszxFeignService.getInfoBySbbh(ids);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 添加摄像头信息
|
||||
public Integer addSxt(TbYsSxtDto dto) {
|
||||
ResponseResult<Integer> responseResult = tbYszxFeignService.addSxt(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("添加摄像头信息失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("添加摄像头信息失败");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 根据经纬度查询所在辖区
|
||||
public TbYsGajgVo getGajgByJwd(TbYsGajgByJwdDto dto) {
|
||||
ResponseResult<TbYsGajgVo> responseResult = tbYszxFeignService.getGajgByJwd(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询所在辖区失败 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("查询所在辖区失败");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
// 添加泸州感知源信息
|
||||
public void addLzGzy(ZhjmxfXfqwXfqyGzdw dto) {
|
||||
ResponseResult<Void> responseResult = this.tbYszxFeignService.addLzGzy(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("添加泸州感知源信息 异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("添加泸州感知源信息异常");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.mosty.lzother.service;
|
||||
|
||||
import com.mosty.base.model.entity.xinzhi.Czxx;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface VLz110TxjService {
|
||||
|
||||
@ApiOperation("海能达警情")
|
||||
void syncHndJq(String time);
|
||||
|
||||
@ApiOperation("海能达处警警情")
|
||||
void syncJqCjd(String time);
|
||||
|
||||
@ApiOperation("融合预警")
|
||||
void rhyj(String time);
|
||||
|
||||
@ApiOperation("修改经纬度")
|
||||
void selectJjdbh();
|
||||
|
||||
}
|
@ -0,0 +1,181 @@
|
||||
package com.mosty.lzother.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mosty.base.model.dto.yjzl.GetLastYjDto;
|
||||
import com.mosty.base.model.entity.lzother.FKDB;
|
||||
import com.mosty.base.model.entity.rh.RhMyhtWarn;
|
||||
import com.mosty.base.model.entity.sjzx.TbJqCjdb;
|
||||
import com.mosty.base.model.entity.xinzhi.Czxx;
|
||||
import com.mosty.base.model.entity.xinzhi.Jjdb;
|
||||
import com.mosty.base.model.entity.yjzl.TbYjxx;
|
||||
import com.mosty.base.model.entity.yjzl.TbYjxxDypzYjjb;
|
||||
import com.mosty.base.model.vo.base.DeptInfoVo;
|
||||
import com.mosty.base.model.vo.sjzx.TbJqVo;
|
||||
import com.mosty.base.utils.Constant;
|
||||
import com.mosty.base.utils.DateUtils;
|
||||
import com.mosty.base.utils.UUIDGenerator;
|
||||
import com.mosty.common.redis.service.RedisService;
|
||||
import com.mosty.lzother.mapper.CzxxMapper;
|
||||
import com.mosty.lzother.mapper.FkdbMapper;
|
||||
import com.mosty.lzother.mapper.JjdbMapper;
|
||||
import com.mosty.lzother.mapper.RhMyhtWarnMapper;
|
||||
import com.mosty.lzother.remote.TbBaseAdaptRemoteService;
|
||||
import com.mosty.lzother.remote.TbSjzxAdaptRemoteService;
|
||||
import com.mosty.lzother.remote.TbYjzlAdaptRemoteService;
|
||||
import com.mosty.lzother.service.VLz110TxjService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class VLz110TxjServiceImpl extends ServiceImpl<JjdbMapper, Jjdb>
|
||||
implements VLz110TxjService {
|
||||
|
||||
private final TbSjzxAdaptRemoteService tbSjzxAdaptRemoteService;
|
||||
private final TbBaseAdaptRemoteService tbBaseAdaptRemoteService;
|
||||
private final TbYjzlAdaptRemoteService tbYjzlAdaptRemoteService;
|
||||
private final FkdbMapper fkdbMapper;
|
||||
private final RhMyhtWarnMapper rhMyhtWarnMapper;
|
||||
private final CzxxMapper czxxMapper;
|
||||
private final RedisService redisService;
|
||||
|
||||
@Override
|
||||
public void syncJqCjd(String time) {
|
||||
// 获取最后一条数据的时间
|
||||
TbJqCjdb cjd = this.tbSjzxAdaptRemoteService.getLastJqCjdb();
|
||||
if (StringUtils.isBlank(time) && ObjectUtils.isNotEmpty(cjd)) {
|
||||
time = DateUtils.getQueryDateString(cjd.getRksj(), "02");
|
||||
} else {
|
||||
time = time + " 00:00:00";
|
||||
}
|
||||
List<FKDB> list = this.fkdbMapper.selectList(
|
||||
new LambdaQueryWrapper<FKDB>()
|
||||
.first("select * from ( ")
|
||||
.last(" ) a where to_char(cjsj,'yyyy-MM-dd HH24:mi:ss') > '" + time + "' order by cjsj asc")
|
||||
|
||||
);
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
list.forEach(item -> {
|
||||
TbJqCjdb cjdb = new TbJqCjdb();
|
||||
BeanUtils.copyProperties(item, cjdb);
|
||||
cjdb.setId(UUIDGenerator.getUUID());
|
||||
cjdb.setCjdbh(item.getFkdbh());
|
||||
cjdb.setJjdbh(item.getJjdbh());
|
||||
cjdb.setTzdbh(item.getPjdbh());
|
||||
cjdb.setCjdwbh(item.getFkdwdm());
|
||||
cjdb.setCjyxm(item.getFkyxm());
|
||||
cjdb.setCjybh(item.getFkybh());
|
||||
cjdb.setScfksj(item.getFksj());
|
||||
cjdb.setCjsj(item.getCjsj01());
|
||||
cjdb.setDdxcsj(item.getDdxcsj());
|
||||
cjdb.setCjwbsj(item.getXcclwbsj());
|
||||
cjdb.setFknr(item.getCjczqk());
|
||||
cjdb.setCjqk(item.getCjczqk());
|
||||
cjdb.setCljglx(item.getJqcljgdm());
|
||||
cjdb.setCljg(item.getJqcljgsm());
|
||||
cjdb.setCdry(item.getCdrc());
|
||||
cjdb.setCdcl(item.getCdcc());
|
||||
cjdb.setXzqh(item.getXzqhdm());
|
||||
cjdb.setRksj(item.getCjsj());
|
||||
cjdb.setFkdwxzb(item.getFkdwxzb());
|
||||
cjdb.setFkdwyzb(item.getFkdwyzb());
|
||||
DeptInfoVo dept;
|
||||
if (StringUtils.isNotBlank(item.getFkdwdm())) {
|
||||
dept = this.tbBaseAdaptRemoteService.getOrgByOrgcode(item.getFkdwdm());
|
||||
if (dept != null) {
|
||||
cjdb.setCjdwmc(dept.getDeptname());
|
||||
}
|
||||
}
|
||||
cjdb.setXzqh(item.getXzqhdm());
|
||||
cjdb.setXtSjly("1");
|
||||
cjdb.setCjwbsj(item.getXcclwbsj());
|
||||
cjdb.setCljg(item.getJqclztdm());
|
||||
// TODO 翻译类型
|
||||
cjdb.setCljglx(item.getJqcljgdm());
|
||||
this.tbSjzxAdaptRemoteService.addRsCjdb(cjdb);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void syncHndJq(String time) {
|
||||
TbJqVo jqVo = this.tbSjzxAdaptRemoteService.getLastJq();
|
||||
if (StringUtils.isBlank(time) && ObjectUtils.isNotEmpty(jqVo)) {
|
||||
time = DateUtils.getQueryDateString(jqVo.getBjsj(), "02");
|
||||
} else {
|
||||
time = time + " 00:00:00";
|
||||
}
|
||||
List<Jjdb> list = this.baseMapper.selectList(
|
||||
new LambdaQueryWrapper<Jjdb>()
|
||||
.last(" where LENGTH(jqlbdm) > 0 and LENGTH(bjnr) > 0 and LENGTH(gxdwdm) > 0 and to_char(\"bjsj\",'yyyy-MM-dd HH24:mi:ss') > '" + time + "' order by bjsj asc")
|
||||
);
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
for (Jjdb jjdb : list) {
|
||||
this.tbSjzxAdaptRemoteService.addLzHndJq(jjdb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@DS("rh_yj")
|
||||
public void rhyj(String time) {
|
||||
if (StringUtils.isEmpty(time)) {
|
||||
TbYjxx lastYj = this.tbYjzlAdaptRemoteService.getLastYj(new GetLastYjDto().setYjlyid("02"));
|
||||
if (ObjectUtils.isNotEmpty(lastYj)) {
|
||||
time = DateUtils.getQueryDateString(lastYj.getYjSj(), "02");
|
||||
}
|
||||
}
|
||||
long gjsj = DateUtils.strToDate(StringUtils.isNoneBlank(time) ? time : DateUtils.getSystemDateTimeString(), "02").getTime() / 1000;
|
||||
List<RhMyhtWarn> rhMyhtWarns = this.rhMyhtWarnMapper.selectList(new LambdaQueryWrapper<RhMyhtWarn>().gt(RhMyhtWarn::getCreateTime, gjsj));
|
||||
if (!CollectionUtils.isEmpty(rhMyhtWarns)) {
|
||||
rhMyhtWarns.forEach(this.tbYjzlAdaptRemoteService::addRhyj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void selectJjdbh() {
|
||||
List<String> jjdbh = this.tbSjzxAdaptRemoteService.selectJjdbh();
|
||||
if (!CollectionUtils.isEmpty(jjdbh)) {
|
||||
jjdbh.forEach(v -> {
|
||||
Jjdb jjdb = this.baseMapper.selectOne(
|
||||
new LambdaQueryWrapper<Jjdb>()
|
||||
.eq(Jjdb::getJjdbh, v)
|
||||
.isNotNull(Jjdb::getFxdwwd)
|
||||
.isNotNull(Jjdb::getFxdwjd)
|
||||
);
|
||||
if (ObjectUtils.isNotEmpty(jjdb)) {
|
||||
this.tbSjzxAdaptRemoteService.updateJqJwd(jjdb);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
//补全警情 查询今日接警单号
|
||||
String time = DateUtils.getSystemDateTimeString();
|
||||
time = DateUtils.getQueryDateString(DateUtils.getNextDate(DateUtils.strToDate(time, "02"), "H", -3), "02");
|
||||
List<Jjdb> list = this.baseMapper.selectList(
|
||||
new LambdaQueryWrapper<Jjdb>()
|
||||
.last(" where LENGTH(jqlbdm) > 0 and LENGTH(bjnr) > 0 and LENGTH(gxdwdm) > 0 and to_char(\"bjsj\",'yyyy-MM-dd HH24:mi:ss') >= '" + time + "' order by bjsj asc")
|
||||
);
|
||||
//判断
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
for (Jjdb jjdb : list) {
|
||||
if (!redisService.hasKey(Constant.JQ + jjdb.getJjdbh())) {
|
||||
this.tbSjzxAdaptRemoteService.addLzHndJq(jjdb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.mosty.lzother.task;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.mosty.lzother.service.VLz110TxjService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/12/15
|
||||
* 同步特巡警110警情数据
|
||||
**/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class SyncJqTask {
|
||||
|
||||
private final VLz110TxjService vLz110TxjService;
|
||||
public static boolean start = true;
|
||||
public static boolean jqxz = true;
|
||||
|
||||
@Scheduled(cron = "0/30 * * * * *")
|
||||
@Transactional
|
||||
public void run() {
|
||||
if (start) {
|
||||
log.info("同步特巡警110警情数据");
|
||||
this.vLz110TxjService.syncHndJq(null);
|
||||
this.vLz110TxjService.syncJqCjd(null);
|
||||
log.info("同步特巡警110警情数据--->结束");
|
||||
}
|
||||
}
|
||||
|
||||
//两分钟分钟分钟修正一次经纬度
|
||||
@Scheduled(cron = "0 */20 * * * ?")
|
||||
@Transactional
|
||||
public void selectJjdbh() {
|
||||
if (jqxz) {
|
||||
log.info("修改经纬度");
|
||||
this.vLz110TxjService.selectJjdbh();
|
||||
log.info("修改经纬度--->结束");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.mosty.lzother.utils;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.mosty.base.utils.Constant;
|
||||
import com.mosty.common.core.util.HttpClientUtil;
|
||||
import com.mosty.common.core.util.http.HttpUtils;
|
||||
import okhttp3.*;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.HttpResponse;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import java.net.URLDecoder;
|
||||
import java.net.URLEncoder;
|
||||
import java.security.KeyFactory;
|
||||
import java.security.PublicKey;
|
||||
import java.security.spec.X509EncodedKeySpec;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ArthenaTest {
|
||||
|
||||
/**
|
||||
* 注册到网关的调用方应用所属的公钥,用于加密需要加密的参数
|
||||
*/
|
||||
private static final String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCOA2uL+d+0/DC8laEG9xbsfYZd9eoSJephsUdrnF4zLV+btHVCu/9MMwN0KMomgL63VjDI/w8VwL7urDhW6jG8jmVcXJezU5VetfPpFIupNEYIgdOJ2V0nMJlbYPNXfTNHDx1V7hDb4gbCOxXIda8tJHWhTk0gMls84ElqK0+G2wIDAQAB";
|
||||
|
||||
private static final String rsaKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDbDiY4EyIXyS94pRMS18KP4wwCwnpncNYjj6y9WjdIxyz35Cs8UCKztPeeHZi7Pqovln/4ul3yzyU/A4RYEhwVLUr8bC8HHCHkINbI0aNLvS5uq3uZd7NbgjA/F1O0XvC0whVqCBLNM0HNtkUyGDGz9r1+X2DpaYyvCxD+Mt8BOQIDAQAB";
|
||||
/**
|
||||
* 注册到网关的调用方应用的key,作为唯一标识符
|
||||
*/
|
||||
private static final String athenaAppKey = "afbbc6936d0243aea4f421fbf2b6b75d";
|
||||
/**
|
||||
* 注册到网关的调用方应用的名字
|
||||
*/
|
||||
private static final String athenaAppName = "智慧派出所";
|
||||
|
||||
private static final String url = "/athena/forward/93AD36543A39D2505C70A56C66D6B9FCF195D02A717E51E34E29703D5C49ACC6";
|
||||
|
||||
private static final String ysToken = "bc837f91-76a7-4314-b4c0-db98d62b2931";
|
||||
|
||||
|
||||
private static String encryptData(String str, String publicKeyText) throws Exception {
|
||||
byte[] decoded = Base64.getDecoder().decode(publicKeyText);
|
||||
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(decoded);
|
||||
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
|
||||
PublicKey pk = keyFactory.generatePublic(keySpec);
|
||||
Cipher cipher = Cipher.getInstance("RSA");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, pk);
|
||||
byte[] encryptedData = cipher.doFinal(str.getBytes());
|
||||
return Base64.getEncoder().encodeToString(encryptedData);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,403 @@
|
||||
package com.mosty.lzother.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import okhttp3.*;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class OkHttpUtils {
|
||||
private static volatile OkHttpClient okHttpClient = null;
|
||||
private static volatile Semaphore semaphore = null;
|
||||
private Map<String, String> headerMap;
|
||||
private Map<String, Object> paramMap;
|
||||
private String url;
|
||||
private Request.Builder request;
|
||||
|
||||
/**
|
||||
* 初始化okHttpClient,并且允许https访问
|
||||
*/
|
||||
private OkHttpUtils() {
|
||||
if (okHttpClient == null) {
|
||||
synchronized (OkHttpUtils.class) {
|
||||
if (okHttpClient == null) {
|
||||
TrustManager[] trustManagers = buildTrustManagers();
|
||||
okHttpClient = new OkHttpClient.Builder().connectTimeout(15, TimeUnit.SECONDS).writeTimeout(20, TimeUnit.SECONDS).readTimeout(20, TimeUnit.SECONDS).sslSocketFactory(createSSLSocketFactory(trustManagers), (X509TrustManager) trustManagers[0]).hostnameVerifier((hostName, session) -> true).retryOnConnectionFailure(true).build();
|
||||
addHeader("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于异步请求时,控制访问线程数,返回结果
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static Semaphore getSemaphoreInstance() {
|
||||
//只能1个线程同时访问
|
||||
synchronized (OkHttpUtils.class) {
|
||||
if (semaphore == null) {
|
||||
semaphore = new Semaphore(0);
|
||||
}
|
||||
}
|
||||
return semaphore;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建OkHttpUtils
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static OkHttpUtils builder() {
|
||||
return new OkHttpUtils();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加url
|
||||
*
|
||||
* @param url
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils url(String url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加参数
|
||||
*
|
||||
* @param key 参数名
|
||||
* @param value 参数值
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils addParam(String key, Object value) {
|
||||
if (paramMap == null) {
|
||||
paramMap = new LinkedHashMap<>(16);
|
||||
}
|
||||
paramMap.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加请求头
|
||||
*
|
||||
* @param key 参数名
|
||||
* @param value 参数值
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils addHeader(String key, String value) {
|
||||
if (headerMap == null) {
|
||||
headerMap = new LinkedHashMap<>(16);
|
||||
}
|
||||
headerMap.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化get方法
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils get() {
|
||||
request = new Request.Builder().get();
|
||||
StringBuilder urlBuilder = new StringBuilder(url);
|
||||
if (paramMap != null) {
|
||||
urlBuilder.append("?");
|
||||
try {
|
||||
for (Map.Entry<String, Object> entry : paramMap.entrySet()) {
|
||||
urlBuilder.append(URLEncoder.encode(entry.getKey(), "utf-8")).append("=").append(URLEncoder.encode(entry.getValue().toString(), "utf-8")).append("&");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
urlBuilder.deleteCharAt(urlBuilder.length() - 1);
|
||||
}
|
||||
request.url(urlBuilder.toString());
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化delet方法
|
||||
*
|
||||
* @param isJsonPost true等于json的方式提交数据,类似postman里post方法的raw
|
||||
* false等于普通的表单提交
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils delete(boolean isJsonPost) {
|
||||
RequestBody requestBody;
|
||||
if (isJsonPost) {
|
||||
String json = "";
|
||||
if (paramMap != null) {
|
||||
json = JSON.toJSONString(paramMap);
|
||||
}
|
||||
requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
|
||||
} else {
|
||||
FormBody.Builder formBody = new FormBody.Builder();
|
||||
if (paramMap != null) {
|
||||
paramMap.forEach((key,value) ->{
|
||||
formBody.add(key, String.valueOf(value));
|
||||
});
|
||||
}
|
||||
requestBody = formBody.build();
|
||||
}
|
||||
request = new Request.Builder().delete(requestBody).url(url);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化post方法
|
||||
*
|
||||
* @param isJsonPost true等于json的方式提交数据,类似postman里post方法的raw
|
||||
* false等于普通的表单提交
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils post(boolean isJsonPost) {
|
||||
RequestBody requestBody;
|
||||
if (isJsonPost) {
|
||||
String json = "";
|
||||
if (paramMap != null) {
|
||||
json = JSON.toJSONString(paramMap);
|
||||
}
|
||||
requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
|
||||
} else {
|
||||
FormBody.Builder formBody = new FormBody.Builder();
|
||||
if (paramMap != null) {
|
||||
paramMap.forEach((key,value) ->{
|
||||
formBody.add(key, String.valueOf(value));
|
||||
});
|
||||
}
|
||||
requestBody = formBody.build();
|
||||
}
|
||||
request = new Request.Builder().post(requestBody).url(url);
|
||||
return this;
|
||||
}
|
||||
|
||||
public OkHttpUtils post(Map<String, Object> data, boolean isJsonPost) {
|
||||
RequestBody requestBody;
|
||||
if (isJsonPost) {
|
||||
String json = "";
|
||||
if (data != null) {
|
||||
json = JSON.toJSONString(data);
|
||||
}
|
||||
requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
|
||||
} else {
|
||||
FormBody.Builder formBody = new FormBody.Builder();
|
||||
if (data != null) {
|
||||
data.forEach((key,value) ->{
|
||||
formBody.add(key, String.valueOf(value));
|
||||
});
|
||||
}
|
||||
requestBody = formBody.build();
|
||||
}
|
||||
request = new Request.Builder().post(requestBody).url(url);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化post方法
|
||||
*
|
||||
* @param isJsonPut true等于json的方式提交数据,类似postman里post方法的raw
|
||||
* false等于普通的表单提交
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils put(boolean isJsonPut) {
|
||||
RequestBody requestBody;
|
||||
if (isJsonPut) {
|
||||
String json = "";
|
||||
if (paramMap != null) {
|
||||
json = JSON.toJSONString(paramMap);
|
||||
}
|
||||
requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
|
||||
} else {
|
||||
FormBody.Builder formBody = new FormBody.Builder();
|
||||
if (paramMap != null) {
|
||||
paramMap.forEach((key,value) ->{
|
||||
formBody.add(key, String.valueOf(value));
|
||||
});
|
||||
}
|
||||
requestBody = formBody.build();
|
||||
}
|
||||
request = new Request.Builder().put(requestBody).url(url);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* 初始化post方法
|
||||
*
|
||||
* @param isJsonPut true等于json的方式提交数据,类似postman里post方法的raw
|
||||
* false等于普通的表单提交
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils put(Map<String, Object> data, boolean isJsonPut) {
|
||||
RequestBody requestBody;
|
||||
if (isJsonPut) {
|
||||
String json = "";
|
||||
if (data != null) {
|
||||
json = JSON.toJSONString(data);
|
||||
}
|
||||
requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
|
||||
} else {
|
||||
FormBody.Builder formBody = new FormBody.Builder();
|
||||
if (data != null) {
|
||||
data.forEach((key,value) ->{
|
||||
formBody.add(key, String.valueOf(value));
|
||||
});
|
||||
}
|
||||
requestBody = formBody.build();
|
||||
}
|
||||
request = new Request.Builder().put(requestBody).url(url);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步请求
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String sync() {
|
||||
setHeader(request);
|
||||
try {
|
||||
Response response = okHttpClient.newCall(request.build()).execute();
|
||||
assert response.body() != null;
|
||||
System.out.println(response.headers().toString());
|
||||
return response.body().string();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return "请求失败:" + e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
public Headers syncHeader() {
|
||||
setHeader(request);
|
||||
try {
|
||||
Response response = okHttpClient.newCall(request.build()).execute();
|
||||
System.out.println(response.headers());
|
||||
return response.headers();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 异步请求,有返回值
|
||||
*/
|
||||
public String async() {
|
||||
StringBuilder buffer = new StringBuilder("");
|
||||
setHeader(request);
|
||||
okHttpClient.newCall(request.build()).enqueue(new Callback() {
|
||||
@Override
|
||||
public void onFailure(Call call, IOException e) {
|
||||
buffer.append("请求出错:").append(e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) throws IOException {
|
||||
assert response.body() != null;
|
||||
buffer.append(response.body().string());
|
||||
getSemaphoreInstance().release();
|
||||
}
|
||||
});
|
||||
try {
|
||||
getSemaphoreInstance().acquire();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步请求,带有接口回调
|
||||
*
|
||||
* @param callBack
|
||||
*/
|
||||
public void async(ICallBack callBack) {
|
||||
setHeader(request);
|
||||
okHttpClient.newCall(request.build()).enqueue(new Callback() {
|
||||
@Override
|
||||
public void onFailure(Call call, IOException e) {
|
||||
callBack.onFailure(call, e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) throws IOException {
|
||||
assert response.body() != null;
|
||||
callBack.onSuccessful(call, response.body().string());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 为request添加请求头
|
||||
*
|
||||
* @param request
|
||||
*/
|
||||
private void setHeader(Request.Builder request) {
|
||||
if (headerMap != null) {
|
||||
try {
|
||||
for (Map.Entry<String, String> entry : headerMap.entrySet()) {
|
||||
request.addHeader(entry.getKey(), entry.getValue());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成安全套接字工厂,用于https请求的证书跳过
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static SSLSocketFactory createSSLSocketFactory(TrustManager[] trustAllCerts) {
|
||||
SSLSocketFactory ssfFactory = null;
|
||||
try {
|
||||
SSLContext sc = SSLContext.getInstance("SSL");
|
||||
sc.init(null, trustAllCerts, new SecureRandom());
|
||||
ssfFactory = sc.getSocketFactory();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return ssfFactory;
|
||||
}
|
||||
|
||||
private static TrustManager[] buildTrustManagers() {
|
||||
return new TrustManager[]{new X509TrustManager() {
|
||||
@Override
|
||||
public void checkClientTrusted(X509Certificate[] chain, String authType) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkServerTrusted(X509Certificate[] chain, String authType) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public X509Certificate[] getAcceptedIssuers() {
|
||||
return new X509Certificate[]{};
|
||||
}
|
||||
}};
|
||||
}
|
||||
/**
|
||||
* 自定义一个接口回调
|
||||
*/
|
||||
public interface ICallBack {
|
||||
|
||||
void onSuccessful(Call call, String data);
|
||||
|
||||
void onFailure(Call call, String errorMsg);
|
||||
|
||||
}
|
||||
}
|
278
mosty-other/src/main/java/com/mosty/lzother/utils/RSAUtil.java
Normal file
278
mosty-other/src/main/java/com/mosty/lzother/utils/RSAUtil.java
Normal file
@ -0,0 +1,278 @@
|
||||
package com.mosty.lzother.utils;
|
||||
|
||||
|
||||
import org.apache.tomcat.util.codec.binary.Base64;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import java.security.*;
|
||||
import java.security.spec.PKCS8EncodedKeySpec;
|
||||
import java.security.spec.X509EncodedKeySpec;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* RSA加密和解密工具
|
||||
*/
|
||||
public class RSAUtil {
|
||||
|
||||
/**
|
||||
* 数字签名,密钥算法
|
||||
*/
|
||||
private static final String RSA_KEY_ALGORITHM = "RSA";
|
||||
|
||||
/**
|
||||
* 数字签名签名/验证算法
|
||||
*/
|
||||
private static final String SIGNATURE_ALGORITHM = "MD5withRSA";
|
||||
|
||||
/**
|
||||
* RSA密钥长度,RSA算法的默认密钥长度是1024密钥长度必须是64的倍数,在512到65536位之间
|
||||
*/
|
||||
private static final int KEY_SIZE = 1024;
|
||||
|
||||
/**
|
||||
* 生成密钥对
|
||||
*/
|
||||
private static Map<String, String> initKey() throws Exception {
|
||||
KeyPairGenerator keygen = KeyPairGenerator.getInstance(RSA_KEY_ALGORITHM);
|
||||
SecureRandom secrand = new SecureRandom();
|
||||
/**
|
||||
* 初始化随机产生器
|
||||
*/
|
||||
secrand.setSeed("initSeed".getBytes());
|
||||
/**
|
||||
* 初始化密钥生成器
|
||||
*/
|
||||
keygen.initialize(KEY_SIZE, secrand);
|
||||
KeyPair keys = keygen.genKeyPair();
|
||||
|
||||
byte[] pub_key = keys.getPublic().getEncoded();
|
||||
String publicKeyString = Base64.encodeBase64String(pub_key);
|
||||
|
||||
byte[] pri_key = keys.getPrivate().getEncoded();
|
||||
String privateKeyString = Base64.encodeBase64String(pri_key);
|
||||
|
||||
Map<String, String> keyPairMap = new HashMap<>();
|
||||
keyPairMap.put("publicKeyString", publicKeyString);
|
||||
keyPairMap.put("privateKeyString", privateKeyString);
|
||||
|
||||
return keyPairMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 密钥转成字符串
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public static String encodeBase64String(byte[] key) {
|
||||
return Base64.encodeBase64String(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 密钥转成byte[]
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public static byte[] decodeBase64(String key) {
|
||||
return Base64.decodeBase64(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公钥加密
|
||||
*
|
||||
* @param data 加密前的字符串
|
||||
* @param publicKey 公钥
|
||||
* @return 加密后的字符串
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String encryptByPubKey(String data, String publicKey) throws Exception {
|
||||
byte[] pubKey = com.mosty.common.core.util.RSAUtil.decodeBase64(publicKey);
|
||||
byte[] enSign = encryptByPubKey(data.getBytes(), pubKey);
|
||||
return Base64.encodeBase64String(enSign);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公钥加密
|
||||
*
|
||||
* @param data 待加密数据
|
||||
* @param pubKey 公钥
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static byte[] encryptByPubKey(byte[] data, byte[] pubKey) throws Exception {
|
||||
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(pubKey);
|
||||
KeyFactory keyFactory = KeyFactory.getInstance(RSA_KEY_ALGORITHM);
|
||||
PublicKey publicKey = keyFactory.generatePublic(x509KeySpec);
|
||||
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
|
||||
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
|
||||
return cipher.doFinal(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私钥加密
|
||||
*
|
||||
* @param data 加密前的字符串
|
||||
* @param privateKey 私钥
|
||||
* @return 加密后的字符串
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String encryptByPriKey(String data, String privateKey) throws Exception {
|
||||
byte[] priKey = com.mosty.common.core.util.RSAUtil.decodeBase64(privateKey);
|
||||
byte[] enSign = encryptByPriKey(data.getBytes(), priKey);
|
||||
return Base64.encodeBase64String(enSign);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私钥加密
|
||||
*
|
||||
* @param data 待加密的数据
|
||||
* @param priKey 私钥
|
||||
* @return 加密后的数据
|
||||
* @throws Exception
|
||||
*/
|
||||
public static byte[] encryptByPriKey(byte[] data, byte[] priKey) throws Exception {
|
||||
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(priKey);
|
||||
KeyFactory keyFactory = KeyFactory.getInstance(RSA_KEY_ALGORITHM);
|
||||
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8KeySpec);
|
||||
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
|
||||
cipher.init(Cipher.ENCRYPT_MODE, privateKey);
|
||||
return cipher.doFinal(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公钥解密
|
||||
*
|
||||
* @param data 待解密的数据
|
||||
* @param pubKey 公钥
|
||||
* @return 解密后的数据
|
||||
* @throws Exception
|
||||
*/
|
||||
public static byte[] decryptByPubKey(byte[] data, byte[] pubKey) throws Exception {
|
||||
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(pubKey);
|
||||
KeyFactory keyFactory = KeyFactory.getInstance(RSA_KEY_ALGORITHM);
|
||||
PublicKey publicKey = keyFactory.generatePublic(x509KeySpec);
|
||||
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
|
||||
cipher.init(Cipher.DECRYPT_MODE, publicKey);
|
||||
return cipher.doFinal(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公钥解密
|
||||
*
|
||||
* @param data 解密前的字符串
|
||||
* @param publicKey 公钥
|
||||
* @return 解密后的字符串
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String decryptByPubKey(String data, String publicKey) throws Exception {
|
||||
byte[] pubKey = com.mosty.common.core.util.RSAUtil.decodeBase64(publicKey);
|
||||
byte[] design = decryptByPubKey(Base64.decodeBase64(data), pubKey);
|
||||
return new String(design);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私钥解密
|
||||
*
|
||||
* @param data 待解密的数据
|
||||
* @param priKey 私钥
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static byte[] decryptByPriKey(byte[] data, byte[] priKey) throws Exception {
|
||||
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(priKey);
|
||||
KeyFactory keyFactory = KeyFactory.getInstance(RSA_KEY_ALGORITHM);
|
||||
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8KeySpec);
|
||||
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
|
||||
cipher.init(Cipher.DECRYPT_MODE, privateKey);
|
||||
return cipher.doFinal(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私钥解密
|
||||
*
|
||||
* @param data 解密前的字符串
|
||||
* @param privateKey 私钥
|
||||
* @return 解密后的字符串
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String decryptByPriKey(String data, String privateKey) throws Exception {
|
||||
byte[] priKey = com.mosty.common.core.util.RSAUtil.decodeBase64(privateKey);
|
||||
byte[] design = decryptByPriKey(Base64.decodeBase64(data), priKey);
|
||||
return new String(design);
|
||||
}
|
||||
|
||||
/**
|
||||
* RSA签名
|
||||
*
|
||||
* @param data 待签名数据
|
||||
* @param priKey 私钥
|
||||
* @return 签名
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String sign(byte[] data, byte[] priKey) throws Exception {
|
||||
// 取得私钥
|
||||
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(priKey);
|
||||
KeyFactory keyFactory = KeyFactory.getInstance(RSA_KEY_ALGORITHM);
|
||||
// 生成私钥
|
||||
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8KeySpec);
|
||||
// 实例化Signature
|
||||
Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM);
|
||||
// 初始化Signature
|
||||
signature.initSign(privateKey);
|
||||
// 更新
|
||||
signature.update(data);
|
||||
return Base64.encodeBase64String(signature.sign());
|
||||
}
|
||||
|
||||
/**
|
||||
* RSA校验数字签名
|
||||
*
|
||||
* @param data 待校验数据
|
||||
* @param sign 数字签名
|
||||
* @param pubKey 公钥
|
||||
* @return boolean 校验成功返回true,失败返回false
|
||||
*/
|
||||
public boolean verify(byte[] data, byte[] sign, byte[] pubKey) throws Exception {
|
||||
// 实例化密钥工厂
|
||||
KeyFactory keyFactory = KeyFactory.getInstance(RSA_KEY_ALGORITHM);
|
||||
// 初始化公钥
|
||||
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(pubKey);
|
||||
// 产生公钥
|
||||
PublicKey publicKey = keyFactory.generatePublic(x509KeySpec);
|
||||
// 实例化Signature
|
||||
Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM);
|
||||
// 初始化Signature
|
||||
signature.initVerify(publicKey);
|
||||
// 更新
|
||||
signature.update(data);
|
||||
// 验证
|
||||
return signature.verify(sign);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
Map<String, String> keyMap = initKey();
|
||||
String publicKeyString = keyMap.get("publicKeyString");
|
||||
String privateKeyString = keyMap.get("privateKeyString");
|
||||
System.out.println("公钥:" + publicKeyString);
|
||||
System.out.println("私钥:" + privateKeyString);
|
||||
|
||||
// 待加密数据
|
||||
String data = "admin123";
|
||||
// 公钥加密
|
||||
String encrypt = com.mosty.common.core.util.RSAUtil.encryptByPubKey(data, publicKeyString);
|
||||
// 私钥解密
|
||||
String decrypt = com.mosty.common.core.util.RSAUtil.decryptByPriKey(encrypt, privateKeyString);
|
||||
|
||||
System.out.println("加密前:" + data);
|
||||
System.out.println("加密后:" + encrypt);
|
||||
System.out.println("解密后:" + decrypt);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
55
mosty-other/src/main/resources/application.yml
Normal file
55
mosty-other/src/main/resources/application.yml
Normal file
@ -0,0 +1,55 @@
|
||||
ribbon:
|
||||
ReadTimeout: 600000
|
||||
ConnectTimeout: 600000
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 100MB
|
||||
max-request-size: 100MB
|
||||
jackson:
|
||||
serialization:
|
||||
write-dates-as-timestamps: false
|
||||
# # 格式化返回时间 yyyy-MM-dd HH:mm:ss
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: GMT+8
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
dynamic:
|
||||
primary: jq
|
||||
strict: false
|
||||
datasource:
|
||||
jq:
|
||||
url: jdbc:postgresql://80.85.6.57:5431/mti-cad
|
||||
username: qcck_test
|
||||
password: 12345678abc
|
||||
driver-class-name: org.postgresql.Driver
|
||||
|
||||
redis:
|
||||
database: 8
|
||||
# Redis服务器地址
|
||||
host: 192.168.200.131
|
||||
# Redis服务器连接端口
|
||||
port: 6379
|
||||
# Redis服务器连接密码(默认为空)
|
||||
password: mosty888
|
||||
# 连接超时时间(毫秒)
|
||||
timeout: 2000
|
||||
|
||||
swagger:
|
||||
host: 80.93.7.13
|
||||
port: 8010
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
exclude:
|
||||
pathPatterns:
|
||||
swagger:
|
||||
- /swagger-resources/**
|
||||
- /webjars/**
|
||||
- /v2/**
|
||||
- /swagger-ui.html/**
|
||||
- /docs.html/**
|
||||
|
||||
config:
|
||||
orgCode: 510600000000
|
24
mosty-other/src/main/resources/bootstrap.yml
Normal file
24
mosty-other/src/main/resources/bootstrap.yml
Normal file
@ -0,0 +1,24 @@
|
||||
server:
|
||||
port: 8025
|
||||
servlet:
|
||||
context-path: /mosty-other/
|
||||
spring:
|
||||
application:
|
||||
name: mosty-other
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
namespace: 657d1843-b590-41ac-b5e7-5d261bf00de9
|
||||
server-addr: 192.168.200.131:8848
|
||||
register-enabled: true # 是否将自己注册到配置中心,让其他服务发现调用(本地调试使用)
|
||||
# 开启健康监控
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
auditevents:
|
||||
enabled: true
|
114
mosty-other/src/main/resources/logback-spring.xml
Normal file
114
mosty-other/src/main/resources/logback-spring.xml
Normal file
@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<jmxConfigurator/>
|
||||
<property name="PROJECT_NAME" value="msxf-retail-sort" />
|
||||
<property name="LOG_FILE_INFO" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-info.log" />
|
||||
<property name="LOG_FILE_WARN" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-warn.log" />
|
||||
<property name="LOG_FILE_ERR" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-error.log" />
|
||||
<property name="LOG_BUSINESS" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/business/business-2de.log"/>
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
||||
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
|
||||
<contextName>${PROJECT_NAME}</contextName>
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<appender name="LOG_FILE_INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>INFO</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_INFO}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_INFO}-7de.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<appender name="LOG_FILE_WARN"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>WARN</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_WARN}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_WARN}-30de.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<appender name="LOG_FILE_ERROR"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_ERR}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_ERR}.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>512MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<!--添加监控日志 -->
|
||||
<appender name="business-log-appender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>info</level>
|
||||
</filter>
|
||||
<file>${LOG_BUSINESS}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_BUSINESS}.%d{yyyy-MM-dd}.%i
|
||||
</fileNamePattern>
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="business-log" additivity="false" level="info">
|
||||
<appender-ref ref="business-log-appender"/>
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</logger>
|
||||
<!-- show parameters for hibernate sql 专为 Hibernate 定制 -->
|
||||
<logger name="logging.level.jdbc" level="INFO" />
|
||||
<logger name="logging.level.jdbc.sqlonly" level="INFO" />
|
||||
<logger name="org.springframework" level="INFO" additivity="true" />
|
||||
<Logger name="jdbc.sqlonly" level="info" />
|
||||
<Logger name="jdbc.sqltiming" level="warn" />
|
||||
<Logger name="jdbc.audit" level="warn" />
|
||||
<Logger name="jdbc.resultset" level="warn" />
|
||||
<Logger name="jdbc.resultsettable" level="warn" />
|
||||
<logger name="jdbc.connection" level="warn" />
|
||||
<Logger name="log4jdbc.debug" level="warn" />
|
||||
<Logger name="org.apache.kafka.clients.NetworkClient" level="ERROR" />
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
<appender-ref ref="LOG_FILE_INFO" />
|
||||
<appender-ref ref="LOG_FILE_WARN" />
|
||||
<appender-ref ref="LOG_FILE_ERROR" />
|
||||
</root>
|
||||
</configuration>
|
Reference in New Issue
Block a user