Commit b70abedb by Simon Cheng

Merge branch 'dev'

创建车险基础架构,铭感信息加解密,芝麻车险统一连接方式
parents 199a899c e3df6806
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
......
<factorypath> <factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/fastjson/1.2.47/fastjson-1.2.47.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/fastjson/1.2.47/fastjson-1.2.47.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/aliyun/aliyun-java-sdk-core/3.7.1/aliyun-java-sdk-core-3.7.1.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/json/json/20140107/json-20140107.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/aliyun/aliyun-java-sdk-dysmsapi/1.1.0/aliyun-java-sdk-dysmsapi-1.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/druid/1.1.6/druid-1.1.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ajb-car/ajb-common-utils/0.0.1-SNAPSHOT/ajb-common-utils-0.0.1-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-web/1.5.3.RELEASE/spring-boot-starter-web-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-web/1.5.3.RELEASE/spring-boot-starter-web-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter/1.5.3.RELEASE/spring-boot-starter-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter/1.5.3.RELEASE/spring-boot-starter-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot/1.5.3.RELEASE/spring-boot-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-autoconfigure/1.5.3.RELEASE/spring-boot-autoconfigure-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-logging/1.5.3.RELEASE/spring-boot-starter-logging-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-logging/1.5.3.RELEASE/spring-boot-starter-logging-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.1.11/logback-core-1.1.11.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.1.11/logback-core-1.1.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/4.3.8.RELEASE/spring-core-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-tomcat/1.5.3.RELEASE/spring-boot-starter-tomcat-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-core/8.5.14/tomcat-embed-core-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-el/8.5.14/tomcat-embed-el-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.14/tomcat-embed-websocket-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-validator/5.3.5.Final/hibernate-validator-5.3.5.Final.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-validator/5.3.5.Final/hibernate-validator-5.3.5.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.3.1.Final/jboss-logging-3.3.1.Final.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.3.1.Final/jboss-logging-3.3.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/classmate/1.3.3/classmate-1.3.3.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/classmate/1.3.3/classmate-1.3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.8.8/jackson-databind-2.8.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.8.8/jackson-core-2.8.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/4.3.8.RELEASE/spring-web-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/4.3.8.RELEASE/spring-aop-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/4.3.8.RELEASE/spring-beans-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/4.3.8.RELEASE/spring-context-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/4.3.8.RELEASE/spring-webmvc-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/4.3.8.RELEASE/spring-expression-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okhttp3/okhttp/3.6.0/okhttp-3.6.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okio/okio/1.11.0/okio-1.11.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.10/commons-codec-1.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpmime/4.5.3/httpmime-4.5.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/sf/ehcache/ehcache/2.10.4/ehcache-2.10.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml/3.9/poi-ooxml-3.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi/3.9/poi-3.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml-schemas/3.9/poi-ooxml-schemas-3.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/druid/1.1.6/druid-1.1.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-jpa/1.5.3.RELEASE/spring-boot-starter-data-jpa-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-jpa/1.5.3.RELEASE/spring-boot-starter-data-jpa-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-aop/1.5.3.RELEASE/spring-boot-starter-aop-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-aop/1.5.3.RELEASE/spring-boot-starter-aop-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar" enabled="true" runInBatchMode="false"/>
...@@ -25,7 +58,6 @@ ...@@ -25,7 +58,6 @@
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/tomcat-juli/8.5.14/tomcat-juli-8.5.14.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/tomcat-juli/8.5.14/tomcat-juli-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/4.3.8.RELEASE/spring-jdbc-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/4.3.8.RELEASE/spring-jdbc-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-core/5.0.12.Final/hibernate-core-5.0.12.Final.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-core/5.0.12.Final/hibernate-core-5.0.12.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/jandex/2.0.0.Final/jandex-2.0.0.Final.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/jandex/2.0.0.Final/jandex-2.0.0.Final.jar" enabled="true" runInBatchMode="false"/>
...@@ -39,41 +71,30 @@ ...@@ -39,41 +71,30 @@
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aspects/4.3.8.RELEASE/spring-aspects-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aspects/4.3.8.RELEASE/spring-aspects-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-configuration-processor/1.5.3.RELEASE/spring-boot-configuration-processor-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-configuration-processor/1.5.3.RELEASE/spring-boot-configuration-processor-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okhttp3/okhttp/3.6.0/okhttp-3.6.0.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-test/1.5.3.RELEASE/spring-boot-starter-test-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okio/okio/1.11.0/okio-1.11.0.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-test/1.5.3.RELEASE/spring-boot-test-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-test-autoconfigure/1.5.3.RELEASE/spring-boot-test-autoconfigure-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/jayway/jsonpath/json-path/2.2.0/json-path-2.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/json-smart/2.2.1/json-smart-2.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpmime/4.5.3/httpmime-4.5.3.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/accessors-smart/1.1/accessors-smart-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/sf/ehcache/ehcache/2.10.4/ehcache-2.10.4.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/junit/junit/4.12/junit-4.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml/3.9/poi-ooxml-3.9.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/assertj/assertj-core/2.6.0/assertj-core-2.6.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi/3.9/poi-3.9.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml-schemas/3.9/poi-ooxml-schemas-3.9.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/objenesis/objenesis/2.1/objenesis-2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/skyscreamer/jsonassert/1.4.0/jsonassert-1.4.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-test/4.3.8.RELEASE/spring-test-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot/1.5.3.RELEASE/spring-boot-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/5.1.41/mysql-connector-java-5.1.41.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-autoconfigure/1.5.3.RELEASE/spring-boot-autoconfigure-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/druid/1.0.31/druid-1.0.31.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/4.3.8.RELEASE/spring-core-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/googlecode/log4jdbc/log4jdbc/1.2/log4jdbc-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/4.3.8.RELEASE/spring-aop-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/swetake/util/Qrcode/1.0/Qrcode-1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/4.3.8.RELEASE/spring-context-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/aliyun/aliyun-java-sdk-core/3.2.3/aliyun-java-sdk-core-3.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/4.3.8.RELEASE/spring-expression-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/aliyun/aliyun-java-sdk-dysmsapi/3.2.3/aliyun-java-sdk-dysmsapi-3.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/4.3.8.RELEASE/spring-beans-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/aliyun/aliyun-java-sdk-dm/3.1.0/aliyun-java-sdk-dm-3.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/sun/mail/javax.mail/1.5.6/javax.mail-1.5.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-tomcat/1.5.3.RELEASE/spring-boot-starter-tomcat-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-core/8.5.14/tomcat-embed-core-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-el/8.5.14/tomcat-embed-el-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.14/tomcat-embed-websocket-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.8.8/jackson-databind-2.8.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.8.8/jackson-core-2.8.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/4.3.8.RELEASE/spring-web-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/4.3.8.RELEASE/spring-webmvc-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.10/commons-codec-1.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-devtools/1.5.3.RELEASE/spring-boot-devtools-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-devtools/1.5.3.RELEASE/spring-boot-devtools-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-jasper/8.5.14/tomcat-embed-jasper-8.5.14.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-jasper/8.5.14/tomcat-embed-jasper-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/jdt/core/compiler/ecj/4.6.1/ecj-4.6.1.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/jdt/core/compiler/ecj/4.6.1/ecj-4.6.1.jar" enabled="true" runInBatchMode="false"/>
...@@ -86,6 +107,7 @@ ...@@ -86,6 +107,7 @@
<factorypathentry kind="VARJAR" id="M2_REPO/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-digester/commons-digester/2.1/commons-digester-2.1.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/commons-digester/commons-digester/2.1/commons-digester-2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-net/commons-net/1.4.1/commons-net-1.4.1.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/commons-net/commons-net/1.4.1/commons-net-1.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar" enabled="true" runInBatchMode="false"/>
...@@ -110,22 +132,5 @@ ...@@ -110,22 +132,5 @@
<factorypathentry kind="VARJAR" id="M2_REPO/org/quartz-scheduler/quartz/2.2.1/quartz-2.2.1.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/quartz-scheduler/quartz/2.2.1/quartz-2.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/c3p0/c3p0/0.9.1.1/c3p0-0.9.1.1.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/c3p0/c3p0/0.9.1.1/c3p0-0.9.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/mobile/spring-mobile-device/1.1.5.RELEASE/spring-mobile-device-1.1.5.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/mobile/spring-mobile-device/1.1.5.RELEASE/spring-mobile-device-1.1.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alipay/sdk/alipay-sdk-java/3.0.0/alipay-sdk-java-3.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/binarywang/weixin-java-mp/3.0.0/weixin-java-mp-3.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/binarywang/weixin-java-common/3.0.0/weixin-java-common-3.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/thoughtworks/xstream/xstream/1.4.9/xstream-1.4.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/20.0/guava-20.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/binarywang/weixin-java-pay/3.0.0/weixin-java-pay-3.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/binarywang/qrcode-utils/1.1/qrcode-utils-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/zxing/core/3.2.1/core-3.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcpkix-jdk15on/1.59/bcpkix-jdk15on-1.59.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.59/bcprov-jdk15on-1.59.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/jsonwebtoken/jjwt/0.6.0/jjwt-0.6.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="PLUGIN" id="org.eclipse.jst.ws.annotations.core" enabled="true" runInBatchMode="false"/> <factorypathentry kind="PLUGIN" id="org.eclipse.jst.ws.annotations.core" enabled="true" runInBatchMode="false"/>
</factorypath> </factorypath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="src/main/webapp"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/main/resources/application-dev.properties=UTF-8
encoding//src/main/resources/application-local.properties=UTF-8
encoding//src/main/resources/application-prod.properties=UTF-8
encoding//src/main/resources/application-stage.properties=UTF-8
encoding//src/main/resources/application.properties=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8
encoding/pom.xml=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.source=1.8
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="synch">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/.apt_generated"/>
<dependent-module archiveName="ajb-car-vo-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ajb-car-vo/ajb-car-vo">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="ajb-car-entity-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ajb-car-entity/ajb-car-entity">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="ajb-car-jpa-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ajb-car-jpa/ajb-car-jpa">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/ajb-car-api/target/classes"/>
<property name="context-root" value="synch"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="ajb-api">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/.apt_generated"/>
<dependent-module archiveName="ajb-car-vo-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ajb-car-vo/ajb-car-vo">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="ajb-car-entity-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ajb-car-entity/ajb-car-entity">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="ajb-car-jpa-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ajb-car-jpa/ajb-car-jpa">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/ajb-api/target/classes"/>
<property name="context-root" value="ajb-api"/>
</wb-module>
</project-modules>
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
eclipse.preferences.version=1
org.springframework.ide.eclipse.core.builders.enable.aopreferencemodelbuilder=true
org.springframework.ide.eclipse.core.builders.enable.beanmetadatabuilder=true
org.springframework.ide.eclipse.core.enable.project.preferences=false
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.bestpractices.beansvalidator=false
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.boot.bootvalidator=true
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.core.springvalidator=false
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.data.core.datavalidator=true
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.autowire.autowire-org.springframework.ide.eclipse.beans.core.beansvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinition-org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinitionHolder-org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanFactory-org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.methodOverride-org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.parsingProblems-org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.toolAnnotation-org.springframework.ide.eclipse.beans.core.beansvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.AvoidDriverManagerDataSource-org.springframework.ide.eclipse.bestpractices.beansvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.ImportElementsAtTopRulee-org.springframework.ide.eclipse.bestpractices.beansvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.ParentBeanSpecifiesAbstractClassRule-org.springframework.ide.eclipse.bestpractices.beansvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.RefElementRule-org.springframework.ide.eclipse.bestpractices.beansvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.TooManyBeansInFileRule-org.springframework.ide.eclipse.bestpractices.beansvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.UnnecessaryValueElementRule-org.springframework.ide.eclipse.bestpractices.beansvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.UseBeanInheritance-org.springframework.ide.eclipse.bestpractices.beansvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.legacyxmlusage.jndiobjectfactory-org.springframework.ide.eclipse.bestpractices.beansvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.boot.missingConfigurationProcessor-org.springframework.ide.eclipse.boot.bootvalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.core.springClasspath-org.springframework.ide.eclipse.core.springvalidator=false
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.data.core.invalidDerivedQuery-org.springframework.ide.eclipse.data.core.datavalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.data.core.invalidParameterType-org.springframework.ide.eclipse.data.core.datavalidator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.action-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.actionstate-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attribute-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attributemapper-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.beanaction-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationaction-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationresult-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.exceptionhandler-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.import-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.inputattribute-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.mapping-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.outputattribute-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.set-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.state-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.subflowstate-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.transition-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.variable-org.springframework.ide.eclipse.webflow.core.validator=true
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.webflowstate-org.springframework.ide.eclipse.webflow.core.validator=true
...@@ -8,7 +8,10 @@ ...@@ -8,7 +8,10 @@
<artifactId>ajb-car</artifactId> <artifactId>ajb-car</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
<groupId>ajb-car-app</groupId>
<artifactId>ajb-car-api</artifactId> <artifactId>ajb-car-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>ajb-car-api</name> <name>ajb-car-api</name>
<packaging>war</packaging> <packaging>war</packaging>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
...@@ -19,25 +22,25 @@ ...@@ -19,25 +22,25 @@
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>ajb-car</groupId> <groupId>ajb-car-app</groupId>
<artifactId>ajb-car-vo</artifactId> <artifactId>ajb-car-vo</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ajb-car</groupId> <groupId>ajb-car-app</groupId>
<artifactId>ajb-common-utils</artifactId> <artifactId>ajb-car-entity</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ajb-car</groupId> <groupId>ajb-car-app</groupId>
<artifactId>ajb-car-entity</artifactId> <artifactId>ajb-car-utils</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ajb-car</groupId> <groupId>ajb-car-app</groupId>
<artifactId>ajb-car-jpa</artifactId> <artifactId>ajb-car-jpa</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</dependency> </dependency>
...@@ -110,23 +113,11 @@ ...@@ -110,23 +113,11 @@
<groupId>org.springframework.mobile</groupId> <groupId>org.springframework.mobile</groupId>
<artifactId>spring-mobile-device</artifactId> <artifactId>spring-mobile-device</artifactId>
</dependency> </dependency>
<!--
<dependency>
<groupId>org.jeecg</groupId>
<artifactId>easypoi-base</artifactId>
<version>2.3.1</version>
</dependency>
<dependency> <dependency>
<groupId>org.jeecg</groupId> <groupId>io.jsonwebtoken</groupId>
<artifactId>easypoi-web</artifactId> <artifactId>jjwt</artifactId>
<version>2.3.1</version> <version>0.6.0</version>
</dependency> </dependency>
<dependency>
<groupId>org.jeecg</groupId>
<artifactId>easypoi-annotation</artifactId>
<version>2.3.1</version>
</dependency>
-->
</dependencies> </dependencies>
<!-- 打包spring boot应用 --> <!-- 打包spring boot应用 -->
<build> <build>
...@@ -142,4 +133,5 @@ ...@@ -142,4 +133,5 @@
</plugins> </plugins>
<finalName>carapi</finalName> <finalName>carapi</finalName>
</build> </build>
</project> </project>
package com.ajb.car.apimessage;
public class originmessage {
}
package com.ajb.car.schedule;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ajb.car.entity.apimessage.AgTransVehicleMsgOrigin;
import com.ajb.car.entity.quotation.AgPoQuotation;
import com.ajb.car.metadata.service.SystemConfigService;
import com.ajb.car.quotation.AgPoQuotationWebService;
import com.ajb.car.quotation.service.AgPoQuotationService;
import com.ajb.car.quotation.service.AgTransVehicleMsgOriginService;
import com.ajb.car.vo.zhima.TokenZhiMa;
import com.ajb.car.vo.zhima.policy.PolicyInfo;
import com.ajb.car.vo.zhima.policy.PolicyResponse;
import com.ajb.car.vo.zhima.quotation.QuotationDetail;
import com.ajb.car.vo.zhima.quotation.QuotationResponse;
import com.ajb.common.utils.http.HttpHelpZhiMa;
import com.alibaba.fastjson.JSON;
/**
* 定时任务
* @service和@Component有一个即可,否则自动任务不会被启动
* @EnableScheduling 是必须
*/
@Service("ScheduledTaskService")
//@EnableScheduling
public class ScheduledTaskService {
@Autowired
private SystemConfigService systemConfigService;
@Autowired
AgPoQuotationWebService agPoQuotationWebService;
@Autowired
AgPoQuotationService agPoQuotationService;
//Map<String , String> map = new HashMap<String , String>();
private static String hostURL = "";// "https://baoxian.linkersoft.com/tbjap/";
//获取token
//private static String auth2ParamTest = "{\r\n\t\"unitid\": \"LKTEST\",\r\n\t\"pwd\": \"password\",\r\n\t\"secretid\": \"1aaca8b5fb364267a9d3b56474157cf6\"\r\n}\r\n";
private static String auth2ParamProduction1 = "";// "{\r\n\t\"unitid\": \"SHYD\",\r\n\t\"pwd\": \"shyd1234\",\r\n\t\"secretid\": \"ad9a64fb913f4affa8064f2ae51e3b91\"\r\n}\r\n";
private static String tokenMethod = "";//"api/login";
//private static String tokenXPath = "$.datas.session.token";
//按品牌查型号
//private static String queryUrlModelParam = "{\"keyword\":\"%s\"}";
//private static String queryUrlModelMethod = "api/searchmodel1";
//private static String queryUrlModelXPath = "$.datas.modelNumbers";
//按型号查详细信息
//private static String queryUrlModel2Param = "{\"modelNumber\":\"%s\"}";
//private static String queryUrlModel2Method = "api/searchmodel2";
//private static String queryUrlModel2XPath = "$.datas.vehiclemodels[*]";
//报价查询
//private static String queryUrlCarPriceParam = "{\"carNumber\": \"%s\", \"carOwner\": \"%s\", \"plateType\": \"02\",\"bizAttribute\": \"101\"}";
//private static String queryUrlCarPriceMethod = "api/carpricebynumber";
//private static String queryUrlCarPriceXPath = "$.datas.priceinfo";
//private static String queryUrlGiftParam = "{\"policycode\":\"%s\"}";
//private static String queryURLGift = "api/loadgift";
//报价单加载
//private static String queryUrlConfirmInfoParam = "{\"policycode\":\"%s\"}";
//private static String queryUrlConfirmInfoMethod = "api/loadconfirminfo";
//private static String queryUrlConfirmInfoXPath = "$.datas.confirminfo";
//报价确认
//private static String queryUrlConfirmInfoPostMethod = "api/confirmprice";
//报价列表查询
//private static String queryQuotationURLParam = "{\"status\":\"%s\"}";
private static String queryQuotationURLScopeParam = "";//"{\"begindate\":\"%s\",\"enddate\":\"%s\"}";
private static String queryQuotationMethod = "";// "api/policylist?start=%s&count=%s";
//private static String queryQuotationXPath = "$.datas.pages.rows[*]";
//获取报价单详情
private static String queryQuotationDetailMethod = "";//"api/getconfirmpolicydetail?policycode=%s";
@Autowired
private AgTransVehicleMsgOriginService carZhiMaService;
//@Scheduled(cron = "0/2 * * * * *")
public QuotationResponse synchQuotaion(Date begin,Date end) throws InterruptedException {
auth2ParamProduction1 = systemConfigService.getSingleConfigValue("LinkerSoftAPITokenAuth2Param");
hostURL = systemConfigService.getSingleConfigValue("LinkerSoftAPIHostURL");
tokenMethod = systemConfigService.getSingleConfigValue("LinkerSoftAPITokenMethod");
queryQuotationMethod = systemConfigService.getSingleConfigValue("LinkerSoftAPIQueryQuotationMethod");
queryQuotationURLScopeParam = systemConfigService.getSingleConfigValue("LinkerSoftAPIQueryQuotationURLScopeParam");
queryQuotationDetailMethod = systemConfigService.getSingleConfigValue("LinkerSoftAPIQueryQuotationDetailMethod");
TokenZhiMa tokenEntity = getToken(hostURL + tokenMethod,auth2ParamProduction1);
//写原始消息入表
AgTransVehicleMsgOrigin agtransvehiclemsgorigin = new AgTransVehicleMsgOrigin();
agtransvehiclemsgorigin = initOriginMessage(hostURL,tokenMethod,auth2ParamProduction1,"Post",JSON.toJSONString(tokenEntity));
carZhiMaService.save(agtransvehiclemsgorigin);
String token = tokenEntity.getDatas().getTokenInfo().getToken();
System.out.println("token:" + token);
String startTime = dateToString(begin);
String endTime = dateToString(end);
return testPolicyList(startTime,endTime,token);
}
public static String dateToString(Date time){
SimpleDateFormat formatter;
formatter = new SimpleDateFormat ("yyyy-MM-dd");
String ctime = formatter.format(time);
return ctime;
}
private QuotationResponse testPolicyList(String startTime,String endTime,String token)
{
QuotationResponse quotationResponse;
quotationResponse = new QuotationResponse();
QuotationResponse quotationResponsePage = new QuotationResponse();
Integer start = 0;
Integer total = 0;
Integer size = 15;
//询价单列表,按状态,1,2,3
PolicyResponse policyList = null;
policyList = queryList(startTime,endTime,start,token);
total = Integer.parseInt(policyList.getDatas().getPolicyPage().getTotal());
System.out.println("Total:" + total);
quotationResponse.setTotal(total);
while(start < total)
{
quotationResponsePage = new QuotationResponse();
//分页,开始行,页行数queryQuotationURLParam
System.out.println("start:" + start);
policyList = queryList(startTime,endTime,start,token);
quotationResponsePage = displayList(policyList.getDatas().getPolicyPage().getRows(),token);
quotationResponse.setTotalPremium(quotationResponse.getTotalPremium().add(quotationResponsePage.getTotalPremium()));
quotationResponse.setBzPremium(quotationResponse.getBzPremium().add(quotationResponsePage.getBzPremium()));
quotationResponse.setTcPremium(quotationResponse.getTcPremium().add(quotationResponsePage.getTcPremium()));
quotationResponse.setTsltax(quotationResponse.getTsltax().add(quotationResponsePage.getTsltax()));
quotationResponse.setAllCharge(quotationResponse.getAllCharge().add(quotationResponsePage.getAllCharge()));
if (start > 0 && (start + size > total))
{
break;
}else
{
start = start + size;
}
}
return quotationResponse;
}
private PolicyResponse queryList(String startTime,String endTime,Integer start,String token)
{
String queryQuotationMethodStep = String.format(queryQuotationMethod, start.toString(),"15");
queryQuotationURLScopeParam = String.format(queryQuotationURLScopeParam, startTime,endTime);
PolicyResponse policyList = postQuotationList(hostURL + queryQuotationMethodStep,queryQuotationURLScopeParam,token);
//写原始消息入表
AgTransVehicleMsgOrigin agtransvehiclemsgorigin = new AgTransVehicleMsgOrigin();
agtransvehiclemsgorigin = initOriginMessage(hostURL,queryQuotationMethodStep,queryQuotationURLScopeParam,"Post",JSON.toJSONString(policyList));
carZhiMaService.save(agtransvehiclemsgorigin);
return policyList;
}
private QuotationResponse displayList(List<PolicyInfo> list,String token)
{
QuotationResponse quotationResponse = new QuotationResponse();
String policyCode = null;
Date quotationDate = null;
BigDecimal totalPremium = new BigDecimal(0);
BigDecimal bzPremium = new BigDecimal(0);
BigDecimal tcPremium = new BigDecimal(0);
BigDecimal vsltax = new BigDecimal(0);
BigDecimal allCharge = new BigDecimal(0);
for(int i = 0; i < list.size();i++)
{
policyCode = list.get(i).getPolicycode();
quotationDate = list.get(i).getCreateDate();
System.out.print(""+ list.get(i).getCarNumber());
totalPremium = totalPremium.add(BigDecimal.valueOf(list.get(i).getTotalPremium()));
bzPremium = bzPremium.add(BigDecimal.valueOf(list.get(i).getBzPremium()));
tcPremium = tcPremium.add(BigDecimal.valueOf(list.get(i).getTcPremium()));
vsltax = vsltax.add(BigDecimal.valueOf(list.get(i).getVsltax()));
allCharge = allCharge.add(BigDecimal.valueOf(list.get(i).getAllCharge()));
System.out.print("getTotalPremium," + list.get(i).getTotalPremium());
System.out.print("getBzPremium," + list.get(i).getBzPremium());
System.out.print("getTcPremium," + list.get(i).getTcPremium());
System.out.print("getVsltax," + list.get(i).getVsltax());
System.out.println("getAllCharge," + list.get(i).getAllCharge());
//检查是否已经存在
AgPoQuotation one = agPoQuotationService.findByQuoteNo(policyCode);
if (one==null)
{
String queryQuotationDetailMethodNew = String.format(queryQuotationDetailMethod, policyCode);
QuotationDetail postConfirm = getComfirmationDetail(hostURL + queryQuotationDetailMethodNew,null,token);
//写车辆信息,报价信息,coverages入表
//agPoQuotationWebService.saveAgPoQuotation(postConfirm.getDatas().getPriceinfo());
agPoQuotationWebService.saveAgPoQuotationAndConfirm(quotationDate,postConfirm.getDatas().getPriceinfo(),postConfirm.getDatas().getConfirmInfo());
//写确认信息入表confirmInfo
//agPoQuotationWebService.saveAgPoQuotationConfirm(postConfirm.getDatas().getConfirmInfo());
//写原始消息入表
AgTransVehicleMsgOrigin agtransvehiclemsgorigin = new AgTransVehicleMsgOrigin();
agtransvehiclemsgorigin = initOriginMessage(hostURL,queryQuotationDetailMethodNew,"","Post",JSON.toJSONString(postConfirm));
carZhiMaService.save(agtransvehiclemsgorigin);
/*System.out.print("" + postConfirm.getDatas().getPriceinfo().getVehInfo().getRegistrationNumber());
System.out.print("getTotalPremium," + postConfirm.getDatas().getPriceinfo().getTotalPremium());
System.out.print("getBzPremium," + postConfirm.getDatas().getPriceinfo().getBzPremium());
System.out.print("getTcPremium," + postConfirm.getDatas().getPriceinfo().getTcPremium());
System.out.print("getAllCharge," + postConfirm.getDatas().getPriceinfo().getAllCharge());
System.out.println("getVsltax," + postConfirm.getDatas().getPriceinfo().getVsltax());
System.out.print("getAllCharge," + postConfirm.getDatas().getPriceinfo().getAllCharge());
System.out.print("," + dateToString(list.get(i).getCreateDate()));
System.out.println("");*/
}
}
quotationResponse.setTotalPremium(totalPremium);
quotationResponse.setBzPremium(bzPremium);
quotationResponse.setTcPremium(tcPremium);
quotationResponse.setTsltax(vsltax);
quotationResponse.setAllCharge(allCharge);
return quotationResponse;
}
public PolicyResponse postQuotationList(String urlQuery,String queryURLParams, String token)
{
PolicyResponse list = null;
list = HttpHelpZhiMa.postUrlMap2JavaBean(urlQuery,queryURLParams,token,PolicyResponse.class);
return list;
}
public static QuotationDetail getComfirmationDetail(String urlQuery,String queryParams, String token)
{
QuotationDetail confirm = null;
confirm = HttpHelpZhiMa.getUrlMap2JavaBean(urlQuery,token,QuotationDetail.class);
return confirm;
}
private static AgTransVehicleMsgOrigin initOriginMessage(final String requestHost,final String requestMethod,final String requestParams,final String requestType,final String responseMessage)
{
AgTransVehicleMsgOrigin agtransvehiclemsgorigin = new AgTransVehicleMsgOrigin();
agtransvehiclemsgorigin.setQuoteProviderId(2L);
agtransvehiclemsgorigin.setQuoteProviderType("V");
agtransvehiclemsgorigin.setQuoteProvider("芝麻");
agtransvehiclemsgorigin.setRequestHost(requestHost);
agtransvehiclemsgorigin.setRequestParams(requestParams);
agtransvehiclemsgorigin.setRequestMethod(requestMethod);
agtransvehiclemsgorigin.setRequestType(requestType);
agtransvehiclemsgorigin.setRequestDate(new Date());
agtransvehiclemsgorigin.setUserId(36);
agtransvehiclemsgorigin.setUserName("simon");
agtransvehiclemsgorigin.setResponseMessage(responseMessage);
return agtransvehiclemsgorigin;
}
public static TokenZhiMa getToken(String urlQuery,String queryParams)
{
TokenZhiMa returnToken = (TokenZhiMa)HttpHelpZhiMa.getToken(urlQuery,queryParams);
return returnToken;
}
}
\ No newline at end of file
package com.ajb.global.authorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ajb.global.authorize.service.AuthorizeService;
import com.ajb.global.authorize.vo.CheckTokenRequestVO;
import com.ajb.car.vo.common.JsonResult;
import com.ajb.global.authorize.vo.CheckTokenResponseVO;
import com.ajb.global.authorize.vo.ObtainTokenRequestVO;
import com.ajb.global.authorize.vo.ObtainTokenResponseVO;
@RestController
@RequestMapping("/authorize")
public class AuthorizeController {
@Autowired
private AuthorizeService authorizeService;
@RequestMapping("/obtainToken")
public Object obtainToken(@RequestBody ObtainTokenRequestVO requestVO){
JsonResult result = new JsonResult();
ObtainTokenResponseVO responseVO = authorizeService.obtainToken(requestVO);
result.setData(responseVO);
return result;
}
@RequestMapping("/checkToken")
public Object checkToken(@RequestBody CheckTokenRequestVO requestVO){
JsonResult result = new JsonResult();
CheckTokenResponseVO responseVO = authorizeService.checkToken(requestVO);
result.setData(responseVO);
return result;
}
}
package com.ajb.global.authorize.service;
import com.ajb.global.authorize.vo.CheckTokenRequestVO;
import com.ajb.global.authorize.vo.CheckTokenResponseVO;
import com.ajb.global.authorize.vo.ObtainTokenRequestVO;
import com.ajb.global.authorize.vo.ObtainTokenResponseVO;
public interface AuthorizeService {
public ObtainTokenResponseVO obtainToken(ObtainTokenRequestVO requestVO);
public CheckTokenResponseVO checkToken(CheckTokenRequestVO requestVO);
}
package com.ajb.global.authorize.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ajb.global.authorize.service.AuthorizeService;
import com.ajb.global.authorize.util.AudienceSetting;
import com.ajb.global.authorize.util.JwtTokenUtil;
import com.ajb.global.authorize.vo.CheckTokenRequestVO;
import com.ajb.car.vo.common.CommonResult;
import com.ajb.common.utils.string.CommonUtil;
import com.ajb.global.enums.ParamVerifyEnum;
import com.ajb.global.enums.ResultEnum;
import com.ajb.global.authorize.vo.CheckTokenResponseVO;
import com.ajb.global.authorize.vo.ObtainTokenRequestVO;
import com.ajb.global.authorize.vo.ObtainTokenResponseVO;
@Service("authorizeService")
public class AuthorizeServiceImpl implements AuthorizeService {
@Autowired
private JwtTokenUtil jwtTokenUtil;
@Autowired
private AudienceSetting audienceSetting;
@Override
public ObtainTokenResponseVO obtainToken(ObtainTokenRequestVO requestVO) {
boolean success = true;
String message = ResultEnum.QUERY_SUCCESS.getMessage();
ObtainTokenResponseVO responseVO = new ObtainTokenResponseVO();
if(requestVO == null || CommonUtil.isNullOrBlank(requestVO.getTicket())){
responseVO.setCommonResult(new CommonResult(false,ParamVerifyEnum.PARAM_NOT_NULL.getMessage()));
return responseVO;
}
String token = jwtTokenUtil.generateToken(requestVO.getTicket());
responseVO.setToken(token);
responseVO.setCommonResult(new CommonResult(success,message));
return responseVO;
}
@Override
public CheckTokenResponseVO checkToken(CheckTokenRequestVO requestVO) {
boolean success = true;
String message = "校验通过";
CheckTokenResponseVO responseVO = new CheckTokenResponseVO();
if(requestVO == null || CommonUtil.isNullOrBlank(requestVO.getToken())){
responseVO.setCommonResult(new CommonResult(false,ParamVerifyEnum.PARAM_NOT_NULL.getMessage()));
return responseVO;
}
String token = requestVO.getToken();
if(token.startsWith(audienceSetting.issuer)){
token = token.substring(audienceSetting.issuer.length()+1);
}
boolean isTokenValid = jwtTokenUtil.validateToken(token);
boolean isTokenExpired = jwtTokenUtil.isTokenExpired(token);
if(isTokenExpired){
success = false;
message = "token已失效!";
}else if(isTokenValid){
String ticket = requestVO.getTicket();
if(!CommonUtil.isNullOrBlank(ticket)){
boolean valid = jwtTokenUtil.validateToken(token, ticket);
if(!valid){
success = false;
message = "由token解析出的ticket和传入的ticket不一致!";
}
}
}else{
success = false;
message = "token格式不合法!";
}
responseVO.setCommonResult(new CommonResult(success,message));
return responseVO;
}
}
package com.ajb.global.authorize.util;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
/**
* jwt安全验证设置 head tag,seal封条,过期时间,发行,bypass
* @author Simon Cheng
*/
@Service
public class AudienceSetting {
@Value("${jwt.header}")
public String header;
@Value("${jwt.seal}")
public String seal;
@Value("${jwt.expiration}")
public Long expiration;
@Value("${jwt.issuer}")
public String issuer;
@Value("${jwt.bypass}")
public String bypass;
}
package com.ajb.global.authorize.util;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.ExpiredJwtException;
import io.jsonwebtoken.Jws;
import io.jsonwebtoken.JwtParser;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.MalformedJwtException;
import io.jsonwebtoken.SignatureAlgorithm;
import io.jsonwebtoken.SignatureException;
import io.jsonwebtoken.UnsupportedJwtException;
/**
* jwt 工具类
* @author
*/
@Service
public class JwtTokenUtil {
private static final String CLAIM_KEY_SUBJECT = "sub";
// private static final String CLAIM_KEY_ISSURE = "iss";
// private static final String CLAIM_KEY_AUDIENCE = "aud";
private static final String CLAIM_KEY_CREATED = "created";
// private static final String CLAIM_KEY_BIRTHDAY = "birthDay";
// private static final String CLAIM_KEY_ADDRESS = "address";
@Autowired
private AudienceSetting audienceSetting;
/**
* 从token中获取subject
* @param token
* @return
*/
public String getSubjectFromToken(String token) {
String subject = null;
Map<String,Object> map = getClaimsFromToken(token);
String resultCode = (String)map.get("resultCode");
if("SUCCESS".equals(resultCode)){
Object obj = map.get("claims");
if(obj != null){
Claims claims = (Claims)obj;
subject = claims.getSubject();
}
}
return subject;
}
/**
* 获取创建时间
* @param token
* @return
*/
public Date getCreatedDateFromToken(String token) {
Date created = null ;
Map<String,Object> map = getClaimsFromToken(token);
String resultCode = (String)map.get("resultCode");
if("SUCCESS".equals(resultCode)){
Object obj = map.get("claims");
if(obj != null){
Claims claims = (Claims)obj;
created = new Date((Long) claims.get(CLAIM_KEY_CREATED));
}
}
return created;
}
/**
* 获取过期时间
* @param token
* @return
*/
public Date getExpirationDateFromToken(String token){
Date expiration = null;
Map<String,Object> map = getClaimsFromToken(token);
String resultCode = (String)map.get("resultCode");
if("SUCCESS".equals(resultCode)){
Object obj = map.get("claims");
if(obj != null){
Claims claims = (Claims)obj;
expiration = claims.getExpiration();
}
}
return expiration;
}
/**
* check token是否过期
* @param token
* @return
*/
public Boolean isTokenExpired(String token) {
boolean result = false;
Map<String,Object> map = getClaimsFromToken(token);
String resultCode = (String)map.get("resultCode");
if("EXPIRED".equals(resultCode)){
result = true;
}else if("SUCCESS".equals(resultCode)){
Date expiration = getExpirationDateFromToken(token);
if(expiration != null){
result = expiration.before(new Date());
}
}
return result;
}
/**
* 检查是否可以被刷新
* @param token
* @param lastPasswordReset
* @return
*/
public Boolean canTokenBeRefreshed(String token, Date lastPasswordReset) {
//如果过期则不可以刷新
if(isTokenExpired(token)){
return false;
}
Date created = getCreatedDateFromToken(token);
if(created == null){
return false;
}
//如果token是在上次密码重置前生成则不可以刷新
if(lastPasswordReset != null && created.before(lastPasswordReset)){
return false;
}
return true;
}
/**
* 刷新token
* @param token
* @return
*/
public String refreshToken(String token) {
String refreshedToken = null ;
Map<String,Object> map = getClaimsFromToken(token);
String resultCode = (String)map.get("resultCode");
if("SUCCESS".equals(resultCode)){
Object obj = map.get("claims");
if(obj != null){
Claims claims = (Claims)obj;
claims.put(CLAIM_KEY_CREATED, new Date());
refreshedToken = generateToken(claims);
}
}
return refreshedToken;
}
/**
* 根据ticket验证token有效
* @param ticket
* @param user
* @return
*/
public Boolean validateToken(String token, String ticket) {
boolean result = false;
final String subject = getSubjectFromToken(token);
if(subject == null){
return false;
}
if(!isTokenExpired(token)){
if(ticket != null && subject.equals(ticket)){
result = true;
}
}
return result;
}
/**
* 判断token是否有效(主要是格式是否有效)
* @param token
* @return
*/
public Boolean validateToken(String token) {
boolean result = true;
Map<String,Object> map = getClaimsFromToken(token);
String resultCode = (String)map.get("resultCode");
if("INVALID".equals(resultCode)){
result = false;
}
return result;
}
/**
* 生成过期时间
* @return
*/
private Date generateExpirationDate() {
Date expirationDate = new Date(System.currentTimeMillis() + audienceSetting.expiration * 1000);
return expirationDate;
}
/**
* 根据ticket生成token
* @param ticket
* @return
*/
public String generateToken(String ticket){
String token = null;
Map<String, Object> claims = new HashMap<>();
claims.put(CLAIM_KEY_SUBJECT, ticket);
claims.put(CLAIM_KEY_CREATED, new Date());
token = generateToken(claims);
token = audienceSetting.issuer + " " + token;
return token;
}
/**
* 根据Map 生成token串
* @param Map<String, Object>claims
* @return
*/
private String generateToken(Map<String, Object> claims) {
return Jwts.builder()
.setClaims(claims)
.setExpiration(generateExpirationDate())
.signWith(SignatureAlgorithm.HS512, audienceSetting.seal)
.compact();
}
/**
* 根据token获取Claims,申明内容
* @param token
* @return
*/
private Map<String,Object> getClaimsFromToken(String token){
Map<String,Object> map = new HashMap<String,Object>();
String resultCode = "SUCCESS";
Claims claims = null;
try {
JwtParser jwtParser = Jwts.parser().setSigningKey(audienceSetting.seal);
Jws<Claims> jwsClaims = jwtParser.parseClaimsJws(token);
claims = jwsClaims.getBody();
}catch(ExpiredJwtException e){
resultCode = "EXPIRED";
}catch(UnsupportedJwtException|MalformedJwtException|SignatureException|IllegalArgumentException e){
resultCode = "INVALID";
}catch(Exception e){
resultCode = "INVALID";
}
map.put("resultCode", resultCode);
map.put("claims", claims);
return map;
}
}
package com.ajb.global.authorize.vo;
public class CheckTokenRequestVO {
private String token;
private String ticket;
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getTicket() {
return ticket;
}
public void setTicket(String ticket) {
this.ticket = ticket;
}
}
package com.ajb.global.authorize.vo;
import com.ajb.car.vo.common.CommonResult;
public class CheckTokenResponseVO {
private CommonResult commonResult;
public CommonResult getCommonResult() {
return commonResult;
}
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
}
package com.ajb.global.authorize.vo;
public class ObtainTokenRequestVO {
private String ticket;
private String ipAddress;
private String loginId;
public String getTicket() {
return ticket;
}
public void setTicket(String ticket) {
this.ticket = ticket;
}
public String getIpAddress() {
return ipAddress;
}
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}
public String getLoginId() {
return loginId;
}
public void setLoginId(String loginId) {
this.loginId = loginId;
}
}
package com.ajb.global.authorize.vo;
import com.ajb.car.vo.common.CommonResult;
public class ObtainTokenResponseVO {
private String token;
private CommonResult commonResult;
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public CommonResult getCommonResult() {
return commonResult;
}
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
}
package com.ajb.global.config;
import javax.sql.DataSource;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.alibaba.druid.pool.DruidDataSource;
/***
* alibaba druid datasource configuration
*
* @author fan
*
*/
@Configuration
public class DruidConfiguration {
/***
* ConditionalOnMissingBean 当不存在时 返回Bean的实例
* 通过ConfigurationProperties自动注入配置
* @return
*/
@Bean
@ConditionalOnMissingBean
@ConfigurationProperties(prefix = "spring.datasource")
public DataSource druidDataSource(){
DruidDataSource druidDataSource = new DruidDataSource();
return druidDataSource;
}
}
package com.ajb.global.config;
/**
* Register security zuihuibi filter
*/
import javax.servlet.Filter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.ajb.global.filter.HttpZuihuibiAuthorizeFilter;
@Configuration
public class HttpZuihuibiAuthorizeConfig {
@Bean
public Filter AuthFilter() {
return new HttpZuihuibiAuthorizeFilter();
}
}
package com.ajb.global.config;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import com.ajb.Application;
public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
}
\ No newline at end of file
package com.ajb.global.config;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Configuration;
/**
* 通过上下文过去注入的bean instance
* @author Simon Cheng
*
*/
@Configuration
public class SpringContextUtil implements ApplicationContextAware {
private static ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
SpringContextUtil.applicationContext = applicationContext;
}
public static ApplicationContext getApplicationContext() {
return SpringContextUtil.applicationContext;
}
public static <T> T getBean(Class<T> t) {
return SpringContextUtil.applicationContext.getBean(t);
}
// 通过name获取Bean.
public static <T> T getBean(String name) {
T bean = (T) SpringContextUtil.applicationContext.getBean(name);
return bean;
}
}
package com.ajb.global.config;
import javax.servlet.Filter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
@Configuration
public class SpringMvcConfig {
/**
* 解决同源策略问题的filter
* @return
*/
@Bean
public Filter corsFilter(){
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration config = new CorsConfiguration();
config.addAllowedOrigin("*");
config.addAllowedHeader("*");
config.addAllowedMethod("OPTIONS");
config.addAllowedMethod("HEAD");
config.addAllowedMethod("GET");
config.addAllowedMethod("PUT");
config.addAllowedMethod("POST");
config.addAllowedMethod("DELETE");
config.addAllowedMethod("PATCH");
source.registerCorsConfiguration("/**", config);
return new CorsFilter(source);
}
}
package com.ajb.global.config;
import java.util.Date;
import com.ajb.car.entity.apimessage.AgTransVehicleMsgOrigin;
import com.ajb.car.metadata.service.SystemConfigService;
import com.ajb.car.quotation.service.AgTransVehicleMsgOriginService;
import com.ajb.car.vo.zhima.TokenZhiMa;
import com.ajb.common.utils.http.HttpHelpZhiMa;
import com.ajb.common.utils.string.CommonUtil;
import com.alibaba.fastjson.JSON;
/**
* 获取芝麻车险访问连接
* @author Simon Cheng
*
*/
public class ZhimaConnection {
private static String auth2ParamProduction = "";
private static String hostURL = "";
private static String tokenMethod = "";
private static String token = "";
private static ZhimaConnection zhimaConnection = null;
public static synchronized ZhimaConnection getInstance(){
if (zhimaConnection == null)
{
SystemConfigService systemConfigService = (SystemConfigService)SpringContextUtil.getBean("systemConfigService");
zhimaConnection = new ZhimaConnection();
auth2ParamProduction = systemConfigService.getSingleConfigValue("LinkerSoftAPITokenAuth2Param");
hostURL = systemConfigService.getSingleConfigValue("LinkerSoftAPIHostURL");
tokenMethod = systemConfigService.getSingleConfigValue("LinkerSoftAPITokenMethod");
}
return zhimaConnection;
}
public static String getAuth2ParamProduction() {
getInstance();
return auth2ParamProduction;
}
public static String getHostURL() {
getInstance();
return hostURL;
}
public static String getTokenMethod() {
getInstance();
return tokenMethod;
}
/**
* 获取芝麻API接口的token
* @param urlQuery
* @param queryParams
* @return
*/
private static TokenZhiMa getToken(String urlQuery,String queryParams)
{
TokenZhiMa returnToken = (TokenZhiMa)HttpHelpZhiMa.getToken(urlQuery,queryParams);
return returnToken;
}
public static String getToken()
{
getInstance();
if (CommonUtil.isNullOrBlank(token))
{
TokenZhiMa returnToken = (TokenZhiMa)getToken(hostURL + tokenMethod, auth2ParamProduction);
token = returnToken.getDatas().getTokenInfo().getToken();
}
return token;
}
public static String refreshToken()
{
getInstance();
TokenZhiMa returnToken = (TokenZhiMa)getToken(hostURL + tokenMethod, auth2ParamProduction);
token = returnToken.getDatas().getTokenInfo().getToken();
return token;
}
public static <T> T postUrlMap2JavaBean(String urlQuery,String queryParams, Class<T> beanClass)
{
T t = postUrlMap2JavaBean(urlQuery, queryParams, getToken(), beanClass);
return t;
}
public static <T> T postUrlMap2JavaBean(String urlQuery,String queryParams, String token,Class<T> beanClass)
{
T t = HttpHelpZhiMa.postUrlMap2JavaBean(urlQuery,queryParams,token,beanClass);
//写原始消息入表
AgTransVehicleMsgOrigin agtransvehiclemsgorigin = new AgTransVehicleMsgOrigin();
agtransvehiclemsgorigin = initOriginMessage(ZhimaConnection.getHostURL(),urlQuery,queryParams,"Post",JSON.toJSONString(t));
AgTransVehicleMsgOriginService carZhiMaService = (AgTransVehicleMsgOriginService)SpringContextUtil.getBean("agTransVehicleMsgOriginService");
carZhiMaService.save(agtransvehiclemsgorigin);
return t;
}
public static <T> T getUrlMap2JavaBean(String urlQuery, Class<T> beanClass)
{
T t = getUrlMap2JavaBean(urlQuery,getToken(),beanClass);
return t;
}
public static <T> T getUrlMap2JavaBean(String urlQuery, String token,Class<T> beanClass)
{
T t = HttpHelpZhiMa.getUrlMap2JavaBean(urlQuery,token,beanClass);
//写原始消息入表
AgTransVehicleMsgOrigin agtransvehiclemsgorigin = new AgTransVehicleMsgOrigin();
agtransvehiclemsgorigin = initOriginMessage(ZhimaConnection.getHostURL(),urlQuery,"","Get",JSON.toJSONString(t));
AgTransVehicleMsgOriginService carZhiMaService = (AgTransVehicleMsgOriginService)SpringContextUtil.getBean("agTransVehicleMsgOriginService");
carZhiMaService.save(agtransvehiclemsgorigin);
return t;
}
/**
* 记录请求log,初始化日志项
* @param requestHost
* @param requestMethod
* @param requestParams
* @param requestType
* @param responseMessage
* @return
*/
private static AgTransVehicleMsgOrigin initOriginMessage(final String requestHost,final String requestMethod,final String requestParams,final String requestType,final String responseMessage)
{
AgTransVehicleMsgOrigin agtransvehiclemsgorigin = new AgTransVehicleMsgOrigin();
agtransvehiclemsgorigin.setQuoteProviderId(2L);
agtransvehiclemsgorigin.setQuoteProviderType("V");
agtransvehiclemsgorigin.setQuoteProvider("芝麻");
agtransvehiclemsgorigin.setRequestHost(requestHost);
agtransvehiclemsgorigin.setRequestParams(requestParams);
agtransvehiclemsgorigin.setRequestMethod(requestMethod);
agtransvehiclemsgorigin.setRequestType(requestType);
agtransvehiclemsgorigin.setRequestDate(new Date());
agtransvehiclemsgorigin.setUserId(36);
agtransvehiclemsgorigin.setUserName("simon");
agtransvehiclemsgorigin.setResponseMessage(responseMessage);
return agtransvehiclemsgorigin;
}
}
package com.ajb.global.enums;
public enum ParamVerifyEnum {
/**
* 参数不能为空
*/
PARAM_NOT_NULL(1,"参数不能为空!"),
/**
* 参数不正确
*/
PARAM_ERROR(2,"参数不正确!"),
/**
* 常用联系人类型不能为空
*/
CONTACTTYPE_NOT_NULL(11,"常用联系人类型不能为空!"),
/**
* 常用联系人姓名不能为空
*/
CONTACTNAME_NOT_NULL(12,"常用联系人姓名不能为空!"),
/**
* 与投保人关系不能为空
*/
RELATIONID_NOT_NULL(13,"与投保人关系不能为空!"),
/**
* 身份证件类型不能为空
*/
IDTYPEID_NOT_NULL(14,"身份证件类型不能为空!"),
/**
* 身份证件号码不能为空
*/
IDNO_NOT_NULL(15,"身份证件号码不能为空!"),
/**
* 性别不能为空
*/
GENDER_NOT_NULL(16,"性别不能为空!"),
/**
* 手机号码不能为空
*/
MOBILENO_NOT_NULL(17,"手机号码不能为空!"),
/**
* 生日不能为空
*/
BIRTHDATE_NOT_NULL(18,"生日不能为空!"),
/**
* 投保人ID不能为空
*/
CUSTOMERID_NOT_NULL(19,"投保人ID不能为空!")
;
private int code;
private String message;
public int getCode() {
return code;
}
public String getMessage() {
return message;
}
private ParamVerifyEnum(int code, String message) {
this.code = code;
this.message = message;
}
}
package com.ajb.global.enums;
public enum ResultEnum {
/**
* 查询成功
*/
QUERY_SUCCESS(1,"查询成功!"),
/**
* 查询失败
*/
QUERY_FAIL(2,"查询失败!"),
/**
* 保存成功
*/
SAVE_SUCCESS(3,"保存成功!"),
/**
* 被保人信息已更新
*/
USER_IS_EXIST(4,"被保人信息已更新"),
/**
* 删除成功
*/
DELETE_SUCCESS(5,"删除成功")
;
private int code;
private String message;
public int getCode() {
return code;
}
public String getMessage() {
return message;
}
private ResultEnum(int code,String message) {
this.code = code;
this.message = message;
}
}
package com.ajb.global.exception;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ajb.car.vo.common.JsonResult;
import com.ajb.common.utils.string.CommonUtil;
/***
* 统一异常处理
* @author fan
*
*/
@ControllerAdvice
@ResponseBody
public class GlobalExceptionHandler {
private final static Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
/**
*
* @param req
* @param ex
* @return
* @throws Exception
*/
@ExceptionHandler(value=Exception.class)
public JsonResult handler(HttpServletRequest req,Exception ex) throws Exception{
logger.error("request url is:"+req.getRequestURL()+" \n "+CommonUtil.parseExceptionStack(ex));//ex.getMessage()
JsonResult result=new JsonResult();
result.setSuccess(false);
result.setMessage("system error"+ex.getMessage());
//TODO log
return result;
}
}
package com.ajb.global.filter;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.httpclient.HttpStatus;
import org.springframework.beans.factory.annotation.Autowired;
import com.ajb.global.authorize.util.AudienceSetting;
import com.ajb.global.authorize.util.JwtTokenUtil;
import com.ajb.common.utils.string.CommonUtil;
/**
* jwt过滤器
* @author
* zuihuibi intercept all request from client, check whether token is there,verify the token is valid.
*/
public class HttpZuihuibiAuthorizeFilter implements Filter{
@Autowired
private JwtTokenUtil jwtTokenUtil;
@Autowired
private AudienceSetting audienceSetting;
private static final String BY_PASS_ALL = "TEST";
@Override
public void destroy() {}
/**
* 过滤器,对客户请求过滤,验证
*/
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)throws IOException, ServletException{
HttpServletRequest httpRequest = (HttpServletRequest)request;
HttpServletResponse httpResponse = (HttpServletResponse) response;
httpResponse.setHeader("Access-Control-Allow-Origin", "*");
String requestUri = httpRequest.getRequestURI();
boolean isDoFilter = false;
//这里通过判断请求的方法,判断此次是否是预检请求,如果是,立即返回一个204状态吗,标示,允许跨域;预检后,正式请求,这个方法参数就是我们设置的post了
if ("OPTIONS".equals(httpRequest.getMethod())){
//HttpStatus.SC_NO_CONTENT = 204
httpResponse.setStatus(HttpStatus.SC_NO_CONTENT);
httpResponse.setHeader("Access-Control-Allow-Methods", "POST, GET, DELETE, OPTIONS, DELETE");//当判定为预检请求后,设定允许请求的方法
httpResponse.setHeader("Access-Control-Allow-Headers", "Content-Type, x-requested-with, Token, X-Authorization"); //当判定为预检请求后,设定允许请求的头部类型
httpResponse.addHeader("Access-Control-Max-Age", "1");
chain.doFilter(request, response);
return;
}
String byPass = audienceSetting.bypass;
if(!CommonUtil.isNullOrBlank(byPass)){
if(byPass.contains(BY_PASS_ALL)){//bypass配置为TEST时所有方法都放过
isDoFilter = true;
}else{
if(byPass.contains(requestUri)){//完整路径匹配
isDoFilter = true;
}else{//按照“,”拆分后逐个模糊匹配
String[] arr = byPass.split(",");
for(String item : arr){
if(item.startsWith("*") && item.endsWith("*")){//以*开头且以*结尾
if(requestUri.contains(item.replace("*", ""))){
isDoFilter = true;
break;
}
}else if(item.startsWith("*")){//仅以*开头
if(requestUri.endsWith(item.replace("*", ""))){
isDoFilter = true;
break;
}
}else if(item.endsWith("*")){//仅以*结尾
if(requestUri.startsWith(item.replace("*", ""))){
isDoFilter = true;
break;
}
}
}//for arr
}//!byPass.contains(requestUri)
}//not BY_PASS_ALL
}//byPass != null
if (isDoFilter){
chain.doFilter(request, response);
return;
}
//其他的URL请求,先获取head中的token,进行验证即可
int issuerLength = audienceSetting.issuer.length();
String token = httpRequest.getHeader(audienceSetting.header);
if(!CommonUtil.isNullOrBlank(token) && token.length() > issuerLength){
String headStr = token.substring(0, issuerLength).toLowerCase();
if (headStr.compareTo(audienceSetting.issuer) == 0){
token = token.substring(issuerLength, token.length());
//token格式合法并且没有失效
if (jwtTokenUtil.validateToken(token) && !jwtTokenUtil.isTokenExpired(token)){
chain.doFilter(request, response);
return;
}
}
}
//验证失败,返回错误提示
httpResponse.setCharacterEncoding("UTF-8");
httpResponse.setContentType("application/json; charset=utf-8");
httpResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
String responseJson = "{"
+"\n \"success\": false,"
+"\n \"errorCode\": \"T001\","
+"\n \"message\": \"Invalid token!\""
+"\n}";
httpResponse.getWriter().write(responseJson);
return;
}
@Override
public void init(FilterConfig arg0) throws ServletException {}
}
package com.ajb.car; package com.ajb.web;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -9,18 +9,25 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -9,18 +9,25 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ajb.car.schedule.ScheduledTaskService;
import com.ajb.car.vo.common.CommonResult; import com.ajb.car.vo.common.CommonResult;
import com.ajb.car.vo.zhima.quotation.QuotationRequestVO; import com.ajb.car.vo.zhima.quotation.QuotationRequestVO;
import com.ajb.car.vo.zhima.quotation.QuotationResponse; import com.ajb.car.vo.zhima.quotation.QuotationResponse;
import com.ajb.car.vo.zhima.user.UserdataRequestVO;
import com.ajb.web.zhima.ZhimaDataSyncService;
@RestController @RestController
public class CarController { public class DataController {
@Autowired
private ScheduledTaskService taskService;
@RequestMapping("/quotations") @Autowired
private ZhimaDataSyncService taskService;
/**
* 同步芝麻车险报价数据
* @param loginRequestVO
* @return
* @throws Exception
*/
@RequestMapping("/syncquotations")
public Object synch(@RequestBody QuotationRequestVO loginRequestVO) throws Exception{ public Object synch(@RequestBody QuotationRequestVO loginRequestVO) throws Exception{
QuotationResponse quotationResponse = new QuotationResponse(); QuotationResponse quotationResponse = new QuotationResponse();
...@@ -34,9 +41,22 @@ public class CarController { ...@@ -34,9 +41,22 @@ public class CarController {
quotationResponse = taskService.synchQuotaion(begin,end); quotationResponse = taskService.synchQuotaion(begin,end);
}catch (Exception ex){ }catch (Exception ex){
quotationResponse.setCommonResult(new CommonResult(false, "Error! begindate and enddate format yyyy-MM-dd!ex:{\"begindate\":\"2018-06-10\",\"enddate\":\"2018-06-10\"}")); quotationResponse.setCommonResult(new CommonResult(false, "Error! begindate and enddate format yyyy-MM-dd!ex:{\"begindate\":\"2018-06-10\",\"enddate\":\"2018-06-10\"}"));
quotationResponse.setErrorCode("S01");
quotationResponse.setErrorMessage("系统出现问题,我们正在加紧解决!");
}finally{ }finally{
} }
quotationResponse.setCommonResult(new CommonResult(true, "Success!")); quotationResponse.setCommonResult(new CommonResult(true, "Success!"));
return quotationResponse; return quotationResponse;
} }
/**
* 批处理表中的一列,多列
* @param userdataRequestVO
* @return
* @throws Exception
*/
@RequestMapping("/encryptbatch")
public Object query(@RequestBody UserdataRequestVO userdataRequestVO) throws Exception{
return null;
}
} }
package com.ajb.web;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
* 车险相关系统数据
* @author Simon Cheng
*
*/
@RestController
public class MetaDataController {
/**
* 输出省份,省份简称列表
* @return
* @throws Exception
*/
@RequestMapping(value="/listprovince",method = RequestMethod.GET)
public Object queryProvince() throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
//TODO
return null;
}
/**
* 关键字查询品牌,大众,别克,宝马,奔驰
* @param keyword
* @return
* @throws Exception
*/
@RequestMapping(value="/queryallbrand",method = RequestMethod.GET)
public Object queryAllBrand() throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
//TODO
return null;
}
/**
* 关键字查询品牌,大众,别克,宝马,奔驰
* @param keyword
* @return
* @throws Exception
*/
@RequestMapping(value="/querybrand/{keyword}",method = RequestMethod.GET)
public Object queryBrand(@PathVariable String keyword) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
//TODO
return null;
}
/**
* 查询型号详细信息,指导价格
* @param modelnumber
* @return
* @throws Exception
*/
@RequestMapping(value="/querybrandmodel/{modelnumber}",method = RequestMethod.GET)
public Object queryBrandModel(@PathVariable String modelnumber) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
//TODO
return null;
}
}
\ No newline at end of file
package com.ajb.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.ajb.car.vo.quotation.AgPoQuotationRequestVO;
import com.ajb.car.vo.quotation.QuotationRequestVO;
import com.ajb.common.utils.encryption.MaskUtils;
import com.ajb.web.quotation.AgPoQuotationWebService;
/**
* 车险报价
* @author Simon Cheng
*
*/
@RestController
public class OrderController {
@Autowired
private AgPoQuotationWebService agPoOrderWebService;
/**
* 支付报价
* 参数:
* 返回:
* @param requestVO
* @return
* @throws Exception
*/
@RequestMapping("/paymentorder")
public Object paymentOrder(@RequestBody QuotationRequestVO requestVO) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
return null;
}
/**
* 查询订单
* 参数:
* 返回:
* @param requestVO
* @return
* @throws Exception
*/
@RequestMapping("/queryorder")
public Object queryOrder(@RequestBody QuotationRequestVO requestVO) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
return null;
}
/**
* 取消订单
* 参数:
* 返回:
* @param requestVO
* @return
* @throws Exception
*/
@RequestMapping("/cancelorder")
public Object cancelOrder(@RequestBody QuotationRequestVO requestVO) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
return null;
}
}
\ No newline at end of file
package com.ajb.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.ajb.car.vo.quotation.AgPoQuotationRequestVO;
import com.ajb.car.vo.quotation.QuotationRequestVO;
import com.ajb.common.utils.encryption.MaskUtils;
import com.ajb.global.config.ZhimaConnection;
import com.ajb.web.quotation.AgPoQuotationWebService;
/**
* 车险报价
* @author Simon Cheng
*
*/
@RestController
public class QuotationController {
@Autowired
private AgPoQuotationWebService agPoQuotationWebService;
/**
* 查询用户报价详细信息(某一个保险公司的)
* 保费,保障详情,服务和礼包,车辆信息
* @param quotationId
* @param model
* @return
* @throws Exception
*/
@RequestMapping(value="/quotation/{quotationId}", method=RequestMethod.GET)
public AgPoQuotationRequestVO queryAgPoQuotation(@PathVariable String quotationId, Model model) throws Exception{
AgPoQuotationRequestVO quotationResponse= agPoQuotationWebService.queryAgPoQuotation(Long.valueOf(quotationId));
quotationResponse.setCustomerMobileMask(MaskUtils.maskCellphone(quotationResponse.getCustomerMobile()));
model.addAttribute("quotation", quotationResponse);
return quotationResponse;
}
/**
* 车牌号,车架号,发动机号,车主,身份证号,
* 报价查询,能查到去年的历史,返回上年的投保范围方案
* 没有的话,就获取车险投保方案(见车险投保推荐方案)
* @param requestVO
* @return
* @throws Exception
*/
@RequestMapping("/lastyearquotation")
public Object lastYearQuotation(@RequestBody QuotationRequestVO requestVO) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
return null;
}
/**
* 车险投保推荐方案,自选,推荐,基础型三种
* @param requestVO
* @return
* @throws Exception
*/
@RequestMapping("/recommendcoverages")
public Object recommendCoverages(@RequestBody QuotationRequestVO requestVO) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
return null;
}
/**
* 提交用户报价信息
* 参数:用户在一种推荐方案的基础上修改
* 返回:根据用户选择的保障范围,查询各家保险公司的报价返回
* @param requestVO
* @return
* @throws Exception
*/
@RequestMapping("/postquotation")
public Object postQuotation(@RequestBody QuotationRequestVO requestVO) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
return null;
}
/**
* 修改用户报价信息
* 参数:用户在一种推荐方案的基础上修改
* 返回:根据用户选择的保障范围,查询各家保险公司的报价返回
* @param requestVO
* @return
* @throws Exception
*/
@RequestMapping("/modifyquotation")
public Object modifyQuotation(@RequestBody QuotationRequestVO requestVO) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
return null;
}
/**
* 确认用户报价信息,阅读保险条款并同意
* 参数:阅读保险条款并同意
* 返回:
* @param requestVO
* @return
* @throws Exception
*/
@RequestMapping("/confirmquotation")
public Object confirmQuotation(@RequestBody QuotationRequestVO requestVO) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
return null;
}
/**
* 确认用户报价信息后,提交收件地址
* 参数:
* 返回:
* @param requestVO
* @return
* @throws Exception
*/
@RequestMapping("/postrecieveaddress")
public Object postRecieveAddress(@RequestBody QuotationRequestVO requestVO) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
return null;
}
/**
* 确认用户报价信息后,提交发票信息
* 参数:阅读保险条款并同意
* 返回:
* @param requestVO
* @return
* @throws Exception
*/
@RequestMapping("/postinvoiceinfo")
public Object postInvoiceInfo(@RequestBody QuotationRequestVO requestVO) throws Exception{
//ProvinceResponse quotationResponse = new ProvinceResponse();
return null;
}
}
\ No newline at end of file
package com.ajb.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ajb.car.vo.common.DESCommon;
import com.ajb.car.vo.common.JsonResult;
import com.ajb.car.vo.zhima.user.UserdataRequestVO;
import com.ajb.car.vo.zhima.user.UserdataResponseVO;
import com.ajb.common.utils.encryption.DESUtils;
import com.ajb.common.utils.encryption.JPACryptoConverter;
import com.ajb.web.user.UserdataWebService;
@RestController
public class UserDataController {
@Autowired
private UserdataWebService userdataWebService;
@RequestMapping("/userdataQuery")
public Object query(@RequestBody UserdataRequestVO userdataRequestVO) throws Exception{
JsonResult result = new JsonResult();
UserdataResponseVO userdataResponseVO = userdataWebService.queryUserdata(userdataRequestVO);
result.setData(userdataResponseVO);
return result;
}
@RequestMapping("/userdataSave")
public Object save(@RequestBody UserdataRequestVO userdataRequestVO) throws Exception{
JsonResult result = new JsonResult();
UserdataResponseVO userdataResponseVO = userdataWebService.saveUserdata(userdataRequestVO);
result.setData(userdataResponseVO);
return result;
}
@RequestMapping("/userdataUpdate")
public Object update(@RequestBody UserdataRequestVO userdataRequestVO) throws Exception{
JsonResult result = new JsonResult();
UserdataResponseVO userdataResponseVO = userdataWebService.updateUserdata(userdataRequestVO);
result.setData(userdataResponseVO);
return result;
}
@RequestMapping("/userdataEncrypt")
public Object encrypt(@RequestBody DESCommon requestVO) throws Exception{
JsonResult result = new JsonResult();
DESUtils des;
String resultString = "";
try {
JPACryptoConverter jpaCryptoConverter = new JPACryptoConverter();
resultString = jpaCryptoConverter.convertToDatabaseColumn(requestVO.getContent());
requestVO.setEncrypted(resultString);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
result.setData(requestVO);
return result;
}
@RequestMapping("/userdataDecrypt")
public Object Decrypt(@RequestBody DESCommon requestVO) throws Exception{
JsonResult result = new JsonResult();
DESUtils des;
String content = "";
try {
JPACryptoConverter jpaCryptoConverter = new JPACryptoConverter();
content = jpaCryptoConverter.convertToEntityAttribute(requestVO.getEncrypted());
requestVO.setContent(content);;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
result.setData(requestVO);
return result;
}
}
\ No newline at end of file
package com.ajb.web.metadata;
import java.util.List;
import com.ajb.car.vo.zhima.meta.VehicleModels;
public interface MetaDataService {
public List<String> searchmodel1(String keyword);
public List<VehicleModels> searchmodel2(String modelNumber);
}
package com.ajb.web.metadata.impl;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ajb.car.entity.meta.Userdata;
import com.ajb.car.metadata.service.UserdataService;
import com.ajb.car.vo.common.CommonResult;
import com.ajb.car.vo.zhima.user.UserdataDeleteRequestVO;
import com.ajb.car.vo.zhima.user.UserdataRequestVO;
import com.ajb.car.vo.zhima.user.UserdataResponseVO;
import com.ajb.common.utils.encryption.MaskUtils;
import com.ajb.web.user.UserdataWebService;
/**
* 基础资料表的处理
* 这里是演示铭感字段的存储和读取方式
* @author Simon Cheng
*
*/
@Service("userdataWebService")
public class UserdataWebServiceImpl implements UserdataWebService {
@Autowired
private UserdataService userdataService;
@Transactional
@Override
public UserdataResponseVO saveUserdata(UserdataRequestVO userdataRequestVO) throws Exception {
UserdataResponseVO result = new UserdataResponseVO();
//TODO validate the user inputs
Userdata tempEntity = new Userdata();
//TODO validate the user inputs
BeanUtils.copyProperties(userdataRequestVO,tempEntity);
//data persistence
tempEntity = userdataService.save(tempEntity);
//return success info
Boolean success = true;
String message = "save success!";
BeanUtils.copyProperties(tempEntity,userdataRequestVO);
result.setCommonResult(new CommonResult(success,message));
result.setRequestVO(userdataRequestVO);
return result;
}
@Transactional
@Override
public UserdataResponseVO updateUserdata(UserdataRequestVO userdataRequestVO) {
// TODO Auto-generated method stub
Boolean success = true;
String message = "save success!";
UserdataResponseVO result = new UserdataResponseVO();
result.setCommonResult(new CommonResult(success,message));
return result;
}
@Transactional
@Override
public UserdataResponseVO queryUserdata(UserdataRequestVO userdataRequestVO) {
Boolean success = true;
String message = "save success!";
Userdata tempEntity = new Userdata();
BeanUtils.copyProperties(userdataRequestVO,tempEntity);
//data persistence
tempEntity = userdataService.findById(userdataRequestVO.getId());
UserdataResponseVO result = new UserdataResponseVO();
BeanUtils.copyProperties(tempEntity,userdataRequestVO);
//当输出到前端时, view object对象,铭感字段需要打上mask
userdataRequestVO.setIdnumbermask(MaskUtils.maskIDCardNo(userdataRequestVO.getIdnumber()));
userdataRequestVO.setTelephonemask(MaskUtils.maskCellphone(userdataRequestVO.getTelephone()));
result.setRequestVO(userdataRequestVO);
result.setCommonResult(new CommonResult(success,message));
return result;
}
}
\ No newline at end of file
package com.ajb.car.quotation; package com.ajb.web.quotation;
import java.util.Date; import java.util.Date;
import com.ajb.car.entity.quotation.AgPoQuotation; import com.ajb.car.entity.quotation.AgPoQuotation;
import com.ajb.car.vo.quotation.AgPoQuotationRequestVO;
import com.ajb.car.vo.zhima.quotation.ConfirmInfo; import com.ajb.car.vo.zhima.quotation.ConfirmInfo;
import com.ajb.car.vo.zhima.quotation.Priceinfo; import com.ajb.car.vo.zhima.quotation.Priceinfo;
public interface AgPoQuotationWebService { public interface AgPoQuotationWebService {
public AgPoQuotationRequestVO queryAgPoQuotation(Long quotationId);
public AgPoQuotation saveAgPoQuotation(Date quotationDate,Priceinfo priceinfo); public AgPoQuotation saveAgPoQuotation(Date quotationDate,Priceinfo priceinfo);
public void saveAgPoQuotationConfirm(ConfirmInfo confirmInfo,AgPoQuotation quotation); public void saveAgPoQuotationConfirm(ConfirmInfo confirmInfo,AgPoQuotation quotation);
......
package com.ajb.car.quotation.impl; package com.ajb.web.quotation.impl;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package com.ajb.car.quotation.impl; package com.ajb.web.quotation.impl;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -14,27 +14,23 @@ import com.ajb.car.entity.quotation.AgPoQuotationCover; ...@@ -14,27 +14,23 @@ import com.ajb.car.entity.quotation.AgPoQuotationCover;
import com.ajb.car.entity.quotation.AgPoQuotationTax; import com.ajb.car.entity.quotation.AgPoQuotationTax;
import com.ajb.car.entity.quotation.AgPoQuotationVehicle; import com.ajb.car.entity.quotation.AgPoQuotationVehicle;
import com.ajb.car.entity.quotation.AgPoQuotationVehicleRelation; import com.ajb.car.entity.quotation.AgPoQuotationVehicleRelation;
import com.ajb.car.quotation.AgPoQuotationWebService;
import com.ajb.car.quotation.service.AgPoQuotationService; import com.ajb.car.quotation.service.AgPoQuotationService;
import com.ajb.car.quotation.service.AgPoQuotationTaxService; import com.ajb.car.quotation.service.AgPoQuotationTaxService;
import com.ajb.car.quotation.service.AgPoQuotationConfirmService; import com.ajb.car.quotation.service.AgPoQuotationConfirmService;
import com.ajb.car.quotation.service.AgPoQuotationVehicleService; import com.ajb.car.quotation.service.AgPoQuotationVehicleService;
import com.ajb.car.quotation.service.AgPoQuotationCoverService; import com.ajb.car.quotation.service.AgPoQuotationCoverService;
import com.ajb.car.quotation.service.AgPoQuotationVehicleRelationService; import com.ajb.car.quotation.service.AgPoQuotationVehicleRelationService;
import com.ajb.car.vo.quotation.AgPoQuotationRequestVO;
import com.ajb.car.vo.zhima.quotation.Applicant; import com.ajb.car.vo.zhima.quotation.Applicant;
import com.ajb.car.vo.zhima.quotation.BzCoverages;
import com.ajb.car.vo.zhima.quotation.CarBodyPaintCoverage;
import com.ajb.car.vo.zhima.quotation.CarBodyPaintExemptDeductibleSpecialClause;
import com.ajb.car.vo.zhima.quotation.Claimant; import com.ajb.car.vo.zhima.quotation.Claimant;
import com.ajb.car.vo.zhima.quotation.ConfirmInfo; import com.ajb.car.vo.zhima.quotation.ConfirmInfo;
import com.ajb.car.vo.zhima.quotation.DamageLossCoverage;
import com.ajb.car.vo.zhima.quotation.DamageLossExemptDeductibleSpecialClause;
import com.ajb.car.vo.zhima.quotation.Priceinfo; import com.ajb.car.vo.zhima.quotation.Priceinfo;
import com.ajb.car.vo.zhima.quotation.TcCoverages; import com.ajb.car.vo.zhima.quotation.TcCoverages;
import com.ajb.car.vo.zhima.quotation.ThirdPartyLiabilityCoverage;
import com.ajb.car.vo.zhima.quotation.ThirdPartyLiabilityExemptDeductibleSpecialClause;
import com.ajb.car.vo.zhima.quotation.VehInfo; import com.ajb.car.vo.zhima.quotation.VehInfo;
import com.ajb.car.vo.zhima.quotation.VsltaxInfo; import com.ajb.car.vo.zhima.quotation.VsltaxInfo;
import com.ajb.web.quotation.AgPoQuotationWebService;
@Service("agPoQuotationWebService") @Service("agPoQuotationWebService")
public class AgPoQuotationWebServiceImpl implements AgPoQuotationWebService { public class AgPoQuotationWebServiceImpl implements AgPoQuotationWebService {
...@@ -434,4 +430,14 @@ public class AgPoQuotationWebServiceImpl implements AgPoQuotationWebService { ...@@ -434,4 +430,14 @@ public class AgPoQuotationWebServiceImpl implements AgPoQuotationWebService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
saveAgPoQuotationConfirmNoTrans(confirmInfo,quotation); saveAgPoQuotationConfirmNoTrans(confirmInfo,quotation);
} }
@Override
public AgPoQuotationRequestVO queryAgPoQuotation(Long quotationId) {
AgPoQuotationRequestVO agPoQuotationRequestVO = new AgPoQuotationRequestVO();
AgPoQuotation agPoQuotation = agPoQuotationService.findById(quotationId);
BeanUtils.copyProperties(agPoQuotation, agPoQuotationRequestVO);
return agPoQuotationRequestVO;
}
} }
\ No newline at end of file
package com.ajb.web.user;
import com.ajb.car.vo.zhima.user.UserdataRequestVO;
import com.ajb.car.vo.zhima.user.UserdataResponseVO;
public interface UserdataWebService {
public UserdataResponseVO saveUserdata(UserdataRequestVO userdataRequestVO) throws Exception;
public UserdataResponseVO updateUserdata(UserdataRequestVO userdataRequestVO);
public UserdataResponseVO queryUserdata(UserdataRequestVO userdataRequestVO);
//public boolean delteUserdata(UserdataDeleteRequestVO userdataDeleteRequestVO);
}
\ No newline at end of file
package com.ajb.web.zhima;
import java.util.Date;
import com.ajb.car.vo.zhima.quotation.QuotationResponse;
public interface ZhimaDataSyncService {
public QuotationResponse synchQuotaion(Date begin,Date end) throws InterruptedException;
}
package com.ajb.web.zhima.impl;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ajb.car.entity.quotation.AgPoQuotation;
import com.ajb.car.metadata.service.SystemConfigService;
import com.ajb.car.quotation.service.AgPoQuotationService;
import com.ajb.car.vo.zhima.policy.PolicyInfo;
import com.ajb.car.vo.zhima.policy.PolicyResponse;
import com.ajb.car.vo.zhima.quotation.QuotationDetail;
import com.ajb.car.vo.zhima.quotation.QuotationResponse;
import com.ajb.common.utils.string.CommonUtil;
import com.ajb.global.config.ZhimaConnection;
import com.ajb.web.quotation.AgPoQuotationWebService;
import com.ajb.web.zhima.ZhimaDataSyncService;
/**
* 同步芝麻车险报价数据
* @author Simon Cheng
*
*/
@Service("zhimaDataSyncService")
public class ZhimaDataSyncServiceImpl implements ZhimaDataSyncService{
@Autowired
private SystemConfigService systemConfigService;
@Autowired
AgPoQuotationWebService agPoQuotationWebService;
@Autowired
AgPoQuotationService agPoQuotationService;
//报价列表查询
private static String queryQuotationURLScopeParam = "";
private static String queryQuotationMethod = "";
//获取报价单详情
private static String queryQuotationDetailMethod = "";
/**
* 同步报价数据
* @param begin
* @param end
* @return
* @throws InterruptedException
*/
@Override
public QuotationResponse synchQuotaion(Date begin,Date end) throws InterruptedException {
queryQuotationMethod = systemConfigService.getSingleConfigValue("LinkerSoftAPIQueryQuotationMethod");
queryQuotationURLScopeParam = systemConfigService.getSingleConfigValue("LinkerSoftAPIQueryQuotationURLScopeParam");
queryQuotationDetailMethod = systemConfigService.getSingleConfigValue("LinkerSoftAPIQueryQuotationDetailMethod");
String startTime = CommonUtil.dateParseString(begin,"yyyy-MM-dd");
String endTime = CommonUtil.dateParseString(end,"yyyy-MM-dd");
return syncPolicyList(startTime,endTime);
}
/**
* 同步芝麻报价数据
* @param startTime
* @param endTime
* @param token
* @return
*/
private QuotationResponse syncPolicyList(String startTime,String endTime)
{
QuotationResponse quotationResponse;
quotationResponse = new QuotationResponse();
QuotationResponse quotationResponsePage = new QuotationResponse();
Integer start = 0;
Integer total = 0;
Integer size = 15;
//询价单列表,按状态,1,2,3
PolicyResponse policyList = null;
policyList = queryListOnePage(startTime,endTime,start);
total = Integer.parseInt(policyList.getDatas().getPolicyPage().getTotal());
System.out.println("Total:" + total);
quotationResponse.setTotal(total);
while(start < total)
{
quotationResponsePage = new QuotationResponse();
//分页,开始行,页行数queryQuotationURLParam
System.out.println("start:" + start);
policyList = queryListOnePage(startTime,endTime,start);
quotationResponsePage = displayList(policyList.getDatas().getPolicyPage().getRows());
quotationResponse.setTotalPremium(quotationResponse.getTotalPremium().add(quotationResponsePage.getTotalPremium()));
quotationResponse.setBzPremium(quotationResponse.getBzPremium().add(quotationResponsePage.getBzPremium()));
quotationResponse.setTcPremium(quotationResponse.getTcPremium().add(quotationResponsePage.getTcPremium()));
quotationResponse.setTsltax(quotationResponse.getTsltax().add(quotationResponsePage.getTsltax()));
quotationResponse.setAllCharge(quotationResponse.getAllCharge().add(quotationResponsePage.getAllCharge()));
if (start > 0 && (start + size > total))
{
break;
}else
{
start = start + size;
}
}
return quotationResponse;
}
/**
* 同步一页数据
* @param startTime
* @param endTime
* @param start
* @param token
* @return
*/
private PolicyResponse queryListOnePage(String startTime,String endTime,Integer start)
{
String queryQuotationMethodStep = String.format(queryQuotationMethod, start.toString(),"15");
queryQuotationURLScopeParam = String.format(queryQuotationURLScopeParam, startTime,endTime);
PolicyResponse policyList = ZhimaConnection.postUrlMap2JavaBean(ZhimaConnection.getHostURL() + queryQuotationMethodStep, queryQuotationURLScopeParam, PolicyResponse.class);
return policyList;
}
/**
* 同步一页报价详情
* @param list
* @param token
* @return
*/
private QuotationResponse displayList(List<PolicyInfo> list)
{
QuotationResponse quotationResponse = new QuotationResponse();
String policyCode = null;
Date quotationDate = null;
BigDecimal totalPremium = new BigDecimal(0);
BigDecimal bzPremium = new BigDecimal(0);
BigDecimal tcPremium = new BigDecimal(0);
BigDecimal vsltax = new BigDecimal(0);
BigDecimal allCharge = new BigDecimal(0);
for(int i = 0; i < list.size();i++)
{
policyCode = list.get(i).getPolicycode();
quotationDate = list.get(i).getCreateDate();
System.out.print(""+ list.get(i).getCarNumber());
totalPremium = totalPremium.add(BigDecimal.valueOf(list.get(i).getTotalPremium()));
bzPremium = bzPremium.add(BigDecimal.valueOf(list.get(i).getBzPremium()));
tcPremium = tcPremium.add(BigDecimal.valueOf(list.get(i).getTcPremium()));
vsltax = vsltax.add(BigDecimal.valueOf(list.get(i).getVsltax()));
allCharge = allCharge.add(BigDecimal.valueOf(list.get(i).getAllCharge()));
System.out.print("getTotalPremium," + list.get(i).getTotalPremium());
System.out.print("getBzPremium," + list.get(i).getBzPremium());
System.out.print("getTcPremium," + list.get(i).getTcPremium());
System.out.print("getVsltax," + list.get(i).getVsltax());
System.out.println("getAllCharge," + list.get(i).getAllCharge());
//检查是否已经存在
AgPoQuotation one = agPoQuotationService.findByQuoteNo(policyCode);
if (one==null)
{
String queryQuotationDetailMethodNew = String.format(queryQuotationDetailMethod, policyCode);
//QuotationDetail postConfirm = getComfirmationDetail(ZhimaConnection.getHostURL() + queryQuotationDetailMethodNew,null,token);
QuotationDetail postConfirm = ZhimaConnection.getUrlMap2JavaBean(ZhimaConnection.getHostURL() + queryQuotationDetailMethodNew,QuotationDetail.class);
//写车辆信息,报价信息,coverages入表
//agPoQuotationWebService.saveAgPoQuotation(postConfirm.getDatas().getPriceinfo());
agPoQuotationWebService.saveAgPoQuotationAndConfirm(quotationDate,postConfirm.getDatas().getPriceinfo(),postConfirm.getDatas().getConfirmInfo());
//写确认信息入表confirmInfo
//agPoQuotationWebService.saveAgPoQuotationConfirm(postConfirm.getDatas().getConfirmInfo());
/*System.out.print("" + postConfirm.getDatas().getPriceinfo().getVehInfo().getRegistrationNumber());
System.out.print("getTotalPremium," + postConfirm.getDatas().getPriceinfo().getTotalPremium());
System.out.print("getBzPremium," + postConfirm.getDatas().getPriceinfo().getBzPremium());
System.out.print("getTcPremium," + postConfirm.getDatas().getPriceinfo().getTcPremium());
System.out.print("getAllCharge," + postConfirm.getDatas().getPriceinfo().getAllCharge());
System.out.println("getVsltax," + postConfirm.getDatas().getPriceinfo().getVsltax());
System.out.print("getAllCharge," + postConfirm.getDatas().getPriceinfo().getAllCharge());
System.out.print("," + dateToString(list.get(i).getCreateDate()));
System.out.println("");*/
}
}
quotationResponse.setTotalPremium(totalPremium);
quotationResponse.setBzPremium(bzPremium);
quotationResponse.setTcPremium(tcPremium);
quotationResponse.setTsltax(vsltax);
quotationResponse.setAllCharge(allCharge);
return quotationResponse;
}
}
\ No newline at end of file
#tomcat 端口号 #tomcat 端口号
server.port=8080 server.port=8081
server.context-path=/synch server.context-path=/carapi
# \u9875\u9762\u9ED8\u8BA4\u524D\u7F00\u76EE\u5F55 # \u9875\u9762\u9ED8\u8BA4\u524D\u7F00\u76EE\u5F55
spring.mvc.view.prefix=/ spring.mvc.view.prefix=/
# \u54CD\u5E94\u9875\u9762\u9ED8\u8BA4\u540E\u7F00 # \u54CD\u5E94\u9875\u9762\u9ED8\u8BA4\u540E\u7F00
...@@ -72,5 +72,5 @@ jwt.issuer:zuihuibi ...@@ -72,5 +72,5 @@ jwt.issuer:zuihuibi
jwt.bypass:TEST jwt.bypass:TEST
#jwt.bypass:/user/loginDemo,/auth/token,/login,/register #jwt.bypass:/user/loginDemo,/auth/token,/login,/register
jpa.sensitivekey:12345678
encryption.key=12345678
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_121"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
...@@ -17,5 +17,12 @@ ...@@ -17,5 +17,12 @@
<attribute name="org.eclipse.jst.component.nondependency" value=""/> <attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/ajb-car-utils"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>
...@@ -16,17 +16,17 @@ ...@@ -16,17 +16,17 @@
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name> <name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name> <name>org.eclipse.wst.validation.validationbuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name> <name>org.eclipse.m2e.core.maven2Builder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
......
...@@ -7,7 +7,10 @@ ...@@ -7,7 +7,10 @@
<artifactId>ajb-car</artifactId> <artifactId>ajb-car</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
<groupId>ajb-car-app</groupId>
<artifactId>ajb-car-entity</artifactId> <artifactId>ajb-car-entity</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>ajb-car-entity</name> <name>ajb-car-entity</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<properties> <properties>
...@@ -22,4 +25,5 @@ ...@@ -22,4 +25,5 @@
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
package com.ajb.car.entity.meta;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="userdata")
public class Userdata implements java.io.Serializable {
private static final long serialVersionUID = 1L;
/** ?? 主键,???? ag_md_code_type.id */
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="id")
private Long id;
@Column(name="username")
private String username;
@Column(name="pasword")
private String pasword;
@Column(name="encryptedpassword")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
private String encryptedpassword;
@Column(name="telephone")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
private String telephone;
@Column(name="idnumber")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
private String idnumber;
public String getUsername(){
return this.username;
}
public void setUsername(String username){
this.username = username;
}
public String getPasword(){
return this.pasword;
}
public void setPasword(String pasword){
this.pasword = pasword;
}
public String getEncryptedpassword(){
return this.encryptedpassword;
}
public void setEncryptedpassword(String encryptedpassword){
this.encryptedpassword = encryptedpassword;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getIdnumber() {
return idnumber;
}
public void setIdnumber(String idnumber) {
this.idnumber = idnumber;
}
}
\ No newline at end of file
...@@ -2,12 +2,15 @@ package com.ajb.car.entity.quotation; ...@@ -2,12 +2,15 @@ package com.ajb.car.entity.quotation;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
import org.hibernate.annotations.ColumnTransformer;
/** /**
报价单表 报价单表
*/ */
...@@ -249,6 +252,7 @@ private static final long serialVersionUID = 1L; ...@@ -249,6 +252,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 客户手机,???? ag_po_quotation.customer_mobile */ /** ?? 客户手机,???? ag_po_quotation.customer_mobile */
@Column(name="customer_mobile") @Column(name="customer_mobile")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getCustomerMobile(){ public String getCustomerMobile(){
return this.customerMobile; return this.customerMobile;
} }
......
...@@ -2,6 +2,7 @@ package com.ajb.car.entity.quotation; ...@@ -2,6 +2,7 @@ package com.ajb.car.entity.quotation;
import java.util.Date; import java.util.Date;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
...@@ -148,6 +149,7 @@ private static final long serialVersionUID = 1L; ...@@ -148,6 +149,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 投保人证件号,???? ag_po_quotation_confirm.applicant_certcode */ /** ?? 投保人证件号,???? ag_po_quotation_confirm.applicant_certcode */
@Column(name="applicant_certcode") @Column(name="applicant_certcode")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getApplicantCertcode(){ public String getApplicantCertcode(){
return this.applicantCertcode; return this.applicantCertcode;
} }
...@@ -157,6 +159,7 @@ private static final long serialVersionUID = 1L; ...@@ -157,6 +159,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 投保人,???? ag_po_quotation_confirm.applicant_tel */ /** ?? 投保人,???? ag_po_quotation_confirm.applicant_tel */
@Column(name="applicant_tel") @Column(name="applicant_tel")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getApplicantTel(){ public String getApplicantTel(){
return this.applicantTel; return this.applicantTel;
} }
...@@ -184,6 +187,7 @@ private static final long serialVersionUID = 1L; ...@@ -184,6 +187,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 被保人证件号,???? ag_po_quotation_confirm.insured_certcode */ /** ?? 被保人证件号,???? ag_po_quotation_confirm.insured_certcode */
@Column(name="insured_certcode") @Column(name="insured_certcode")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getInsuredCertcode(){ public String getInsuredCertcode(){
return this.insuredCertcode; return this.insuredCertcode;
} }
...@@ -211,6 +215,7 @@ private static final long serialVersionUID = 1L; ...@@ -211,6 +215,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 权益人证件号,???? ag_po_quotation_confirm.claimant_certcode */ /** ?? 权益人证件号,???? ag_po_quotation_confirm.claimant_certcode */
@Column(name="claimant_certcode") @Column(name="claimant_certcode")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getClaimantCertcode(){ public String getClaimantCertcode(){
return this.claimantCertcode; return this.claimantCertcode;
} }
...@@ -256,6 +261,7 @@ private static final long serialVersionUID = 1L; ...@@ -256,6 +261,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 银行账户,???? ag_po_quotation_confirm.invoice_bankcard_id */ /** ?? 银行账户,???? ag_po_quotation_confirm.invoice_bankcard_id */
@Column(name="invoice_bankcard_id") @Column(name="invoice_bankcard_id")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getInvoiceBankcardId(){ public String getInvoiceBankcardId(){
return this.invoiceBankcardId; return this.invoiceBankcardId;
} }
...@@ -274,6 +280,7 @@ private static final long serialVersionUID = 1L; ...@@ -274,6 +280,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 登记电话,???? ag_po_quotation_confirm.invoice_tel */ /** ?? 登记电话,???? ag_po_quotation_confirm.invoice_tel */
@Column(name="invoice_tel") @Column(name="invoice_tel")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getInvoiceTel(){ public String getInvoiceTel(){
return this.invoiceTel; return this.invoiceTel;
} }
...@@ -292,6 +299,7 @@ private static final long serialVersionUID = 1L; ...@@ -292,6 +299,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 收件人电话,???? ag_po_quotation_confirm.receiver_tel */ /** ?? 收件人电话,???? ag_po_quotation_confirm.receiver_tel */
@Column(name="receiver_tel") @Column(name="receiver_tel")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getReceiverTel(){ public String getReceiverTel(){
return this.receiverTel; return this.receiverTel;
} }
......
...@@ -3,6 +3,7 @@ package com.ajb.car.entity.quotation; ...@@ -3,6 +3,7 @@ package com.ajb.car.entity.quotation;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
...@@ -137,6 +138,7 @@ private static final long serialVersionUID = 1L; ...@@ -137,6 +138,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 电话,???? ag_po_quotation_tax.telephone */ /** ?? 电话,???? ag_po_quotation_tax.telephone */
@Column(name="telephone") @Column(name="telephone")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getTelephone(){ public String getTelephone(){
return this.telephone; return this.telephone;
} }
...@@ -187,6 +189,7 @@ private static final long serialVersionUID = 1L; ...@@ -187,6 +189,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 证件号码,???? ag_po_quotation_tax.cert_code */ /** ?? 证件号码,???? ag_po_quotation_tax.cert_code */
@Column(name="cert_code") @Column(name="cert_code")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getCertCode(){ public String getCertCode(){
return this.certCode; return this.certCode;
} }
......
...@@ -2,6 +2,7 @@ package com.ajb.car.entity.quotation; ...@@ -2,6 +2,7 @@ package com.ajb.car.entity.quotation;
import java.util.Date; import java.util.Date;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
...@@ -309,6 +310,7 @@ private static final long serialVersionUID = 1L; ...@@ -309,6 +310,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 发动机号,???? ag_po_quotation_vehicle.engine_no */ /** ?? 发动机号,???? ag_po_quotation_vehicle.engine_no */
@Column(name="engine_no") @Column(name="engine_no")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getEngineNo(){ public String getEngineNo(){
return this.engineNo; return this.engineNo;
} }
...@@ -318,6 +320,7 @@ private static final long serialVersionUID = 1L; ...@@ -318,6 +320,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? VIN编号,???? ag_po_quotation_vehicle.vin_no */ /** ?? VIN编号,???? ag_po_quotation_vehicle.vin_no */
@Column(name="vin_no") @Column(name="vin_no")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getVinNo(){ public String getVinNo(){
return this.vinNo; return this.vinNo;
} }
...@@ -327,6 +330,7 @@ private static final long serialVersionUID = 1L; ...@@ -327,6 +330,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 车架号,???? ag_po_quotation_vehicle.frame_number */ /** ?? 车架号,???? ag_po_quotation_vehicle.frame_number */
@Column(name="frame_number") @Column(name="frame_number")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getFrameNumber(){ public String getFrameNumber(){
return this.frameNumber; return this.frameNumber;
} }
...@@ -516,6 +520,7 @@ private static final long serialVersionUID = 1L; ...@@ -516,6 +520,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 证件号,???? ag_po_quotation_vehicle.owner_certi_code */ /** ?? 证件号,???? ag_po_quotation_vehicle.owner_certi_code */
@Column(name="owner_certi_code") @Column(name="owner_certi_code")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getOwnerCertiCode(){ public String getOwnerCertiCode(){
return this.ownerCertiCode; return this.ownerCertiCode;
} }
...@@ -640,6 +645,7 @@ private static final long serialVersionUID = 1L; ...@@ -640,6 +645,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 平台型号编码,???? ag_po_quotation_vehicle.platform_model_code */ /** ?? 平台型号编码,???? ag_po_quotation_vehicle.platform_model_code */
@Column(name="platform_model_code") @Column(name="platform_model_code")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getPlatformModelCode(){ public String getPlatformModelCode(){
return this.platformModelCode; return this.platformModelCode;
} }
......
...@@ -2,6 +2,7 @@ package com.ajb.car.entity.quotation; ...@@ -2,6 +2,7 @@ package com.ajb.car.entity.quotation;
import java.util.Date; import java.util.Date;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
...@@ -159,6 +160,7 @@ private static final long serialVersionUID = 1L; ...@@ -159,6 +160,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 证件编号,???? ag_po_quotation_vehicle_relation.id_no */ /** ?? 证件编号,???? ag_po_quotation_vehicle_relation.id_no */
@Column(name="id_no") @Column(name="id_no")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getIdNo(){ public String getIdNo(){
return this.idNo; return this.idNo;
} }
...@@ -168,6 +170,7 @@ private static final long serialVersionUID = 1L; ...@@ -168,6 +170,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 移动电话,???? ag_po_quotation_vehicle_relation.mobile_phone */ /** ?? 移动电话,???? ag_po_quotation_vehicle_relation.mobile_phone */
@Column(name="mobile_phone") @Column(name="mobile_phone")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getMobilePhone(){ public String getMobilePhone(){
return this.mobilePhone; return this.mobilePhone;
} }
...@@ -240,6 +243,7 @@ private static final long serialVersionUID = 1L; ...@@ -240,6 +243,7 @@ private static final long serialVersionUID = 1L;
} }
/** ?? 固定电话,???? ag_po_quotation_vehicle_relation.telephone */ /** ?? 固定电话,???? ag_po_quotation_vehicle_relation.telephone */
@Column(name="telephone") @Column(name="telephone")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getTelephone(){ public String getTelephone(){
return this.telephone; return this.telephone;
} }
...@@ -278,6 +282,7 @@ private static final long serialVersionUID = 1L; ...@@ -278,6 +282,7 @@ private static final long serialVersionUID = 1L;
this.versionNo = versionNo; this.versionNo = versionNo;
} }
@Column(name="email") @Column(name="email")
@Convert(converter = com.ajb.common.utils.encryption.JPACryptoConverter.class)
public String getEmail(){ public String getEmail(){
return this.email; return this.email;
} }
......
...@@ -12,9 +12,20 @@ ...@@ -12,9 +12,20 @@
<attribute name="org.eclipse.jst.component.nondependency" value=""/> <attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> <classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes> <attributes>
<attribute name="owner.project.facets" value="java"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path=".apt_generated">
<attributes>
<attribute name="optional" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
......
<factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/fastjson/1.2.47/fastjson-1.2.47.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/druid/1.1.6/druid-1.1.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-jpa/1.5.3.RELEASE/spring-boot-starter-data-jpa-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter/1.5.3.RELEASE/spring-boot-starter-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot/1.5.3.RELEASE/spring-boot-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-autoconfigure/1.5.3.RELEASE/spring-boot-autoconfigure-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-logging/1.5.3.RELEASE/spring-boot-starter-logging-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.1.11/logback-core-1.1.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/4.3.8.RELEASE/spring-core-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-aop/1.5.3.RELEASE/spring-boot-starter-aop-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/4.3.8.RELEASE/spring-aop-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-jdbc/1.5.3.RELEASE/spring-boot-starter-jdbc-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/tomcat-jdbc/8.5.14/tomcat-jdbc-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/tomcat-juli/8.5.14/tomcat-juli-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/4.3.8.RELEASE/spring-jdbc-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-core/5.0.12.Final/hibernate-core-5.0.12.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.3.1.Final/jboss-logging-3.3.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/jandex/2.0.0.Final/jandex-2.0.0.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/common/hibernate-commons-annotations/5.0.1.Final/hibernate-commons-annotations-5.0.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-entitymanager/5.0.12.Final/hibernate-entitymanager-5.0.12.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/transaction/javax.transaction-api/1.2/javax.transaction-api-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-jpa/1.11.3.RELEASE/spring-data-jpa-1.11.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-commons/1.13.3.RELEASE/spring-data-commons-1.13.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-orm/4.3.8.RELEASE/spring-orm-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/4.3.8.RELEASE/spring-context-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/4.3.8.RELEASE/spring-expression-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-tx/4.3.8.RELEASE/spring-tx-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/4.3.8.RELEASE/spring-beans-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aspects/4.3.8.RELEASE/spring-aspects-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.2.Final/hibernate-jpa-2.1-api-1.0.2.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-web/1.5.3.RELEASE/spring-boot-starter-web-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-tomcat/1.5.3.RELEASE/spring-boot-starter-tomcat-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-core/8.5.14/tomcat-embed-core-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-el/8.5.14/tomcat-embed-el-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.14/tomcat-embed-websocket-8.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-validator/5.3.5.Final/hibernate-validator-5.3.5.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/classmate/1.3.3/classmate-1.3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.8.8/jackson-databind-2.8.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.8.8/jackson-core-2.8.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/4.3.8.RELEASE/spring-web-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/4.3.8.RELEASE/spring-webmvc-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okhttp3/okhttp/3.6.0/okhttp-3.6.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okio/okio/1.11.0/okio-1.11.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.10/commons-codec-1.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpmime/4.5.3/httpmime-4.5.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/sf/ehcache/ehcache/2.10.4/ehcache-2.10.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml/3.9/poi-ooxml-3.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi/3.9/poi-3.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml-schemas/3.9/poi-ooxml-schemas-3.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-configuration-processor/1.5.3.RELEASE/spring-boot-configuration-processor-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-test/1.5.3.RELEASE/spring-boot-starter-test-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-test/1.5.3.RELEASE/spring-boot-test-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-test-autoconfigure/1.5.3.RELEASE/spring-boot-test-autoconfigure-1.5.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/jayway/jsonpath/json-path/2.2.0/json-path-2.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/json-smart/2.2.1/json-smart-2.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/accessors-smart/1.1/accessors-smart-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/junit/junit/4.12/junit-4.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/assertj/assertj-core/2.6.0/assertj-core-2.6.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/objenesis/objenesis/2.1/objenesis-2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/skyscreamer/jsonassert/1.4.0/jsonassert-1.4.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-test/4.3.8.RELEASE/spring-test-4.3.8.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/5.1.41/mysql-connector-java-5.1.41.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/druid/1.0.31/druid-1.0.31.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/googlecode/log4jdbc/log4jdbc/1.2/log4jdbc-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/swetake/util/Qrcode/1.0/Qrcode-1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/aliyun/aliyun-java-sdk-core/3.2.3/aliyun-java-sdk-core-3.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/aliyun/aliyun-java-sdk-dysmsapi/3.2.3/aliyun-java-sdk-dysmsapi-3.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/aliyun/aliyun-java-sdk-dm/3.1.0/aliyun-java-sdk-dm-3.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/mail/javax.mail/1.5.6/javax.mail-1.5.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="PLUGIN" id="org.eclipse.jst.ws.annotations.core" enabled="true" runInBatchMode="false"/>
</factorypath>
eclipse.preferences.version=1 eclipse.preferences.version=1
encoding//src/main/java=UTF-8 encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8 encoding/<project>=UTF-8
encoding/pom.xml=UTF-8 encoding/pom.xml=UTF-8
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6 org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.source=1.8
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="ajb-car-jpa"> <wb-module deploy-name="ajb-car-jpa">
<wb-resource deploy-path="/" source-path="/src/main/java"/> <wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/.apt_generated"/>
</wb-module> </wb-module>
</project-modules> </project-modules>
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
<faceted-project> <faceted-project>
<installed facet="cloudfoundry.standalone.app" version="1.0"/> <installed facet="cloudfoundry.standalone.app" version="1.0"/>
<installed facet="jst.utility" version="1.0"/> <installed facet="jst.utility" version="1.0"/>
<installed facet="java" version="1.6"/> <installed facet="java" version="1.8"/>
</faceted-project> </faceted-project>
disabled=06target
eclipse.preferences.version=1 eclipse.preferences.version=1
line.separator=\r\n
eclipse.preferences.version=1
userprojectsettings=false
...@@ -7,7 +7,10 @@ ...@@ -7,7 +7,10 @@
<artifactId>ajb-car</artifactId> <artifactId>ajb-car</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
<artifactId>ajb-car-jpa</artifactId> <artifactId>ajb-car-jpa</artifactId>
<groupId>ajb-car-app</groupId>
<version>0.0.1-SNAPSHOT</version>
<name>ajb-car-jpa</name> <name>ajb-car-jpa</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<properties> <properties>
...@@ -15,18 +18,18 @@ ...@@ -15,18 +18,18 @@
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>ajb-car</groupId> <groupId>ajb-car-app</groupId>
<artifactId>ajb-car-vo</artifactId> <artifactId>ajb-car-vo</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ajb-car</groupId> <groupId>ajb-car-app</groupId>
<artifactId>ajb-car-entity</artifactId> <artifactId>ajb-car-entity</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ajb-car</groupId> <groupId>ajb-car-app</groupId>
<artifactId>ajb-common-utils</artifactId> <artifactId>ajb-car-utils</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</dependency> </dependency>
...@@ -163,4 +166,25 @@ ...@@ -163,4 +166,25 @@
<version>3.9</version> <version>3.9</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<!-- Compiler 插件, 设定JDK版本 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>
package com.ajb.car.metadata.repositories;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.ajb.car.entity.meta.Userdata;
@Repository
public interface UserdataRepository extends JpaRepository<Userdata, Long>,JpaSpecificationExecutor<Userdata> {
/***
* mock find 10
*/
@Query(value="select * from ${context.tableName} t limit 10 ", nativeQuery=true)
List<Userdata> findAll();
}
\ No newline at end of file
package com.ajb.car.metadata.service;
import java.util.List;
import org.springframework.data.domain.Sort;
import com.ajb.car.entity.meta.Userdata;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
public interface UserdataService {
Userdata save(Userdata userdata);
Boolean delete (Long id);
Userdata update(Userdata userdata);
Userdata findById(Long id);
Page<Userdata> findByObjPageable(Userdata userdata,Pageable pageable);
List<Userdata> findByObjSortable(Userdata userdata,Sort sort);
}
\ No newline at end of file
package com.ajb.car.metadata.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.ExampleMatcher;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;
import com.ajb.car.entity.meta.Userdata;
import com.ajb.car.metadata.repositories.UserdataRepository;
import com.ajb.car.metadata.service.UserdataService;
@Service("userdataService")
public class UserdataServiceImpl implements UserdataService{
@Autowired
private UserdataRepository userdataRepo;
public Userdata save(Userdata obj){
return userdataRepo.save(obj);
}
public Boolean delete(Long id) {
try {
userdataRepo .delete(id);
} catch (Exception e) {
return false;
}
return true;
}
public Userdata update(Userdata obj) {
return userdataRepo.saveAndFlush(obj);
}
public Userdata findById(Long id){
return userdataRepo.findOne(id);
}
public Page<Userdata> findByObjPageable(Userdata obj,Pageable pageable){
ExampleMatcher matcher = ExampleMatcher.matching();
Example<Userdata> ex = Example.of(obj, matcher);
return userdataRepo.findAll(ex,pageable);
}
public List<Userdata> findByObjSortable(Userdata obj,Sort sort){
ExampleMatcher matcher = ExampleMatcher.matching();
Example<Userdata> ex = Example.of(obj, matcher);
return userdataRepo.findAll(ex,sort);
}
}
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_121"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
...@@ -14,6 +14,13 @@ ...@@ -14,6 +14,13 @@
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
......
...@@ -6,18 +6,37 @@ ...@@ -6,18 +6,37 @@
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name> <name>org.eclipse.jdt.core.javabuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name> <name>org.eclipse.m2e.core.maven2Builder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
</buildSpec> </buildSpec>
<natures> <natures>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature> <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures> </natures>
</projectDescription> </projectDescription>
eclipse.preferences.version=1 eclipse.preferences.version=1
encoding//src/main/java=UTF-8 encoding//src/main/java=UTF-8
encoding//src/main/java/com/ajb/common/utils/string/StringUtil.java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8 encoding/<project>=UTF-8
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="ajb-car-utils">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<faceted-project> <faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="cloudfoundry.standalone.app" version="1.0"/>
<installed facet="java" version="1.8"/> <installed facet="java" version="1.8"/>
<installed facet="jst.web" version="3.1"/> <installed facet="jst.utility" version="1.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project> </faceted-project>
disabled=06target
eclipse.preferences.version=1
...@@ -16,10 +16,21 @@ ...@@ -16,10 +16,21 @@
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>ajb-car</groupId> <groupId>ajb-car-app</groupId>
<artifactId>ajb-car-vo</artifactId> <artifactId>ajb-car-vo</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate.javax.persistence/hibernate-jpa-2.1-api -->
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.2.Final</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<!-- SpringBoot Web 依赖 --> <!-- SpringBoot Web 依赖 -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
...@@ -73,4 +84,20 @@ ...@@ -73,4 +84,20 @@
<version>3.9</version> <version>3.9</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<!-- Compiler 插件, 设定JDK版本 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
</plugins>
</build>
<groupId>ajb-car-app</groupId>
<version>0.0.1-SNAPSHOT</version>
</project> </project>
package com.ajb.common.utils.encryption;
import java.security.Key;
import java.security.spec.AlgorithmParameterSpec;
import javax.crypto.Cipher;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;
import javax.crypto.spec.IvParameterSpec;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
/**
* 加密/解密工具
* @author ershuai
* @date 2017年4月18日 上午11:27:36
*/
public class DESUtils {
private final byte[] DESIV = new byte[] { 0x12, 0x34, 0x56, 120, (byte) 0x90, (byte) 0xab, (byte) 0xcd, (byte) 0xef };// 向量
private AlgorithmParameterSpec iv = null;// 加密算法的参数接口
private Key key = null;
private String charset = "utf-8";
/**
* 初始化
* @param deSkey 密钥
* @return
* @throws Exception
*/
public DESUtils(String deSkey, String charset) throws Exception {
if (charset!=null && !charset.isEmpty())
{
this.charset = charset;
}
DESKeySpec keySpec = new DESKeySpec(deSkey.getBytes(this.charset));// 设置密钥参数
iv = new IvParameterSpec(DESIV);// 设置向量
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");// 获得密钥工厂
key = keyFactory.generateSecret(keySpec);// 得到密钥对象
}
/**
* 加密
* @author ershuai
* @date 2017年4月19日 上午9:40:53
* @param data
* @return
* @throws Exception
*/
public String encode(String data) throws Exception {
Cipher enCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");// 得到加密对象Cipher
enCipher.init(Cipher.ENCRYPT_MODE, key, iv);// 设置工作模式为加密模式,给出密钥和向量
byte[] pasByte = enCipher.doFinal(data.getBytes("utf-8"));
BASE64Encoder base64Encoder = new BASE64Encoder();
return base64Encoder.encode(pasByte);
}
/**
* 解密
* @author ershuai
* @date 2017年4月19日 上午9:41:01
* @param data
* @return
* @throws Exception
*/
public String decode(String data) throws Exception {
Cipher deCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
deCipher.init(Cipher.DECRYPT_MODE, key, iv);
BASE64Decoder base64Decoder = new BASE64Decoder();
byte[] pasByte = deCipher.doFinal(base64Decoder.decodeBuffer(data));
return new String(pasByte, "UTF-8");
}
public static void main(String[] args) {
try {
String test = "ershuai";
String key = "12345678";// 自定义密钥
DESUtils des = new DESUtils(key, "utf-8");
System.out.println("加密前的字符:" + test);
System.out.println("加密后的字符:" + des.encode(test));
System.out.println("解密后的字符:" + des.decode(des.encode(test)));
} catch (Exception e) {
e.printStackTrace();
}
}
}
package com.ajb.common.utils.encryption;
import java.util.Properties;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import org.apache.commons.lang3.StringUtils;
@Converter
public class JPACryptoConverter implements AttributeConverter<String, String> {
private static final String secret_property_key = "encryption.key";
private static final Properties properties = new Properties();
private static String sensitivekey = null;
static {
try {
properties.load(JPACryptoConverter.class.getClassLoader()
.getResourceAsStream("persistence.properties"));
} catch (Exception e) {
properties.put(secret_property_key, "12345678");
}
sensitivekey = (String)properties.get(secret_property_key);
}
@Override
public String convertToDatabaseColumn(String sensitive) {
DESUtils des;
String result = "";
try {
des = new DESUtils(sensitivekey, "utf-8");
if (StringUtils.isNotEmpty(sensitive) && StringUtils.isNoneBlank(sensitive))
{
result = des.encode(sensitive);
}
return result;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return result;
}
@Override
public String convertToEntityAttribute(String sensitive) {
DESUtils des;
String result = "";
try {
des = new DESUtils(sensitivekey, "utf-8");
if (StringUtils.isNotEmpty(sensitive) && StringUtils.isNoneBlank(sensitive))
{
result = des.decode(sensitive);
}
return result;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return result;
}
}
package com.ajb.common.utils.encryption;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
/**
* jwt安全验证设置 head tag,seal封条,过期时间,发行,bypass
* @author Simon Cheng
*/
@Service
public class JPASensitiveSetting {
@Value("${jpa.sensitivekey}")
public String sensitivekey;
}
package com.ajb.common.utils.encryption;
import org.apache.commons.lang3.StringUtils;
/**
*
*/
public class MaskUtils {
public static String maskCellphone(String cellphoneNo) {
if ((cellphoneNo == null) || (cellphoneNo.trim().length() != 11)) {
return cellphoneNo;
}
return cellphoneNo.substring(0, 3) + "****" + cellphoneNo.substring(cellphoneNo.length() - 4);
}
public static String maskEmail(String email) {
if (StringUtils.isBlank(email)) {
return "";
}
int index = StringUtils.indexOf(email, "@");
if (index <= 1)
return email;
else
return StringUtils.rightPad(StringUtils.left(email, 1), index, "*")
.concat(StringUtils.mid(email, index, StringUtils.length(email)));
}
private static String maskCardNo(String cardNo) {
if ((cardNo == null) || (cardNo.trim().length() <= 8)) {
return cardNo;
}
cardNo = cardNo.trim();
int length = cardNo.length();
String firstFourNo = cardNo.substring(0, 4);
String lastFourNo = cardNo.substring(length - 4);
String mask = "";
for (int i = 0; i < length - 8; i++) {
mask = mask + "*";
}
return firstFourNo + mask + lastFourNo;
}
public static String maskIDCardNo(String idCardNo) {
return maskCardNo(idCardNo);
}
public static String maskBankCardNo(String bankCardNo) {
return maskCardNo(bankCardNo);
}
}
...@@ -76,7 +76,6 @@ public class HttpHelpZhiMa { ...@@ -76,7 +76,6 @@ public class HttpHelpZhiMa {
public static String doGet(String url, String token) public static String doGet(String url, String token)
{ {
String returnValue = null; String returnValue = null;
RequestBody body = null;
OkHttpClient client = new OkHttpClient(); OkHttpClient client = new OkHttpClient();
...@@ -117,6 +116,7 @@ public class HttpHelpZhiMa { ...@@ -117,6 +116,7 @@ public class HttpHelpZhiMa {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
return returnValue; return returnValue;
} }
public static String doPost(String url, String requestBody,String token) public static String doPost(String url, String requestBody,String token)
......
package com.ajb.common.utils.string;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.URL;
import java.net.URLConnection;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
public class CommonUtil {
private static final String EMAIL_REGEX="^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";//邮箱正则表达式
/*
* 日期格式:http://blog.csdn.net/linghu_java/article/details/38379603
* yyyy-MM-dd HH:mm:ss:SSS 24小时制
* yyyy-MM-dd hh:mm:ss:SSS 12小时制
*/
/**
* 日期转换成字符串
* @param source
* @param pattern 例如 yyyy-MM-dd HH:mm:ss
* @return
*/
public static String dateParseString(Date source,String pattern){
if(source == null){
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
return sdf.format(source);
}
/**
* 字符串转换成日期
* @param source
* @param pattern 例如 yyyy-MM-dd HH:mm:ss
* @return
*/
public static Date stringParseDate(String source,String pattern){
if(isNullOrBlank(source) || isNullOrBlank(pattern)){
return null;
}
Date date = null;
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
try {
date = sdf.parse(source);
} catch (ParseException e) {
return null;
}
return date;
}
public static double doubleFormat(Double source,int num){
if(source == null){
source = 0d;
}
BigDecimal bd = new BigDecimal(source);
double result = bd.setScale(num,BigDecimal.ROUND_HALF_UP).doubleValue();
return result;
}
public static String doubleParseString(Double source,String parten){
if(source == null){
source = 0d;
}
if(parten == null){
parten = "##,###,###,##0.00";
}
DecimalFormat fmt = new DecimalFormat(parten);
return fmt.format(source);
}
public static String longParseString(Long source,String parten){
if(source == null){
source = 0L;
}
if(parten == null){
parten = "##,###,###,###";
}
DecimalFormat fmt = new DecimalFormat(parten);
return fmt.format(source);
}
/**
* 空字符串付默认值
* @param source
* @param defaultValue
* @return
*/
public static String nullStringToDefault(String source,String defaultValue){
String result = source;
if(isNullOrBlank(source)){
result = defaultValue;
}
return result;
}
public static Integer stringParseInt(String source){
Integer result = null;
if(isNullOrBlank(source)){
return null;
}else{
try{
result = Integer.parseInt(source);
}catch(Exception e){}
}
return result;
}
public static Long stringParseLong(String source){
Long result = null;
if(isNullOrBlank(source)){
return null;
}else{
try{
result = Long.parseLong(source);
}catch(Exception e){}
}
return result;
}
public static Double stringParseDouble(String source){
Double result = null;
if(isNullOrBlank(source)){
return null;
}else{
try{
result = Double.parseDouble(source);
}catch(Exception e){}
}
return result;
}
public static boolean isNullOrBlank(String source){
boolean result = false;
if(source == null){
result = true;
}else if("".equals(source.trim())){
result = true;
}
return result ;
}
public static String getClassType(Object source){
String classType = "Integer";
if(source == null){
return null;
}
String className = source.getClass().getName();
if(className.contains("java.lang.Integer")){
classType = "Integer";
}else if(className.contains("java.lang.Long")){
classType = "Long";
}else if(className.contains("java.lang.Double")){
classType = "Double";
}else if(className.contains("java.math.BigInteger")){
classType = "BigInteger";
}else if(className.contains("java.math.BigDecimal")){
classType = "BigDecimal";
}
return classType;
}
public static Integer intValue(Object source){
Integer result = null;
if(source == null){
return 0;
}
try{
if("Integer".equals(getClassType(source))){
result = ((Integer)source).intValue();
}else if("BigInteger".equals(getClassType(source))){
result = ((BigInteger)source).intValue();
}else if("BigDecimal".equals(getClassType(source))){
result = ((BigDecimal)source).intValue();
}
}catch(Exception e){
e.printStackTrace();
}
return result;
}
public static boolean isNullOrZero(Object source){
boolean result = false;
if(source == null){
result = true;
}else{
if("Integer".equals(getClassType(source))){
int value = ((Integer)source).intValue();
if(value == 0){
result = true;
}
}else if("Long".equals(getClassType(source))){
long value = ((Long)source).longValue();
if(value == 0){
result = true;
}
}else if("Double".equals(getClassType(source))){
double value = ((Double)source).doubleValue();
if(value == 0){
result = true;
}
}else if("BigInteger".equals(getClassType(source))){
double value = ((BigInteger)source).doubleValue();
if(value == 0){
result = true;
}
}else if("BigDecimal".equals(getClassType(source))){
double value = ((BigDecimal)source).doubleValue();
if(value == 0){
result = true;
}
}
}
return result ;
}
/**
* 求时间差
* @param source 终止时间
* @param target 开始时间
* @param unit D天 H小时 M分 S秒 MS毫秒
* @return
*/
public static long getDatePeriod(Date source,Date target,String unit){
long result = 0;
long nd = 1000 * 24 * 60 * 60;
long nh = 1000 * 60 * 60;
long nm = 1000 * 60;
long ns = 1000;
long ms = 1;
// 获得两个时间的毫秒时间差异
long diff = source.getTime() - target.getTime();
/*
// 计算差多少天
long day = diff / nd;
// 计算差多少小时
long hour = diff % nd / nh;
// 计算差多少分钟
long min = diff % nd % nh / nm;
// 计算差多少秒//输出结果
long sec = diff % nd % nh % nm / ns;
//return day + "天" + hour + "小时" + min + "分钟";
*/
if("D".equals(unit)){
result = diff / nd;
}else if("H".equals(unit)){
result = diff / nh;
}else if("M".equals(unit)){
result = diff / nm;
}else if("S".equals(unit)){
result = diff / ns;
}else if("MS".equals(unit)){
result = diff / ms;
}
return result;
}
/**
*
* @param source
* @param operation ADD或SUB
* @param unit S秒 M分钟 H小时 D天 W周 Mon月 Y年
* @param number
* @return
*/
public static Date dateOperation(Date source,String operation,String unit,int number){
Date result = null;
Calendar calendar = Calendar.getInstance();
calendar.setTime(source);
int field = Calendar.SECOND;
if("S".equals(unit)){
field = Calendar.SECOND;
}else if("M".equals(unit)){
field = Calendar.MINUTE;
}else if("H".equals(unit)){
field = Calendar.HOUR_OF_DAY;
}else if("D".equals(unit)){
field = Calendar.DATE;
}else if("W".equals(unit)){
field = Calendar.WEEK_OF_MONTH;
}else if("Mon".equals(unit)){
field = Calendar.MONTH;
}else if("Y".equals(unit)){
field = Calendar.YEAR;
}
if("SUB".equals(operation)){
calendar.add(field, -number);
}else{
calendar.add(field, number);
}
result = calendar.getTime();
return result;
}
/**
* 由出生日期获得年龄
* @param birthDay
* @return
* @throws Exception
*/
public static int getAge(Date birthDay){
int age = 0;
if(birthDay == null){
return 0;
}
try{
Calendar cal = Calendar.getInstance();
if (cal.before(birthDay)) {
// throw new IllegalArgumentException("The birthDay is before Now.It's unbelievable!");
return -1;
}
int yearNow = cal.get(Calendar.YEAR);
int monthNow = cal.get(Calendar.MONTH);
int dayOfMonthNow = cal.get(Calendar.DAY_OF_MONTH);
cal.setTime(birthDay);
int yearBirth = cal.get(Calendar.YEAR);
int monthBirth = cal.get(Calendar.MONTH);
int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH);
age = yearNow - yearBirth;
if (monthNow <= monthBirth) {
if (monthNow == monthBirth) {
if (dayOfMonthNow < dayOfMonthBirth){
age--;
}
}else{
age--;
}
}
}catch(Exception e){}
return age;
}
/**
* 根据异常对象获取异常堆栈字符串
* @param e
* @return
*/
public static String parseExceptionStack(Exception e){
String exceptionStack = null;
/*StringBuffer sbf = new StringBuffer();
StackTraceElement[] stack = e.getStackTrace();
StackTraceElement element = null;
String message = e.toString();
sbf.append(message+"\n");
for(int i=0;i<stack.length;i++){
element = stack[i];
String fileName = element.getFileName();
String methodName = element.getMethodName();
String className = element.getClassName();
int lineNumber = element.getLineNumber();
String append = fileName+":"+lineNumber;
boolean isNativeMethod = element.isNativeMethod();
if(isNativeMethod){
append = "Native Method";
}
sbf.append(" at "+className+"."+methodName+"("+append+")\n");
}
exceptionStack = sbf.toString();*/
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
exceptionStack = sw.toString();
return exceptionStack;
}
public static boolean isValidDate(String source,String pattern) {
boolean convertSuccess = true;
if(isNullOrBlank(source)){
return false;
}
SimpleDateFormat format = new SimpleDateFormat(pattern);
try {
format.setLenient(false);
format.parse(source);
}catch(Exception e) {
convertSuccess=false;
}
return convertSuccess;
}
public static boolean checkEmail(String email){
return Pattern.matches(EMAIL_REGEX, email.trim());
}
/**
*
* @param area 省份名、城市名、县名
* @param birthDay 出生日期,格式(19891019)
* @param gender 性别(范围:1-9,男:奇数,女:偶数)
* @param age
* @return
*/
public static String createID(String area,String birthDay,String gender,Integer age){
String idNo = null;
String areaCode = null;
String seqNo = getRandomNum(2)+""; // (两位)顺序号,格式(00-99)
Random random = new Random();
String areaCodeFile = CommonUtil.class.getResource("").getPath()+File.separator+"areaCode.txt";
List<String> areaList = readFile(areaCodeFile, "UTF-8");
if(area == null || "".equals(area)){
String item = areaList.get(random.nextInt(areaList.size()) -1);
areaCode = item.split(" ")[0];
}else{
for(String item : areaList){
if(item.contains(area)){
areaCode = item.split(" ")[0];
break;
}
}
}
if(areaCode == null){areaCode = "110101";}
if(birthDay == null || "".equals(birthDay)){
if(age == null || age <= 0){
int[] arr = new int[]{1,2,3,4};
int a = arr[random.nextInt(4)];
String ageStr = a+getRandomNum(1);
age = Integer.parseInt(ageStr);
}
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.YEAR, -age);
int randomDay = 1+(int)(Math.random()*360);
calendar.add(Calendar.DAY_OF_YEAR, -randomDay);
birthDay = dateParseString(calendar.getTime(), "yyyyMMdd");
}
if(gender == null || "".equals(gender)){
gender = getRandomNum(1)+"";
}
// 前17位要除以的数:7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4 2
int finalAreaCode = Integer.parseInt(areaCode.substring(0, 1)) * 7
+ Integer.parseInt(areaCode.substring(1, 2)) * 9
+ Integer.parseInt(areaCode.substring(2, 3)) * 10
+ Integer.parseInt(areaCode.substring(3, 4)) * 5
+ Integer.parseInt(areaCode.substring(4, 5)) * 8
+ Integer.parseInt(areaCode.substring(5, 6)) * 4;
int finalBirthday = Integer.parseInt(birthDay.substring(0, 1)) * 2
+ Integer.parseInt(birthDay.substring(1, 2)) * 1
+ Integer.parseInt(birthDay.substring(2, 3)) * 6
+ Integer.parseInt(birthDay.substring(3, 4)) * 3
+ Integer.parseInt(birthDay.substring(4, 5)) * 7
+ Integer.parseInt(birthDay.substring(5, 6)) * 9
+ Integer.parseInt(birthDay.substring(6, 7)) * 10
+ Integer.parseInt(birthDay.substring(7, 8)) * 5;
int NoIs = (Integer.parseInt(seqNo.substring(0, 1))) * 8
+ (Integer.parseInt(seqNo.substring(1, 2))) * 4;
int sexNo = (Integer.parseInt(gender.substring(0, 1))) * 2;
int checkCode = (finalAreaCode + finalBirthday + NoIs + sexNo) % 11;
int finalCheckCode = 0;
// 余数范围: 0 1 2 3 4 5 6 7 8 9 10
// 余数对应的数:1 0 X 9 8 7 6 5 4 3 2
// 计算出最终的校验码:finalCheckCode
switch (checkCode) {
case 0:
finalCheckCode = 1;
break;
case 1:
finalCheckCode = 0;
break;
case 2:
finalCheckCode = -3;
break;
case 3:
finalCheckCode = 9;
break;
case 4:
finalCheckCode = 8;
break;
case 5:
finalCheckCode = 7;
break;
case 6:
finalCheckCode = 6;
break;
case 7:
finalCheckCode = 5;
break;
case 8:
finalCheckCode = 4;
break;
case 9:
finalCheckCode = 3;
break;
case 10:
finalCheckCode = 2;
break;
default:
break;
}
// 区域编号(6位数)+出生日期(8位数)+顺序编号(2位数)+性别号(1位数)+校验码(1位数)=身份证号(18位数)
String checkInd = null;
if(finalCheckCode == -3){
checkInd = "X";
}else{
checkInd = finalCheckCode+"";
}
idNo = areaCode + birthDay + seqNo + gender + checkInd;
return idNo;
}
public static String createMail(){
String mail = getRandomString(5)+"@163.com";
return mail;
}
public static String createPhoneNo(){
return "139"+getRandomNum(8);
}
public static String getRandomString(int length) { //length表示生成字符串的长度
String base = "abcdefghijklmnopqrstuvwxyz0123456789";
Random random = new Random();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < length; i++) {
int number = random.nextInt(base.length());
sb.append(base.charAt(number));
}
return sb.toString();
}
public static String getRandomNum(int length) { //length表示生成字符串的长度
String base = "0123456789";
Random random = new Random();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < length; i++) {
int number = random.nextInt(base.length());
sb.append(base.charAt(number));
}
return sb.toString();
}
public static String createName(){
Random random=new Random(System.currentTimeMillis());
/* 598 百家姓 */
String[] Surname= {"赵","钱","孙","李","周","吴","郑","王","冯","陈","褚","卫","蒋","沈","韩","杨","朱","秦","尤","许",
"何","吕","施","张","孔","曹","严","华","金","魏","陶","姜","戚","谢","邹","喻","柏","水","窦","章","云","苏","潘","葛","奚","范","彭","郎",
"鲁","韦","昌","马","苗","凤","花","方","俞","任","袁","柳","酆","鲍","史","唐","费","廉","岑","薛","雷","贺","倪","汤","滕","殷",
"罗","毕","郝","邬","安","常","乐","于","时","傅","皮","卞","齐","康","伍","余","元","卜","顾","孟","平","黄","和",
"穆","萧","尹","姚","邵","湛","汪","祁","毛","禹","狄","米","贝","明","臧","计","伏","成","戴","谈","宋","茅","庞","熊","纪","舒",
"屈","项","祝","董","梁","杜","阮","蓝","闵","席","季","麻","强","贾","路","娄","危","江","童","颜","郭","梅","盛","林","刁","钟",
"徐","邱","骆","高","夏","蔡","田","樊","胡","凌","霍","虞","万","支","柯","昝","管","卢","莫","经","房","裘","缪","干","解","应",
"宗","丁","宣","贲","邓","郁","单","杭","洪","包","诸","左","石","崔","吉","钮","龚","程","嵇","邢","滑","裴","陆","荣","翁","荀",
"羊","于","惠","甄","曲","家","封","芮","羿","储","靳","汲","邴","糜","松","井","段","富","巫","乌","焦","巴","弓","牧","隗","山",
"谷","车","侯","宓","蓬","全","郗","班","仰","秋","仲","伊","宫","宁","仇","栾","暴","甘","钭","厉","戎","祖","武","符","刘","景",
"詹","束","龙","叶","幸","司","韶","郜","黎","蓟","溥","印","宿","白","怀","蒲","邰","从","鄂","索","咸","籍","赖","卓","蔺","屠",
"蒙","池","乔","阴","郁","胥","能","苍","双","闻","莘","党","翟","谭","贡","劳","逄","姬","申","扶","堵","冉","宰","郦","雍","却",
"璩","桑","桂","濮","牛","寿","通","边","扈","燕","冀","浦","尚","农","温","别","庄","晏","柴","瞿","阎","充","慕","连","茹","习",
"宦","艾","鱼","容","向","古","易","慎","戈","廖","庾","终","暨","居","衡","步","都","耿","满","弘","匡","国","文","寇","广","禄",
"阙","东","欧","殳","沃","利","蔚","越","夔","隆","师","巩","厍","聂","晁","勾","敖","融","冷","訾","辛","阚","那","简","饶","空",
"曾","毋","沙","乜","养","鞠","须","丰","巢","关","蒯","相","查","后","荆","红","游","郏","竺","权","逯","盖","益","桓","公","仉",
"督","岳","帅","缑","亢","况","郈","有","琴","归","海","晋","楚","闫","法","汝","鄢","涂","钦","商","牟","佘","佴","伯","赏","墨",
"哈","谯","篁","年","爱","阳","佟","言","福","南","火","铁","迟","漆","官","冼","真","展","繁","檀","祭","密","敬","揭","舜","楼",
"疏","冒","浑","挚","胶","随","高","皋","原","种","练","弥","仓","眭","蹇","覃","阿","门","恽","来","綦","召","仪","风","介","巨",
"木","京","狐","郇","虎","枚","抗","达","杞","苌","折","麦","庆","过","竹","端","鲜","皇","亓","老","是","秘","畅","邝","还","宾",
"闾","辜","纵","侴","万俟","司马","上官","欧阳","夏侯","诸葛","闻人","东方","赫连","皇甫","羊舌","尉迟","公羊","澹台","公冶","宗正",
"濮阳","淳于","单于","太叔","申屠","公孙","仲孙","轩辕","令狐","钟离","宇文","长孙","慕容","鲜于","闾丘","司徒","司空","兀官","司寇",
"南门","呼延","子车","颛孙","端木","巫马","公西","漆雕","车正","壤驷","公良","拓跋","夹谷","宰父","谷梁","段干","百里","东郭","微生",
"梁丘","左丘","东门","西门","南宫","第五","公仪","公乘","太史","仲长","叔孙","屈突","尔朱","东乡","相里","胡母","司城","张廖","雍门",
"毋丘","贺兰","綦毋","屋庐","独孤","南郭","北宫","王孙"};
int index=random.nextInt(Surname.length-1);
String name = Surname[index]; //获得一个随机的姓氏
/* 从常用字中选取一个或两个字作为名 */
if(random.nextBoolean()){
name+=getChinese()+getChinese();
}else {
name+=getChinese();
}
// System.out.println(name);
return name;
}
public static String getChinese() {
String str = null;
int highPos, lowPos;
Random random = new Random();
highPos = (176 + Math.abs(random.nextInt(71)));//区码,0xA0打头,从第16区开始,即0xB0=11*16=176,16~55一级汉字,56~87二级汉字
random=new Random();
lowPos = 161 + Math.abs(random.nextInt(94));//位码,0xA0打头,范围第1~94列
byte[] bArr = new byte[2];
bArr[0] = (new Integer(highPos)).byteValue();
bArr[1] = (new Integer(lowPos)).byteValue();
try {
str = new String(bArr, "GB2312"); //区位码组合成汉字
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return str;
}
public static void main(String[] args){
// String idNo = createID("南部县", "19940929", "1", null);
String idNo = createID("长丰县", null, "1", 31);
System.out.println(idNo);
System.out.println(IDcardValidator.isIdcardValid(idNo));
}
@SuppressWarnings("rawtypes")
public static String currentIP(){
String currentIP = null;
try {
Enumeration allNetInterfaces = NetworkInterface.getNetworkInterfaces();
InetAddress ip = null;
while (allNetInterfaces.hasMoreElements()){
NetworkInterface netInterface = (NetworkInterface) allNetInterfaces.nextElement();
//System.out.println(netInterface.getName());
Enumeration addresses = netInterface.getInetAddresses();
while (addresses.hasMoreElements()){
ip = (InetAddress) addresses.nextElement();
if(ip != null && ip instanceof Inet4Address){
if(currentIP == null){
currentIP = "";
}
currentIP += ip.getHostAddress()+";";
// System.out.println("本机的IP = " + currentIP);
}
if(ip != null && ip instanceof Inet6Address){
if(currentIP == null){
currentIP = "";
}
currentIP += ip.getHostAddress()+":";
}
}
}
} catch (SocketException e) {
e.printStackTrace();
}
return currentIP;
}
/**
* 获取HttpServletRequest请求IP
* @param request
* @return
*/
public static String getIpAddress(HttpServletRequest request) {
String ip = request.getHeader("x-forwarded-for");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_CLIENT_IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_X_FORWARDED_FOR");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
return ip;
}
@SuppressWarnings("rawtypes")
public static void simpleObjectCopy(Object source,Object target){
if(source == null || target == null){ return; }
try {
Method[] sourceMethods = source.getClass().getDeclaredMethods();
for(Method smethod : sourceMethods){
Class returnType = smethod.getReturnType();
String sourceMethodName = smethod.getName();
if(!returnType.getTypeName().equals("void") && sourceMethodName.startsWith("get")){
Object[] paramArr = null;
Object getValue = smethod.invoke(source,paramArr);
if(getValue != null){
// System.out.println("--------------in simpleObjectCopy returnType : "+returnType.getTypeName()+" sourceMethodName="+sourceMethodName);
Method[] targetMethods = target.getClass().getDeclaredMethods();
for(Method tmethod : targetMethods){
String targetMethodName = tmethod.getName();
if(targetMethodName.equals("set"+sourceMethodName.substring(3))){
Class[] parameterTypes = tmethod.getParameterTypes();
if(parameterTypes != null && parameterTypes.length == 1 && parameterTypes[0].getTypeName().equals(returnType.getTypeName())){
// System.out.println("--------------in simpleObjectCopy targetMethodName:"+targetMethodName);
tmethod.invoke(target,getValue);
}//set value
break;
}//set
}//for targetMethod
}//get value != null
}//get
}//for sourceMethod
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
e.printStackTrace();
}
}
public static String getInputStreamContent(InputStream inputStream,String charset)throws Exception{
String content = null;
if(inputStream == null){
return null;
}
if(charset == null ){
charset = "UTF-8";
}
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream,charset));// 为了进行一行读取操作
StringBuilder buffer = new StringBuilder();
String line = "";
while ((line = reader.readLine()) != null) {
buffer.append(line);
}
content = buffer.toString();
return content;
}
public static List<String> readFile(String fileName,String encoding){
List<String> contents = new ArrayList<String>();
File file = new File(fileName);
FileInputStream fi = null;
InputStreamReader ir = null;
BufferedReader br = null;
try {
fi = new FileInputStream(file);
ir = new InputStreamReader(fi,encoding);
br = new BufferedReader(ir);
while(br.ready()){
String line = br.readLine();
contents.add(line);
}
} catch (Exception e) {
e.printStackTrace();
} finally{
try {
fi.close();
ir.close();
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return contents;
}
public static void writeFile(List<String> contents,String fileName,boolean appending,String encoding){
File file = new File(fileName);
FileOutputStream fo = null;
OutputStreamWriter or = null;
BufferedWriter bw = null;
try {
fo = new FileOutputStream(file,appending);
or = new OutputStreamWriter(fo,encoding);
bw = new BufferedWriter(or);
for(String line : contents){
bw.write(line);
bw.newLine();
}
bw.flush();
} catch (Exception e) {
e.printStackTrace();
} finally{
try {
fo.close();
or.close();
bw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
* 判断是否是数字
*/
private static final Pattern NUMBER_PATTERN = Pattern.compile("[0-9]*");
public static boolean isNumeric(String str){
// Pattern pattern = Pattern.compile("[0-9]*");
// Matcher isNum = pattern.matcher(str);
Matcher numMatcher = NUMBER_PATTERN.matcher(str);
if( !numMatcher.matches() ){
return false;
}
return true;
}
// 根据Unicode编码完美的判断中文汉字和符号
public static boolean isChinese(char c) {
Character.UnicodeBlock ub = Character.UnicodeBlock.of(c);
if (ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS || ub == Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS
|| ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A || ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B
|| ub == Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION || ub == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS
|| ub == Character.UnicodeBlock.GENERAL_PUNCTUATION) {
return true;
}
return false;
}
public static Double calcuPersonalTAX(Double amount){
Double tax = 0d;
if(amount <= 800){
tax = 0.0d;
}else if(800 < amount && amount <= 4000){
tax = (amount - 800 ) * 0.2 ;
}else if(4000 < amount && amount <= 25000){
tax = amount * (1-0.2) * 0.2 ;
}else if(25000 < amount && amount <= 62500){
tax = amount * (1-0.2) * 0.3 -2000 ;
}else if(62500 < amount){
tax = amount * (1-0.2) * 0.4 - 7000 ;
}
return tax;
}
/**
* 判断字符串中是否含有数字
* @param content
* @return
*/
public static boolean hasDigit(String content) {
boolean flag = false;
Pattern pattern = Pattern.compile(".*\\d+.*");
Matcher m = pattern.matcher(content);
if (m.matches()) {
flag = true;
}
return flag;
}
/**
* 判断是否含有特殊字符
*
* @param str
* @return true为包含,false为不包含
*/
public static final String DEFAULT_QUERY_REGEX = "[ _`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?]|\n|\r|\t";
public static boolean isSpecialCharacter(String str) {
Pattern p = Pattern.compile(DEFAULT_QUERY_REGEX);
Matcher m = p.matcher(str);
return m.find();
}
/**
* 通过ip地址获取该ip的实际地理地址
* @param ip
* @return
*/
public static String getAddressByIP(String ip){
String address = null;
try{
URL url = new URL( "http://ip.taobao.com/service/getIpInfo.php?ip=" + ip);
URLConnection conn = url.openConnection();
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8"));
String line = null;
StringBuffer result = new StringBuffer();
while((line = reader.readLine()) != null){
result.append(line);
}
reader.close();
String ipInfo = result.toString();
IpToAddress ipToAddress = (IpToAddress) JsonUtil.jsonToObj(ipInfo, IpToAddress.class);
if (ipToAddress != null) {
if("0".equals(ipToAddress.getCode())){
String area = ipToAddress.getData().getCountry();
if (area == null && "".equals(area)) {
area = ipToAddress.getData().getArea();
}
String region = ipToAddress.getData().getRegion();
String city = ipToAddress.getData().getCity();
String isp = ipToAddress.getData().getIsp();
address = area+"_"+region+"_"+city+"_"+isp;
}
}
}
catch( IOException e){
System.out.println( "获取失败!!!!");
}
return address;
}
/**
* 判断姓名(中文姓名和英文姓名)
*/
public static boolean isConSpeCharacters(String str) {
if (str.replaceAll("[\u4e00-\u9fa5]*[a-z]*[A-Z]*\\d*-*_*\\s*", "").length() == 0) {
return false;
}
return true;
}
/**
* 通过身份证号码获取出生日期、性别、年龄
* @param certificateNo
* @return 返回的出生日期格式:1990-01-01 性别格式:F-女,M-男
*/
/**
* 通过身份证号码获取出生日期、性别、年龄
* @param certificateNo 身份证号码
* @param type birthday -- 出生年月日 age--年龄 sex--性别
* @return 结果 sex--性别 1-男 2-女
*/
public static String getBirAgeSex(String certificateNo,String type) {
String birthday = "";
String age = "";
String sexCode = "";
String result = "";
int year = Calendar.getInstance().get(Calendar.YEAR);
char[] number = certificateNo.toCharArray();
boolean flag = true;
if (number.length == 15) {
for (int x = 0; x < number.length; x++) {
if (!flag) return null;
flag = Character.isDigit(number[x]);
}
} else if (number.length == 18) {
for (int x = 0; x < number.length - 1; x++) {
if (!flag) return null;
flag = Character.isDigit(number[x]);
}
}
if (flag && certificateNo.length() == 15) {
birthday = "19" + certificateNo.substring(6, 8) + "-"
+ certificateNo.substring(8, 10) + "-"
+ certificateNo.substring(10, 12);
sexCode = Integer.parseInt(certificateNo.substring(certificateNo.length() - 3, certificateNo.length())) % 2 == 0 ? "F" : "M";
age = (year - Integer.parseInt("19" + certificateNo.substring(6, 8))) + "";
} else if (flag && certificateNo.length() == 18) {
birthday = certificateNo.substring(6, 10) + "-"
+ certificateNo.substring(10, 12) + "-"
+ certificateNo.substring(12, 14);
sexCode = Integer.parseInt(certificateNo.substring(certificateNo.length() - 4, certificateNo.length() - 1)) % 2 == 0 ? "F" : "M";
age = (year - Integer.parseInt(certificateNo.substring(6, 10))) + "";
}
Map<String, String> map = new HashMap<String, String>();
map.put("birthday", birthday);
map.put("age", age);
map.put("sexCode", sexCode);
if ("birthday".equals(type)) {
result = birthday;
}else if("age".equals(type)){
result = age;
}else if("sex".equals(type)){
if("F".equals(sexCode)){
sexCode = "2";
}else if ("M".equals(sexCode)) {
sexCode = "1";
}
result = sexCode;
}
return result;
}
}
package com.ajb.common.utils.string;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Data {
private String ip;
private String country;
private String area;
private String region;
private String city;
private String county;
private String isp;
private String countryId;
private String areaId;
private String regionId;
private String cityId;
private String countyId;
private String ispId;
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public String getIsp() {
return isp;
}
public void setIsp(String isp) {
this.isp = isp;
}
@JsonProperty("country_id")
public String getCountryId() {
return countryId;
}
@JsonProperty(value="country_id")
public void setCountryId(String countryId) {
this.countryId = countryId;
}
@JsonProperty("area_id")
public String getAreaId() {
return areaId;
}
@JsonProperty(value="area_id")
public void setAreaId(String areaId) {
this.areaId = areaId;
}
@JsonProperty("region_id")
public String getRegionId() {
return regionId;
}
@JsonProperty(value="region_id")
public void setRegionId(String regionId) {
this.regionId = regionId;
}
@JsonProperty("city_id")
public String getCityId() {
return cityId;
}
@JsonProperty(value="city_id")
public void setCityId(String cityId) {
this.cityId = cityId;
}
@JsonProperty("county_id")
public String getCountyId() {
return countyId;
}
@JsonProperty(value="county_id")
public void setCountyId(String countyId) {
this.countyId = countyId;
}
@JsonProperty("isp_id")
public String getIspId() {
return ispId;
}
@JsonProperty(value="isp_id")
public void setIspId(String ispId) {
this.ispId = ispId;
}
}
package com.ajb.common.utils.string;
public class IpToAddress {
private String code;
private Data data;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Data getData() {
return data;
}
public void setData(Data data) {
this.data = data;
}
}
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_121"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
......
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name> <name>org.eclipse.wst.validation.validationbuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name> <name>org.eclipse.m2e.core.maven2Builder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
......
eclipse.preferences.version=1 eclipse.preferences.version=1
encoding//src/main/java=UTF-8 encoding//src/main/java=UTF-8
encoding//src/main/java/com/ajb/car/vo/common/JsonResult.java=UTF-8 encoding//src/main/java/com/ajb/car/vo/common/JsonResult.java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8 encoding/<project>=UTF-8
disabled=06target
eclipse.preferences.version=1
...@@ -22,15 +22,21 @@ ...@@ -22,15 +22,21 @@
<version>1.2.47</version> <version>1.2.47</version>
</dependency> </dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>3.7.1</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies> </dependencies>
<build>
<plugins>
<!-- Compiler 插件, 设定JDK版本 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
</plugins>
</build>
<version>0.0.1-SNAPSHOT</version>
<groupId>ajb-car-app</groupId>
</project> </project>
package com.ajb.car.vo.common;
import java.io.Serializable;
public class DESCommon implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
private String content;
private String encrypted;
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getEncrypted() {
return encrypted;
}
public void setEncrypted(String encrypt) {
encrypted = encrypt;
}
}
package com.ajb.car.vo.common; package com.ajb.car.vo.common;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/*** public class JsonResult implements Serializable {
* 返回结果封装
* /**
* @author fan
* *
*/ */
public class JsonResult implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private boolean success; private boolean success;
private String message; private String message;
private Object data; private Object data;
public JsonResult(){}
public JsonResult(boolean success,String msg,Object data){
this.success=success;
this.message=msg;
this.data=data;
}
public JsonResult(boolean success,String msg){
this.success=success;
this.message=msg;
this.data=null;
}
private JsonResult(String msg, Object data) {
this.message=msg;
this.success=true;
this.data=data;
}
public Object getData() {
return data;
}
public String getMessage() {
return message;
}
public boolean isSuccess() { public boolean isSuccess() {
return success; return success;
} }
public void setSuccess(boolean success) {
public JsonResult ofSuccess(String msg, Object data) { this.success = success;
return new JsonResult(msg, data) ;
} }
public String getMessage() {
public void setData(Object data) { return message;
this.data = data;
} }
public void setMessage(String message) { public void setMessage(String message) {
this.message = message; this.message = message;
} }
public Object getData() {
public void setSuccess(boolean success) { return data;
this.success = success;
} }
public void setData(Object data) {
@SuppressWarnings({ "unchecked", "rawtypes" }) this.data = data;
public void addResult(Object responseVO){
Class c = responseVO.getClass();
Method getMethod = null;
try {
Class[] classArr = null;
getMethod = c.getMethod("getCommonResult", classArr);
} catch (NoSuchMethodException | SecurityException e1) {
e1.printStackTrace();
} }
CommonResult commonResult = null;
if(getMethod != null){
try {
Object[] objectArr = null;
commonResult = (CommonResult)getMethod.invoke(responseVO, objectArr);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
e.printStackTrace();
}
}
if(commonResult != null){
this.success = commonResult.isSuccess();
this.message = commonResult.getMessage();
}else{
this.success = false;
this.message = "未知异常!";
}
Method setMethod = null;
try {
setMethod = c.getMethod("setCommonResult", CommonResult.class);
} catch (NoSuchMethodException | SecurityException e) {
e.printStackTrace();
}
if(setMethod != null){
CommonResult args = null;
try {
setMethod.invoke(responseVO, args);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
e.printStackTrace();
}
}
}
} }
package com.ajb.car.vo.quotation;
import java.util.Date;
import java.math.BigDecimal;
/**
报价单表
*/
public class AgPoQuotationRequestVO implements java.io.Serializable {
private static final long serialVersionUID = 1L;
private Long id;
// 报价单号
private String quoteNo;
// 报价单
private Date quoteVersion;
// 报价车辆id, FK ag_po_quotation_vehicle.id
private Long quoteVehicleId;
// 1:YES=新保, 2:No=续保
private Integer isRenewal;
// 0:单商业,1:单交强,2:关联出单
private Integer quoteType;
// 0=open临时报价 1=confirm确认报价 2=completed保险公司确认 3=cancelled 4=overdue 9=error
private Integer quoteStatus;
// I=Insurer V=Vendor O=Other
private String quoteProviderType;
// FK ag_acl_insurer.id or ag_acl_vendor.id
private Long quoteProviderId;
// 请求报价客户id
private Long customerId;
// 车牌号
private String plateNo;
// 客户手机
private String customerMobile;
private String customerMobileMask;
// 客户名称
private String customerName;
// 币种
private String currency;
// 总保费
private BigDecimal totalPremium;
// 总折扣金额
private BigDecimal totalDiscount;
// 总佣金
private BigDecimal totalCharge;
// 车船税
private BigDecimal vehicleTax;
// 交强险状态0 无报价1 正常报价2 无法报价
private Integer compulsoryStatus;
// 交强险报价信息说明
private String compulsoryMessage;
// 交强险保费
private BigDecimal compulsoryPremium;
// 交强险折扣金额
private BigDecimal compulsoryDiscount;
// 交强险期开始日期
private Date compulsoryStart;
// 交强险期截止日期
private Date compulsoryEnd;
// 交强险佣金
private BigDecimal compulsoryCharge;
// 商业险状态0 无报价1 正常报价2 无法报价
private Integer businessInsuranceStatus;
// 商业险报价信息说明
private String businessInsuranceMessage;
// 商业险保费
private BigDecimal businessInsurancePremium;
// 商业险费率
private BigDecimal businessInsuranceFloatingRate;
// 商业险折扣金额
private BigDecimal businessInsuranceDiscount;
// 商业险开始日期
private Date businessInsuranceStart;
// 商业险截止日期
private Date businessInsuranceEnd;
// 商业险佣金
private BigDecimal businessInsuranceCharge;
// 归属部门
private String departmentBelong;
// 归属人
private String departmentBelonger;
// 经办人
private String operator;
// 渠道代码
private String channelCode;
// 团单号
private String groupNumber;
// 出单机构
private String issueAssociation;
// 创建时间
private Date createdAt;
// 创建人
private Long createdBy;
// 修改时间
private Date updatedAt;
// 修改人
private Long updatedBy;
public void setId(Long id){
this.id = id;
}
public Long getId(){
return this.id;
}
/** ?? 报价单号,???? ag_po_quotation.quote_no */
public void setQuoteNo(String quoteNo){
this.quoteNo = quoteNo;
}
/** ?? 报价单号,???? ag_po_quotation.quote_no */
public String getQuoteNo(){
return this.quoteNo;
}
/** ?? 报价单,???? ag_po_quotation.quote_version */
public void setQuoteVersion(Date quoteVersion){
this.quoteVersion = quoteVersion;
}
/** ?? 报价单,???? ag_po_quotation.quote_version */
public Date getQuoteVersion(){
return this.quoteVersion;
}
/** ?? 报价车辆id, FK ag_po_quotation_vehicle.id,???? ag_po_quotation.quote_vehicle_id */
public void setQuoteVehicleId(Long quoteVehicleId){
this.quoteVehicleId = quoteVehicleId;
}
/** ?? 报价车辆id, FK ag_po_quotation_vehicle.id,???? ag_po_quotation.quote_vehicle_id */
public Long getQuoteVehicleId(){
return this.quoteVehicleId;
}
/** ?? 1:YES=新保, 2:No=续保,???? ag_po_quotation.is_renewal */
public void setIsRenewal(Integer isRenewal){
this.isRenewal = isRenewal;
}
/** ?? 1:YES=新保, 2:No=续保,???? ag_po_quotation.is_renewal */
public Integer getIsRenewal(){
return this.isRenewal;
}
/** ?? 0:单商业,1:单交强,2:关联出单,???? ag_po_quotation.quote_type */
public void setQuoteType(Integer quoteType){
this.quoteType = quoteType;
}
/** ?? 0:单商业,1:单交强,2:关联出单,???? ag_po_quotation.quote_type */
public Integer getQuoteType(){
return this.quoteType;
}
/** ?? 0=open临时报价 1=confirm确认报价 2=completed保险公司确认 3=cancelled 4=overdue 9=error,???? ag_po_quotation.quote_status */
public void setQuoteStatus(Integer quoteStatus){
this.quoteStatus = quoteStatus;
}
/** ?? 0=open临时报价 1=confirm确认报价 2=completed保险公司确认 3=cancelled 4=overdue 9=error,???? ag_po_quotation.quote_status */
public Integer getQuoteStatus(){
return this.quoteStatus;
}
/** ?? I=Insurer V=Vendor O=Other,???? ag_po_quotation.quote_provider_type */
public void setQuoteProviderType(String quoteProviderType){
this.quoteProviderType = quoteProviderType;
}
/** ?? I=Insurer V=Vendor O=Other,???? ag_po_quotation.quote_provider_type */
public String getQuoteProviderType(){
return this.quoteProviderType;
}
/** ?? FK ag_acl_insurer.id or ag_acl_vendor.id,???? ag_po_quotation.quote_provider_id */
public void setQuoteProviderId(Long quoteProviderId){
this.quoteProviderId = quoteProviderId;
}
/** ?? FK ag_acl_insurer.id or ag_acl_vendor.id,???? ag_po_quotation.quote_provider_id */
public Long getQuoteProviderId(){
return this.quoteProviderId;
}
/** ?? 请求报价客户id,???? ag_po_quotation.customer_id */
public void setCustomerId(Long customerId){
this.customerId = customerId;
}
/** ?? 请求报价客户id,???? ag_po_quotation.customer_id */
public Long getCustomerId(){
return this.customerId;
}
/** ?? 车牌号,???? ag_po_quotation.plate_no */
public void setPlateNo(String plateNo){
this.plateNo = plateNo;
}
/** ?? 车牌号,???? ag_po_quotation.plate_no */
public String getPlateNo(){
return this.plateNo;
}
/** ?? 客户手机,???? ag_po_quotation.customer_mobile */
public void setCustomerMobile(String customerMobile){
this.customerMobile = customerMobile;
}
/** ?? 客户手机,???? ag_po_quotation.customer_mobile */
public String getCustomerMobile(){
return this.customerMobile;
}
/** ?? 客户名称,???? ag_po_quotation.customer_name */
public void setCustomerName(String customerName){
this.customerName = customerName;
}
/** ?? 客户名称,???? ag_po_quotation.customer_name */
public String getCustomerName(){
return this.customerName;
}
/** ?? 币种,???? ag_po_quotation.currency */
public void setCurrency(String currency){
this.currency = currency;
}
/** ?? 币种,???? ag_po_quotation.currency */
public String getCurrency(){
return this.currency;
}
/** ?? 总保费,???? ag_po_quotation.total_premium */
public void setTotalPremium(BigDecimal totalPremium){
this.totalPremium = totalPremium;
}
/** ?? 总保费,???? ag_po_quotation.total_premium */
public BigDecimal getTotalPremium(){
return this.totalPremium;
}
/** ?? 总折扣金额,???? ag_po_quotation.total_discount */
public void setTotalDiscount(BigDecimal totalDiscount){
this.totalDiscount = totalDiscount;
}
/** ?? 总折扣金额,???? ag_po_quotation.total_discount */
public BigDecimal getTotalDiscount(){
return this.totalDiscount;
}
/** ?? 总佣金,???? ag_po_quotation.total_charge */
public void setTotalCharge(BigDecimal totalCharge){
this.totalCharge = totalCharge;
}
/** ?? 总佣金,???? ag_po_quotation.total_charge */
public BigDecimal getTotalCharge(){
return this.totalCharge;
}
/** ?? 车船税,???? ag_po_quotation.vehicle_tax */
public void setVehicleTax(BigDecimal vehicleTax){
this.vehicleTax = vehicleTax;
}
/** ?? 车船税,???? ag_po_quotation.vehicle_tax */
public BigDecimal getVehicleTax(){
return this.vehicleTax;
}
/** ?? 交强险状态0 无报价1 正常报价2 无法报价
,???? ag_po_quotation.compulsory_status */
public void setCompulsoryStatus(Integer compulsoryStatus){
this.compulsoryStatus = compulsoryStatus;
}
/** ?? 交强险状态0 无报价1 正常报价2 无法报价
,???? ag_po_quotation.compulsory_status */
public Integer getCompulsoryStatus(){
return this.compulsoryStatus;
}
/** ?? 交强险报价信息说明,???? ag_po_quotation.compulsory_message */
public void setCompulsoryMessage(String compulsoryMessage){
this.compulsoryMessage = compulsoryMessage;
}
/** ?? 交强险报价信息说明,???? ag_po_quotation.compulsory_message */
public String getCompulsoryMessage(){
return this.compulsoryMessage;
}
/** ?? 交强险保费,???? ag_po_quotation.compulsory_premium */
public void setCompulsoryPremium(BigDecimal compulsoryPremium){
this.compulsoryPremium = compulsoryPremium;
}
/** ?? 交强险保费,???? ag_po_quotation.compulsory_premium */
public BigDecimal getCompulsoryPremium(){
return this.compulsoryPremium;
}
/** ?? 交强险折扣金额,???? ag_po_quotation.compulsory_discount */
public void setCompulsoryDiscount(BigDecimal compulsoryDiscount){
this.compulsoryDiscount = compulsoryDiscount;
}
/** ?? 交强险折扣金额,???? ag_po_quotation.compulsory_discount */
public BigDecimal getCompulsoryDiscount(){
return this.compulsoryDiscount;
}
/** ?? 交强险期开始日期,???? ag_po_quotation.compulsory_start */
public void setCompulsoryStart(Date compulsoryStart){
this.compulsoryStart = compulsoryStart;
}
/** ?? 交强险期开始日期,???? ag_po_quotation.compulsory_start */
public Date getCompulsoryStart(){
return this.compulsoryStart;
}
/** ?? 交强险期截止日期,???? ag_po_quotation.compulsory_end */
public void setCompulsoryEnd(Date compulsoryEnd){
this.compulsoryEnd = compulsoryEnd;
}
/** ?? 交强险期截止日期,???? ag_po_quotation.compulsory_end */
public Date getCompulsoryEnd(){
return this.compulsoryEnd;
}
/** ?? 交强险佣金,???? ag_po_quotation.compulsory_charge */
public void setCompulsoryCharge(BigDecimal compulsoryCharge){
this.compulsoryCharge = compulsoryCharge;
}
/** ?? 交强险佣金,???? ag_po_quotation.compulsory_charge */
public BigDecimal getCompulsoryCharge(){
return this.compulsoryCharge;
}
/** ?? 商业险状态0 无报价1 正常报价2 无法报价
,???? ag_po_quotation.business_insurance_status */
public void setBusinessInsuranceStatus(Integer businessInsuranceStatus){
this.businessInsuranceStatus = businessInsuranceStatus;
}
/** ?? 商业险状态0 无报价1 正常报价2 无法报价
,???? ag_po_quotation.business_insurance_status */
public Integer getBusinessInsuranceStatus(){
return this.businessInsuranceStatus;
}
/** ?? 商业险报价信息说明,???? ag_po_quotation.business_insurance_message */
public void setBusinessInsuranceMessage(String businessInsuranceMessage){
this.businessInsuranceMessage = businessInsuranceMessage;
}
/** ?? 商业险报价信息说明,???? ag_po_quotation.business_insurance_message */
public String getBusinessInsuranceMessage(){
return this.businessInsuranceMessage;
}
/** ?? 商业险保费,???? ag_po_quotation.business_insurance_premium */
public void setBusinessInsurancePremium(BigDecimal businessInsurancePremium){
this.businessInsurancePremium = businessInsurancePremium;
}
/** ?? 商业险保费,???? ag_po_quotation.business_insurance_premium */
public BigDecimal getBusinessInsurancePremium(){
return this.businessInsurancePremium;
}
/** ?? 商业险费率,???? ag_po_quotation.business_insurance_floating_rate */
public void setBusinessInsuranceFloatingRate(BigDecimal businessInsuranceFloatingRate){
this.businessInsuranceFloatingRate = businessInsuranceFloatingRate;
}
/** ?? 商业险费率,???? ag_po_quotation.business_insurance_floating_rate */
public BigDecimal getBusinessInsuranceFloatingRate(){
return this.businessInsuranceFloatingRate;
}
/** ?? 商业险折扣金额,???? ag_po_quotation.business_insurance_discount */
public void setBusinessInsuranceDiscount(BigDecimal businessInsuranceDiscount){
this.businessInsuranceDiscount = businessInsuranceDiscount;
}
/** ?? 商业险折扣金额,???? ag_po_quotation.business_insurance_discount */
public BigDecimal getBusinessInsuranceDiscount(){
return this.businessInsuranceDiscount;
}
/** ?? 商业险开始日期,???? ag_po_quotation.business_insurance_start */
public void setBusinessInsuranceStart(Date businessInsuranceStart){
this.businessInsuranceStart = businessInsuranceStart;
}
/** ?? 商业险开始日期,???? ag_po_quotation.business_insurance_start */
public Date getBusinessInsuranceStart(){
return this.businessInsuranceStart;
}
/** ?? 商业险截止日期,???? ag_po_quotation.business_insurance_end */
public void setBusinessInsuranceEnd(Date businessInsuranceEnd){
this.businessInsuranceEnd = businessInsuranceEnd;
}
/** ?? 商业险截止日期,???? ag_po_quotation.business_insurance_end */
public Date getBusinessInsuranceEnd(){
return this.businessInsuranceEnd;
}
/** ?? 商业险佣金,???? ag_po_quotation.business_insurance_charge */
public void setBusinessInsuranceCharge(BigDecimal businessInsuranceCharge){
this.businessInsuranceCharge = businessInsuranceCharge;
}
/** ?? 商业险佣金,???? ag_po_quotation.business_insurance_charge */
public BigDecimal getBusinessInsuranceCharge(){
return this.businessInsuranceCharge;
}
/** ?? 归属部门,???? ag_po_quotation.department_belong */
public void setDepartmentBelong(String departmentBelong){
this.departmentBelong = departmentBelong;
}
/** ?? 归属部门,???? ag_po_quotation.department_belong */
public String getDepartmentBelong(){
return this.departmentBelong;
}
/** ?? 归属人,???? ag_po_quotation.department_belonger */
public void setDepartmentBelonger(String departmentBelonger){
this.departmentBelonger = departmentBelonger;
}
/** ?? 归属人,???? ag_po_quotation.department_belonger */
public String getDepartmentBelonger(){
return this.departmentBelonger;
}
/** ?? 经办人,???? ag_po_quotation.operator */
public void setOperator(String operator){
this.operator = operator;
}
/** ?? 经办人,???? ag_po_quotation.operator */
public String getOperator(){
return this.operator;
}
/** ?? 渠道代码,???? ag_po_quotation.channel_code */
public void setChannelCode(String channelCode){
this.channelCode = channelCode;
}
/** ?? 渠道代码,???? ag_po_quotation.channel_code */
public String getChannelCode(){
return this.channelCode;
}
/** ?? 团单号,???? ag_po_quotation.group_number */
public void setGroupNumber(String groupNumber){
this.groupNumber = groupNumber;
}
/** ?? 团单号,???? ag_po_quotation.group_number */
public String getGroupNumber(){
return this.groupNumber;
}
/** ?? 出单机构,???? ag_po_quotation.issue_association */
public void setIssueAssociation(String issueAssociation){
this.issueAssociation = issueAssociation;
}
/** ?? 出单机构,???? ag_po_quotation.issue_association */
public String getIssueAssociation(){
return this.issueAssociation;
}
/** ?? 创建时间,???? ag_po_quotation.created_at */
public void setCreatedAt(Date createdAt){
this.createdAt = createdAt;
}
/** ?? 创建时间,???? ag_po_quotation.created_at */
public Date getCreatedAt(){
return this.createdAt;
}
/** ?? 创建人,???? ag_po_quotation.created_by */
public void setCreatedBy(Long createdBy){
this.createdBy = createdBy;
}
/** ?? 创建人,???? ag_po_quotation.created_by */
public Long getCreatedBy(){
return this.createdBy;
}
/** ?? 修改时间,???? ag_po_quotation.updated_at */
public void setUpdatedAt(Date updatedAt){
this.updatedAt = updatedAt;
}
/** ?? 修改时间,???? ag_po_quotation.updated_at */
public Date getUpdatedAt(){
return this.updatedAt;
}
/** ?? 修改人,???? ag_po_quotation.updated_by */
public void setUpdatedBy(Long updatedBy){
this.updatedBy = updatedBy;
}
/** ?? 修改人,???? ag_po_quotation.updated_by */
public Long getUpdatedBy(){
return this.updatedBy;
}
public String getCustomerMobileMask() {
return customerMobileMask;
}
public void setCustomerMobileMask(String customerMobileMask) {
this.customerMobileMask = customerMobileMask;
}
}
\ No newline at end of file
package com.ajb.car.vo.quotation;
import com.ajb.car.vo.common.CommonResult;
public class AgPoQuotationResponseVO implements java.io.Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private CommonResult commonResult;
private AgPoQuotationRequestVO vo;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public CommonResult getCommonResult() {
return commonResult;
}
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
public AgPoQuotationRequestVO getRequestVO() {
return vo;
}
public void setRequestVO(AgPoQuotationRequestVO vo) {
this.vo = vo;
}
}
\ No newline at end of file
package com.ajb.car.vo.quotation;
public class QuotationRequestVO implements java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 车架号
*/
private String frameNumber;
/**
* 发动机号
*/
private String engineNumber;
/**
* 注册日期
*/
private String firstRegistrationDate;
/**
* 品牌型号
*/
private String brandModel;
/**
* 车主姓名
*/
private String customerName;
/**
* 身份证号
*/
private String customerCert;
/**
* 手机号
*/
private String customerMobile;
public String getCustomerMobile() {
return customerMobile;
}
public void setCustomerMobile(String customerMobile) {
this.customerMobile = customerMobile;
}
public String getCustomerCert() {
return customerCert;
}
public void setCustomerCert(String customerCert) {
this.customerCert = customerCert;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getBrandModel() {
return brandModel;
}
public void setBrandModel(String brandModel) {
this.brandModel = brandModel;
}
public String getFirstRegistrationDate() {
return firstRegistrationDate;
}
public void setFirstRegistrationDate(String firstRegistrationDate) {
this.firstRegistrationDate = firstRegistrationDate;
}
public String getEngineNumber() {
return engineNumber;
}
public void setEngineNumber(String engineNumber) {
this.engineNumber = engineNumber;
}
public String getFrameNumber() {
return frameNumber;
}
public void setFrameNumber(String frameNumber) {
this.frameNumber = frameNumber;
}
}
package com.ajb.car.vo.zhima.meta;
/**
* Auto-generated: 2018-08-08 10:22:33
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
public class VehicleModels {
private String modelNumber;
private String standardName;
private String vehicleCode;
private String price;
private String remark;
private String brandName;
private String vehicleAlias;
private String seat;
private String marketDate;
private String englineDesc;
private String vehicleHyName;
public String getModelNumber() {
return modelNumber;
}
public void setModelNumber(String modelNumber) {
this.modelNumber = modelNumber;
}
public String getStandardName() {
return standardName;
}
public void setStandardName(String standardName) {
this.standardName = standardName;
}
public String getVehicleCode() {
return vehicleCode;
}
public void setVehicleCode(String vehicleCode) {
this.vehicleCode = vehicleCode;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getBrandName() {
return brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
public String getVehicleAlias() {
return vehicleAlias;
}
public void setVehicleAlias(String vehicleAlias) {
this.vehicleAlias = vehicleAlias;
}
public String getSeat() {
return seat;
}
public void setSeat(String seat) {
this.seat = seat;
}
public String getMarketDate() {
return marketDate;
}
public void setMarketDate(String marketDate) {
this.marketDate = marketDate;
}
public String getEnglineDesc() {
return englineDesc;
}
public void setEnglineDesc(String englineDesc) {
this.englineDesc = englineDesc;
}
public String getVehicleHyName() {
return vehicleHyName;
}
public void setVehicleHyName(String vehicleHyName) {
this.vehicleHyName = vehicleHyName;
}
}
\ No newline at end of file
...@@ -5,6 +5,9 @@ import java.math.BigDecimal; ...@@ -5,6 +5,9 @@ import java.math.BigDecimal;
import com.ajb.car.vo.common.CommonResult; import com.ajb.car.vo.common.CommonResult;
public class QuotationResponse { public class QuotationResponse {
private String errorCode;//错误代码,E01-入参校验不通过,E02-重复投保,S01-保存失败
private String errorMessage;//错误信息
private Integer total = 0; private Integer total = 0;
private BigDecimal totalPremium = new BigDecimal(0); private BigDecimal totalPremium = new BigDecimal(0);
private BigDecimal bzPremium = new BigDecimal(0); private BigDecimal bzPremium = new BigDecimal(0);
...@@ -69,4 +72,20 @@ public class QuotationResponse { ...@@ -69,4 +72,20 @@ public class QuotationResponse {
this.bzPremium = bzPremium; this.bzPremium = bzPremium;
} }
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
} }
package com.ajb.car.vo.zhima.user;
public class UserdataDeleteRequestVO implements java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private Long id;
private String username;
private String pasword;
private String encryptedpassword;
private String telephone;
private String idnumber;
public void setUsername(String username){
this.username = username;
}
public String getUsername(){
return this.username;
}
public void setPasword(String pasword){
this.pasword = pasword;
}
public String getPasword(){
return this.pasword;
}
public void setEncryptedpassword(String encryptedpassword){
this.encryptedpassword = encryptedpassword;
}
public String getEncryptedpassword(){
return this.encryptedpassword;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getIdnumber() {
return idnumber;
}
public void setIdnumber(String idnumber) {
this.idnumber = idnumber;
}
}
\ No newline at end of file
package com.ajb.car.vo.zhima.user;
public class UserdataRequestVO implements java.io.Serializable {
/**
* 用户数据
*/
private static final long serialVersionUID = 1L;
private Long id;
private String username;
private String pasword;
private String encryptedpassword;
private String telephone;
private String idnumber;
private String telephonemask;
private String idnumbermask;
public void setUsername(String username){
this.username = username;
}
public String getUsername(){
return this.username;
}
public void setPasword(String pasword){
this.pasword = pasword;
}
public String getPasword(){
return this.pasword;
}
public void setEncryptedpassword(String encryptedpassword){
this.encryptedpassword = encryptedpassword;
}
public String getEncryptedpassword(){
return this.encryptedpassword;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getIdnumber() {
return idnumber;
}
public void setIdnumber(String idnumber) {
this.idnumber = idnumber;
}
public String getTelephonemask() {
return telephonemask;
}
public void setTelephonemask(String telephonemask) {
this.telephonemask = telephonemask;
}
public String getIdnumbermask() {
return idnumbermask;
}
public void setIdnumbermask(String idnumbermask) {
this.idnumbermask = idnumbermask;
}
}
\ No newline at end of file
package com.ajb.car.vo.zhima.user;
import com.ajb.car.vo.common.CommonResult;
public class UserdataResponseVO implements java.io.Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private CommonResult commonResult;
private UserdataRequestVO vo;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public CommonResult getCommonResult() {
return commonResult;
}
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
public UserdataRequestVO getRequestVO() {
return vo;
}
public void setRequestVO(UserdataRequestVO vo) {
this.vo = vo;
}
}
\ No newline at end of file
...@@ -18,15 +18,15 @@ ...@@ -18,15 +18,15 @@
<!-- 编译时的编码 --> <!-- 编译时的编码 -->
<maven.compiler.encoding>UTF-8</maven.compiler.encoding> <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
<!-- TODO 管理子模块各种版本 --> <!-- TODO 管理子模块各种版本 -->
<druid.version>1.1.9</druid.version> <druid.version> 1.0.31 </druid.version>
</properties> </properties>
<modules> <modules>
<module>ajb-car-vo</module> <module>ajb-car-vo</module>
<module>ajb-car-entity</module> <module>ajb-car-entity</module>
<module>ajb-car-jpa</module>
<module>ajb-car-utils</module> <module>ajb-car-utils</module>
<module>ajb-car-jpa</module>
<module>ajb-car-api</module> <module>ajb-car-api</module>
</modules> </modules>
<dependencies> <dependencies>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment