Przeglądaj źródła

初始化

Signed-off-by: tangsong <86121657@qq.com>
tangsong 2 lat temu
commit
f0cea658fa
46 zmienionych plików z 1906 dodań i 0 usunięć
  1. 0 0
      README.md
  2. 155 0
      message-client/message-client.iml
  3. 41 0
      message-client/pom.xml
  4. 37 0
      message-client/src/main/java/com/unis/message/client/EvasionFeign.java
  5. BIN
      message-client/target/classes/com/unis/message/client/EvasionFeign.class
  6. 102 0
      message-common/message-common.iml
  7. 44 0
      message-common/pom.xml
  8. 12 0
      message-common/src/main/java/com/unis/message/common/constant/Constant.java
  9. 27 0
      message-common/src/main/java/com/unis/message/common/vo/MessageCodeVO.java
  10. 35 0
      message-common/src/main/java/com/unis/message/common/vo/MessageVO.java
  11. BIN
      message-common/target/classes/com/unis/message/common/constant/Constant.class
  12. BIN
      message-common/target/classes/com/unis/message/common/vo/MessageCodeVO.class
  13. BIN
      message-common/target/classes/com/unis/message/common/vo/MessageVO.class
  14. 238 0
      message-server/message-server.iml
  15. 127 0
      message-server/pom.xml
  16. 263 0
      message-server/src/main/java/com/github/pagehelper/page/PageAutoDialect.java
  17. 22 0
      message-server/src/main/java/com/unis/message/server/MessageApplication.java
  18. 22 0
      message-server/src/main/java/com/unis/message/server/config/SwaggerConfig.java
  19. 56 0
      message-server/src/main/java/com/unis/message/server/controller/MessController.java
  20. 22 0
      message-server/src/main/java/com/unis/message/server/dao/MessageDao.java
  21. 11 0
      message-server/src/main/java/com/unis/message/server/service/IMessServer.java
  22. 16 0
      message-server/src/main/java/com/unis/message/server/service/MessageServer.java
  23. 76 0
      message-server/src/main/java/com/unis/message/server/service/impl/IMessServerImpl.java
  24. 37 0
      message-server/src/main/java/com/unis/message/server/service/impl/MessageServerImpl.java
  25. 311 0
      message-server/src/main/java/org/hibernate/dialect/Informix8sDialect.java
  26. 39 0
      message-server/src/main/resources/bootstrap.yml
  27. 46 0
      message-server/src/main/resources/mybatis/mapper/MessageMapper.xml
  28. 10 0
      message-server/src/main/resources/mybatis/mybatis-config.xml
  29. 38 0
      message-server/src/test/java/org/jdjcjh/server/AppTest.java
  30. 39 0
      message-server/target/classes/bootstrap.yml
  31. BIN
      message-server/target/classes/com/github/pagehelper/page/PageAutoDialect.class
  32. BIN
      message-server/target/classes/com/unis/message/server/MessageApplication.class
  33. BIN
      message-server/target/classes/com/unis/message/server/config/SwaggerConfig.class
  34. BIN
      message-server/target/classes/com/unis/message/server/controller/MessController.class
  35. BIN
      message-server/target/classes/com/unis/message/server/dao/MessageDao.class
  36. BIN
      message-server/target/classes/com/unis/message/server/service/IMessServer.class
  37. BIN
      message-server/target/classes/com/unis/message/server/service/MessageServer.class
  38. BIN
      message-server/target/classes/com/unis/message/server/service/impl/IMessServerImpl.class
  39. BIN
      message-server/target/classes/com/unis/message/server/service/impl/MessageServerImpl.class
  40. 46 0
      message-server/target/classes/mybatis/mapper/MessageMapper.xml
  41. 10 0
      message-server/target/classes/mybatis/mybatis-config.xml
  42. BIN
      message-server/target/classes/org/hibernate/dialect/Informix8sDialect$1.class
  43. BIN
      message-server/target/classes/org/hibernate/dialect/Informix8sDialect$2.class
  44. BIN
      message-server/target/classes/org/hibernate/dialect/Informix8sDialect.class
  45. BIN
      message-server/target/test-classes/org/jdjcjh/server/AppTest.class
  46. 24 0
      pom.xml

+ 0 - 0
README.md


+ 155 - 0
message-client/message-client.iml

@@ -0,0 +1,155 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
+  <component name="FacetManager">
4
+    <facet type="Spring" name="Spring">
5
+      <configuration />
6
+    </facet>
7
+  </component>
8
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
9
+    <output url="file://$MODULE_DIR$/target/classes" />
10
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
11
+    <content url="file://$MODULE_DIR$">
12
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
13
+      <excludeFolder url="file://$MODULE_DIR$/target" />
14
+    </content>
15
+    <orderEntry type="inheritedJdk" />
16
+    <orderEntry type="sourceFolder" forTests="false" />
17
+    <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.2.2" level="project" />
18
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.7.RELEASE" level="project" />
19
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.7.RELEASE" level="project" />
20
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.7.RELEASE" level="project" />
21
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.7.RELEASE" level="project" />
22
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
23
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
24
+    <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.2.2" level="project" />
25
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.0.0.RELEASE" level="project" />
26
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.0.RELEASE" level="project" />
27
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.3.RELEASE" level="project" />
28
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.3.RELEASE" level="project" />
29
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.7.RELEASE" level="project" />
30
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.7.RELEASE" level="project" />
31
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.3.RELEASE" level="project" />
32
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
33
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
34
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
35
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.10.0" level="project" />
36
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
37
+    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
38
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
39
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.0.RELEASE" level="project" />
40
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
41
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
42
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
43
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.0.0.RELEASE" level="project" />
44
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.3.RELEASE" level="project" />
45
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.0.0.RELEASE" level="project" />
46
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.0.3.RELEASE" level="project" />
47
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.7.RELEASE" level="project" />
48
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.10" level="project" />
49
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.0.RELEASE" level="project" />
50
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.0.6.RELEASE" level="project" />
51
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:9.5.1" level="project" />
52
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:9.5.1" level="project" />
53
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
54
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:9.5.1" level="project" />
55
+    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
56
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
57
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
58
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
59
+    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.12" level="project" />
60
+    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
61
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-java8:9.5.1" level="project" />
62
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.0.0.RELEASE" level="project" />
63
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.2.5" level="project" />
64
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.2.5" level="project" />
65
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
66
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
67
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
68
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
69
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-codec-http:4.1.25.Final" level="project" />
70
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-codec:4.1.25.Final" level="project" />
71
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:4.1.25.Final" level="project" />
72
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-common:4.1.25.Final" level="project" />
73
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-buffer:4.1.25.Final" level="project" />
74
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-unix-common:4.1.25.Final" level="project" />
75
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport:4.1.25.Final" level="project" />
76
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-resolver:4.1.25.Final" level="project" />
77
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.2.5" level="project" />
78
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.2.5" level="project" />
79
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
80
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpclient:4.5.5" level="project" />
81
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpcore:4.4.9" level="project" />
82
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
83
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
84
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
85
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
86
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
87
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
88
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
89
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.2.5" level="project" />
90
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
91
+    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
92
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.0.0.RELEASE" level="project" />
93
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.0.0.RELEASE" level="project" />
94
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
95
+    <orderEntry type="module" module-name="message-common" />
96
+    <orderEntry type="library" name="Maven: com.unis.springcloud:common:1.0.0" level="project" />
97
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.1.0.Final" level="project" />
98
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
99
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
100
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
101
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
102
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
103
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
104
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.31" level="project" />
105
+    <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:8.5.31" level="project" />
106
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
107
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
108
+    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
109
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
110
+    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
111
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.7.11" level="project" />
112
+    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
113
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
114
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
115
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
116
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
117
+    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
118
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
119
+    <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
120
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.0.1" level="project" />
121
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:4.0.1" level="project" />
122
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.2" level="project" />
123
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
124
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.0.1" level="project" />
125
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.0.2" level="project" />
126
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.18" level="project" />
127
+    <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.05" level="project" />
128
+    <orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.0" level="project" />
129
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.5.0" level="project" />
130
+    <orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.8" level="project" />
131
+    <orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.1" level="project" />
132
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:2.1.0" level="project" />
133
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3" level="project" />
134
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.0.3.RELEASE" level="project" />
135
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.7.9" level="project" />
136
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.0.7.RELEASE" level="project" />
137
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.7.RELEASE" level="project" />
138
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:3.0.3" level="project" />
139
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.14" level="project" />
140
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:3.0.3" level="project" />
141
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:2.1.0" level="project" />
142
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:6.1.0" level="project" />
143
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.7" level="project" />
144
+    <orderEntry type="library" name="Maven: net.sourceforge.jexcelapi:jxl:2.6.12" level="project" />
145
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
146
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.22" level="project" />
147
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.36" level="project" />
148
+    <orderEntry type="library" name="Maven: com.google.guava:guava:26.0-jre" level="project" />
149
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
150
+    <orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.5.2" level="project" />
151
+    <orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.1.3" level="project" />
152
+    <orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
153
+    <orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
154
+  </component>
155
+</module>

+ 41 - 0
message-client/pom.xml

@@ -0,0 +1,41 @@
1
+<?xml version="1.0"?>
2
+<project
3
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4
+	xmlns="http://maven.apache.org/POM/4.0.0"
5
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
6
+	<modelVersion>4.0.0</modelVersion>
7
+	<parent>
8
+		<groupId>com.unis.message</groupId>
9
+		<artifactId>message-service</artifactId>
10
+		<version>0.0.1-SNAPSHOT</version>
11
+	</parent>
12
+
13
+	<artifactId>message-client</artifactId>
14
+
15
+	<name>message-client</name>
16
+	<!--<version>1.0-SNAPSHOT</version>-->
17
+	<dependencies>
18
+		<dependency>
19
+            <groupId>io.github.openfeign.form</groupId>
20
+            <artifactId>feign-form-spring</artifactId>
21
+        </dependency>
22
+        <dependency>
23
+            <groupId>io.github.openfeign.form</groupId>
24
+            <artifactId>feign-form</artifactId>
25
+        </dependency>
26
+        <dependency>
27
+            <groupId>org.springframework.cloud</groupId>
28
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
29
+        </dependency>
30
+	
31
+		<dependency>
32
+            <artifactId>message-common</artifactId>
33
+            <groupId>com.unis.message</groupId>
34
+            <version>0.0.1-SNAPSHOT</version>
35
+        </dependency>
36
+	</dependencies>
37
+	
38
+	<build>
39
+		<finalName>${project.name}</finalName>
40
+	</build>
41
+</project>

+ 37 - 0
message-client/src/main/java/com/unis/message/client/EvasionFeign.java

@@ -0,0 +1,37 @@
1
+package com.unis.message.client;
2
+
3
+import org.springframework.cloud.openfeign.FeignClient;
4
+import org.springframework.stereotype.Component;
5
+import org.springframework.web.bind.annotation.PathVariable;
6
+import org.springframework.web.bind.annotation.PostMapping;
7
+import org.springframework.web.bind.annotation.RequestBody;
8
+
9
+import com.unis.common.utils.ResponseWrapper;
10
+import com.unis.message.common.vo.MessageVO;
11
+
12
+import io.swagger.annotations.Api;
13
+import io.swagger.annotations.ApiOperation;
14
+
15
+/** 
16
+ * @ClassName: EvasionFeign 
17
+ * @Description: 人员单位规避 Feign
18
+ * @author LiuFeng 
19
+ * @date 2019年8月24日 下午4:49:00  
20
+ */
21
+
22
+@FeignClient(name = "message")
23
+@Component
24
+@Api(value = "消息服务", tags = "消息服务")
25
+public interface EvasionFeign {
26
+
27
+	@ApiOperation(value = "发送短信", notes = "参数:短信实体信息,验证码类型短信,正文可为null")
28
+    @PostMapping(value = "/mess/sendMessage")
29
+    public ResponseWrapper send(@RequestBody MessageVO messageVO);
30
+	
31
+	
32
+	@ApiOperation(value = "验证验证码", notes = "参数:手机号及验证码,验证码有效期15分钟")
33
+    @PostMapping(value = "/mess/verify/{mobile}/{code}")
34
+    public ResponseWrapper verify(@PathVariable String mobile,@PathVariable String code);
35
+	
36
+
37
+}

BIN
message-client/target/classes/com/unis/message/client/EvasionFeign.class


+ 102 - 0
message-common/message-common.iml

@@ -0,0 +1,102 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
+  <component name="FacetManager">
4
+    <facet type="Spring" name="Spring">
5
+      <configuration />
6
+    </facet>
7
+  </component>
8
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
9
+    <output url="file://$MODULE_DIR$/target/classes" />
10
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
11
+    <content url="file://$MODULE_DIR$">
12
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
13
+      <excludeFolder url="file://$MODULE_DIR$/target" />
14
+    </content>
15
+    <orderEntry type="inheritedJdk" />
16
+    <orderEntry type="sourceFolder" forTests="false" />
17
+    <orderEntry type="library" name="Maven: com.unis.springcloud:common:1.0.0" level="project" />
18
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.1.0.Final" level="project" />
19
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
20
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
21
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
22
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
23
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
24
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
25
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
26
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
27
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
28
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.31" level="project" />
29
+    <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:8.5.31" level="project" />
30
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
31
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
32
+    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
33
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
34
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
35
+    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
36
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.7.11" level="project" />
37
+    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
38
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
39
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
40
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
41
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
42
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.7.RELEASE" level="project" />
43
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.7.RELEASE" level="project" />
44
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.7.RELEASE" level="project" />
45
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
46
+    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
47
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
48
+    <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
49
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.7.RELEASE" level="project" />
50
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.7.RELEASE" level="project" />
51
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.7.RELEASE" level="project" />
52
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.7.RELEASE" level="project" />
53
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.0.1" level="project" />
54
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:4.0.1" level="project" />
55
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
56
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.2" level="project" />
57
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
58
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.0.1" level="project" />
59
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.0.2" level="project" />
60
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.18" level="project" />
61
+    <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.05" level="project" />
62
+    <orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.0" level="project" />
63
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
64
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
65
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.5.0" level="project" />
66
+    <orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.8" level="project" />
67
+    <orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.1" level="project" />
68
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:2.1.0" level="project" />
69
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.3.RELEASE" level="project" />
70
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.3.RELEASE" level="project" />
71
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.3.RELEASE" level="project" />
72
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.3.RELEASE" level="project" />
73
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
74
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
75
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
76
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.10.0" level="project" />
77
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
78
+    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
79
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
80
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3" level="project" />
81
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.0.3.RELEASE" level="project" />
82
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.7.9" level="project" />
83
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.0.7.RELEASE" level="project" />
84
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.7.RELEASE" level="project" />
85
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:3.0.3" level="project" />
86
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.14" level="project" />
87
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:3.0.3" level="project" />
88
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:2.1.0" level="project" />
89
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:6.1.0" level="project" />
90
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.7" level="project" />
91
+    <orderEntry type="library" name="Maven: net.sourceforge.jexcelapi:jxl:2.6.12" level="project" />
92
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
93
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.22" level="project" />
94
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.36" level="project" />
95
+    <orderEntry type="library" name="Maven: com.google.guava:guava:26.0-jre" level="project" />
96
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
97
+    <orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.5.2" level="project" />
98
+    <orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.1.3" level="project" />
99
+    <orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
100
+    <orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
101
+  </component>
102
+</module>

+ 44 - 0
message-common/pom.xml

@@ -0,0 +1,44 @@
1
+<?xml version="1.0"?>
2
+<project
3
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4
+	xmlns="http://maven.apache.org/POM/4.0.0"
5
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
6
+	<modelVersion>4.0.0</modelVersion>
7
+	<parent>
8
+		<groupId>com.unis.message</groupId>
9
+		<artifactId>message-service</artifactId>
10
+		<version>0.0.1-SNAPSHOT</version>
11
+	</parent>
12
+
13
+	<artifactId>message-common</artifactId>
14
+
15
+	<name>message-common</name>
16
+
17
+	<dependencies>
18
+        
19
+        <dependency>
20
+            <groupId>com.unis.springcloud</groupId>
21
+            <artifactId>common</artifactId>
22
+            <version>1.0.0</version>
23
+        </dependency>
24
+        
25
+        <dependency>
26
+            <groupId>org.projectlombok</groupId>
27
+            <artifactId>lombok</artifactId>
28
+            <!--<optional>true</optional>-->
29
+        </dependency>
30
+        <dependency>
31
+            <groupId>com.alibaba</groupId>
32
+            <artifactId>fastjson</artifactId>
33
+        </dependency>
34
+        <dependency>
35
+            <groupId>com.google.guava</groupId>
36
+            <artifactId>guava</artifactId>
37
+            <version>26.0-jre</version>
38
+        </dependency>
39
+	</dependencies>
40
+	
41
+	<build>
42
+		<finalName>${project.name}</finalName>
43
+	</build>
44
+</project>

+ 12 - 0
message-common/src/main/java/com/unis/message/common/constant/Constant.java

@@ -0,0 +1,12 @@
1
+package com.unis.message.common.constant;
2
+
3
+public class Constant {
4
+
5
+	public final static String MESSURL = "http://api.sms.caih.com/sms-partner/access/d06yp4/sendsms";
6
+	
7
+	public final static String SUBACCOUNT = "d06yp4";
8
+	
9
+	public final static String SUBPASSWORD = "25d55ad283aa400af464c76d713c07ad";
10
+	
11
+	//http://域名/sms-partner/access/{用户账号}/sendsms
12
+}

+ 27 - 0
message-common/src/main/java/com/unis/message/common/vo/MessageCodeVO.java

@@ -0,0 +1,27 @@
1
+package com.unis.message.common.vo;
2
+
3
+import java.util.Date;
4
+
5
+import io.swagger.annotations.ApiModel;
6
+import io.swagger.annotations.ApiModelProperty;
7
+import lombok.Getter;
8
+import lombok.Setter;
9
+
10
+@Getter
11
+@Setter
12
+@ApiModel("短信验证码实体")
13
+public class MessageCodeVO {
14
+
15
+	@ApiModelProperty("id")
16
+	private String id; 
17
+	
18
+	@ApiModelProperty("手机号,多个逗号分开")
19
+	private String mobile;
20
+	
21
+	@ApiModelProperty("验证码")
22
+	private String code;
23
+
24
+	@ApiModelProperty("创建日期")
25
+	private Date createdate;
26
+	
27
+}

+ 35 - 0
message-common/src/main/java/com/unis/message/common/vo/MessageVO.java

@@ -0,0 +1,35 @@
1
+package com.unis.message.common.vo;
2
+
3
+import java.util.Date;
4
+
5
+import io.swagger.annotations.ApiModel;
6
+import io.swagger.annotations.ApiModelProperty;
7
+import lombok.Getter;
8
+import lombok.Setter;
9
+
10
+@Getter
11
+@Setter
12
+@ApiModel("短信实体")
13
+public class MessageVO {
14
+
15
+	@ApiModelProperty("客户id")
16
+	private String clientid; 
17
+	
18
+	@ApiModelProperty("客户密码")
19
+	private String password;
20
+	
21
+	@ApiModelProperty("手机号,多个逗号分开")
22
+	private String mobile;
23
+	
24
+	@ApiModelProperty("0\":通知短信,\"4\":验证码短信")
25
+	private String smstype;
26
+	
27
+	@ApiModelProperty("正文")
28
+	private String content;
29
+	
30
+	@ApiModelProperty("短信三方id")
31
+	private String sid;
32
+	@ApiModelProperty("创建日期")
33
+	private Date createdate;
34
+	
35
+}

BIN
message-common/target/classes/com/unis/message/common/constant/Constant.class


BIN
message-common/target/classes/com/unis/message/common/vo/MessageCodeVO.class


BIN
message-common/target/classes/com/unis/message/common/vo/MessageVO.class


+ 238 - 0
message-server/message-server.iml

@@ -0,0 +1,238 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
+  <component name="FacetManager">
4
+    <facet type="Spring" name="Spring">
5
+      <configuration />
6
+    </facet>
7
+    <facet type="web" name="Web">
8
+      <configuration>
9
+        <webroots />
10
+        <sourceRoots>
11
+          <root url="file://$MODULE_DIR$/src/main/java" />
12
+          <root url="file://$MODULE_DIR$/src/main/resources" />
13
+        </sourceRoots>
14
+      </configuration>
15
+    </facet>
16
+  </component>
17
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
18
+    <output url="file://$MODULE_DIR$/target/classes" />
19
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
20
+    <content url="file://$MODULE_DIR$">
21
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
22
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
23
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
24
+      <excludeFolder url="file://$MODULE_DIR$/target" />
25
+    </content>
26
+    <orderEntry type="inheritedJdk" />
27
+    <orderEntry type="sourceFolder" forTests="false" />
28
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.0.3.RELEASE" level="project" />
29
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.3.RELEASE" level="project" />
30
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.3.RELEASE" level="project" />
31
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
32
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
33
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
34
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.10.0" level="project" />
35
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
36
+    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
37
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
38
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.0.3.RELEASE" level="project" />
39
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.7.RELEASE" level="project" />
40
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.10" level="project" />
41
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.0.3.RELEASE" level="project" />
42
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.7.9" level="project" />
43
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.0.7.RELEASE" level="project" />
44
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.2.17.Final" level="project" />
45
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
46
+    <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final" level="project" />
47
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.22.0-GA" level="project" />
48
+    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
49
+    <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.3.Final" level="project" />
50
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
51
+    <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
52
+    <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
53
+    <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.2" level="project" />
54
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.0.8.RELEASE" level="project" />
55
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.0.8.RELEASE" level="project" />
56
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.0.7.RELEASE" level="project" />
57
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.7.RELEASE" level="project" />
58
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.7.RELEASE" level="project" />
59
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.7.RELEASE" level="project" />
60
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
61
+    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.0.7.RELEASE" level="project" />
62
+    <orderEntry type="module" module-name="message-common" />
63
+    <orderEntry type="library" name="Maven: com.unis.springcloud:common:1.0.0" level="project" />
64
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.1.0.Final" level="project" />
65
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
66
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
67
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
68
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
69
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
70
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
71
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.31" level="project" />
72
+    <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:8.5.31" level="project" />
73
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
74
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
75
+    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
76
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
77
+    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
78
+    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
79
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
80
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
81
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
82
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
83
+    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
84
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
85
+    <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
86
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.0.1" level="project" />
87
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:4.0.1" level="project" />
88
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.2" level="project" />
89
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
90
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.0.1" level="project" />
91
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.0.2" level="project" />
92
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.18" level="project" />
93
+    <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.05" level="project" />
94
+    <orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.0" level="project" />
95
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.5.0" level="project" />
96
+    <orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.8" level="project" />
97
+    <orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.1" level="project" />
98
+    <orderEntry type="library" name="Maven: net.sourceforge.jexcelapi:jxl:2.6.12" level="project" />
99
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.0.3.RELEASE" level="project" />
100
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.0.3.RELEASE" level="project" />
101
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6" level="project" />
102
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6" level="project" />
103
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6" level="project" />
104
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.0.3.RELEASE" level="project" />
105
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.31" level="project" />
106
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.31" level="project" />
107
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.10.Final" level="project" />
108
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
109
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.7.RELEASE" level="project" />
110
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.0.7.RELEASE" level="project" />
111
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.7.RELEASE" level="project" />
112
+    <orderEntry type="library" name="Maven: com.gbase8s:ifxjdbc:1.0" level="project" />
113
+    <orderEntry type="library" name="Maven: com.gbase:druid:1.0.28" level="project" />
114
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.3.2" level="project" />
115
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.0" level="project" />
116
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:3.0.0" level="project" />
117
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.11" level="project" />
118
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:3.0.0" level="project" />
119
+    <orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-starter:4.2.3" level="project" />
120
+    <orderEntry type="library" name="Maven: tk.mybatis:mapper-core:4.2.3" level="project" />
121
+    <orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
122
+    <orderEntry type="library" name="Maven: tk.mybatis:mapper-base:4.2.3" level="project" />
123
+    <orderEntry type="library" name="Maven: tk.mybatis:mapper-weekend:4.2.3" level="project" />
124
+    <orderEntry type="library" name="Maven: tk.mybatis:mapper-spring:4.2.3" level="project" />
125
+    <orderEntry type="library" name="Maven: tk.mybatis:mapper-extra:4.2.3" level="project" />
126
+    <orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-autoconfigure:4.2.3" level="project" />
127
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-config-client:2.0.0.RELEASE" level="project" />
128
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.3.RELEASE" level="project" />
129
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.0.RELEASE" level="project" />
130
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.0.6.RELEASE" level="project" />
131
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.0.RELEASE" level="project" />
132
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
133
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
134
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
135
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.0.0.RELEASE" level="project" />
136
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.0.RELEASE" level="project" />
137
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
138
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
139
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
140
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-core:2.0.0.RELEASE" level="project" />
141
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:2.0.0.RELEASE" level="project" />
142
+    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-client:1.9.2" level="project" />
143
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.jettison:jettison:1.3.7" level="project" />
144
+    <orderEntry type="library" scope="RUNTIME" name="Maven: stax:stax-api:1.0.1" level="project" />
145
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" />
146
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" />
147
+    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" />
148
+    <orderEntry type="library" scope="RUNTIME" name="Maven: joda-time:joda-time:2.9.9" level="project" />
149
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" />
150
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
151
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
152
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-math:2.2" level="project" />
153
+    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
154
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
155
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
156
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
157
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
158
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
159
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpclient:4.5.5" level="project" />
160
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpcore:4.4.9" level="project" />
161
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
162
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.inject:guice:4.1.0" level="project" />
163
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
164
+    <orderEntry type="library" scope="RUNTIME" name="Maven: aopalliance:aopalliance:1.0" level="project" />
165
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.vlsi.compactmap:compactmap:1.2.1" level="project" />
166
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.andrewoma.dexx:dexx-collections:0.2" level="project" />
167
+    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-core:1.9.2" level="project" />
168
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.4.1" level="project" />
169
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
170
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" />
171
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.0.0.RELEASE" level="project" />
172
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.0.0.RELEASE" level="project" />
173
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.0.0.RELEASE" level="project" />
174
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
175
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.0.0.RELEASE" level="project" />
176
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.2.5" level="project" />
177
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.2.5" level="project" />
178
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
179
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
180
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.hystrix:hystrix-core:1.5.12" level="project" />
181
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
182
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
183
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-codec-http:4.1.25.Final" level="project" />
184
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-codec:4.1.25.Final" level="project" />
185
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:4.1.25.Final" level="project" />
186
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-common:4.1.25.Final" level="project" />
187
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-buffer:4.1.25.Final" level="project" />
188
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-unix-common:4.1.25.Final" level="project" />
189
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport:4.1.25.Final" level="project" />
190
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-resolver:4.1.25.Final" level="project" />
191
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.2.5" level="project" />
192
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.2.5" level="project" />
193
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
194
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.2.5" level="project" />
195
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
196
+    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
197
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-eureka:2.2.5" level="project" />
198
+    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.10" level="project" />
199
+    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
200
+    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
201
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.22" level="project" />
202
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.0.3.RELEASE" level="project" />
203
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.0.3.RELEASE" level="project" />
204
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.0.3.RELEASE" level="project" />
205
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
206
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
207
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
208
+    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
209
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
210
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.9.1" level="project" />
211
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.15.0" level="project" />
212
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.7.11" level="project" />
213
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.7.11" level="project" />
214
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
215
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
216
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
217
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
218
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
219
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.7.RELEASE" level="project" />
220
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.7.RELEASE" level="project" />
221
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.0.7.RELEASE" level="project" />
222
+    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.5.1" level="project" />
223
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.36" level="project" />
224
+    <orderEntry type="library" name="Maven: com.google.guava:guava:26.0-jre" level="project" />
225
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
226
+    <orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.5.2" level="project" />
227
+    <orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.1.3" level="project" />
228
+    <orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
229
+    <orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
230
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
231
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:2.1.0" level="project" />
232
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:2.1.0" level="project" />
233
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:6.1.0" level="project" />
234
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.7" level="project" />
235
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-devtools:2.0.3.RELEASE" level="project" />
236
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.3.RELEASE" level="project" />
237
+  </component>
238
+</module>

+ 127 - 0
message-server/pom.xml

@@ -0,0 +1,127 @@
1
+<?xml version="1.0"?>
2
+<project
3
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4
+	xmlns="http://maven.apache.org/POM/4.0.0"
5
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
6
+	<modelVersion>4.0.0</modelVersion>
7
+	<parent>
8
+		<groupId>com.unis.message</groupId>
9
+		<artifactId>message-service</artifactId>
10
+		<version>0.0.1-SNAPSHOT</version>
11
+	</parent>
12
+	
13
+	<artifactId>message-server</artifactId>
14
+	
15
+	<name>message-server</name>
16
+	
17
+	<dependencies>
18
+		<dependency>
19
+		   <groupId>org.springframework.boot</groupId>
20
+		   <artifactId>spring-boot-starter-data-jpa</artifactId>
21
+		 </dependency>
22
+		<dependency>
23
+            <artifactId>message-common</artifactId>
24
+            <groupId>com.unis.message</groupId>
25
+            <version>0.0.1-SNAPSHOT</version>
26
+        </dependency>
27
+        <dependency>
28
+		    <groupId>org.springframework.boot</groupId>
29
+		    <artifactId>spring-boot-starter-web</artifactId>
30
+		</dependency>
31
+		   <!-- 依赖gbase Jar包 -->
32
+        <dependency>
33
+			<groupId>com.gbase8s</groupId>
34
+			<artifactId>ifxjdbc</artifactId>
35
+			<version>1.0</version>
36
+		</dependency>
37
+		<dependency>
38
+			<groupId>com.gbase</groupId>
39
+			<artifactId>druid</artifactId>
40
+			<version>1.0.28</version>
41
+		</dependency>
42
+		<dependency>
43
+			<groupId>cn.hutool</groupId>
44
+			<artifactId>hutool-all</artifactId>
45
+			<version>5.3.2</version>
46
+		</dependency>
47
+		
48
+		   <!-- ojdbc7数据源 -->
49
+        <!-- <dependency>
50
+            <groupId>cn.easyproject</groupId>
51
+            <artifactId>ojdbc7</artifactId>
52
+        </dependency>
53
+          <dependency>
54
+            <groupId>com.alibaba</groupId>
55
+            <artifactId>druid-spring-boot-starter</artifactId>
56
+        </dependency> -->
57
+        
58
+        <dependency>
59
+            <groupId>org.mybatis.spring.boot</groupId>
60
+            <artifactId>mybatis-spring-boot-starter</artifactId>
61
+			<version>3.0.0</version>
62
+        </dependency>
63
+        <dependency>
64
+            <groupId>tk.mybatis</groupId>
65
+            <artifactId>mapper-spring-boot-starter</artifactId>
66
+        </dependency>
67
+        <dependency>
68
+            <groupId>org.springframework.cloud</groupId>
69
+            <artifactId>spring-cloud-config-client</artifactId>
70
+        </dependency>
71
+        <dependency>
72
+            <groupId>org.springframework.cloud</groupId>
73
+            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
74
+        </dependency>
75
+        <dependency>
76
+            <groupId>org.projectlombok</groupId>
77
+            <artifactId>lombok</artifactId>
78
+            <!--<optional>true</optional>-->
79
+        </dependency>
80
+        <dependency>
81
+            <groupId>org.springframework.boot</groupId>
82
+            <artifactId>spring-boot-starter-test</artifactId>
83
+            <scope>test</scope>
84
+        </dependency>
85
+        <dependency>
86
+            <groupId>org.springframework.boot</groupId>
87
+            <artifactId>spring-boot-starter-web</artifactId>
88
+        </dependency>
89
+        <dependency>
90
+            <groupId>com.alibaba</groupId>
91
+            <artifactId>fastjson</artifactId>
92
+        </dependency>
93
+        <dependency>
94
+            <groupId>com.google.guava</groupId>
95
+            <artifactId>guava</artifactId>
96
+            <version>26.0-jre</version>
97
+        </dependency>
98
+        <dependency>
99
+			<groupId>org.apache.commons</groupId>
100
+			<artifactId>commons-lang3</artifactId>
101
+		</dependency>
102
+		<dependency>
103
+			<groupId>com.github.pagehelper</groupId>
104
+			<artifactId>pagehelper-spring-boot-starter</artifactId>
105
+		</dependency>
106
+        
107
+        <dependency>
108
+            <groupId>org.springframework.boot</groupId>
109
+            <artifactId>spring-boot-devtools</artifactId>
110
+            <optional>true</optional>
111
+            <scope>true</scope>
112
+        </dependency>
113
+	</dependencies>
114
+	
115
+	<build>
116
+		<finalName>message</finalName>
117
+		<plugins>
118
+			<plugin>
119
+				<groupId>org.springframework.boot</groupId>
120
+				<artifactId>spring-boot-maven-plugin</artifactId>
121
+				<configuration>
122
+					<mainClass>com.unis.message.server.MessageApplication</mainClass>
123
+				</configuration>
124
+			</plugin>
125
+		</plugins>
126
+	</build>
127
+</project>

+ 263 - 0
message-server/src/main/java/com/github/pagehelper/page/PageAutoDialect.java

@@ -0,0 +1,263 @@
1
+package com.github.pagehelper.page;
2
+
3
+import java.sql.Connection;
4
+
5
+import java.sql.SQLException;
6
+import java.util.HashMap;
7
+import java.util.Map;
8
+import java.util.Properties;
9
+import java.util.concurrent.ConcurrentHashMap;
10
+import java.util.concurrent.locks.ReentrantLock;
11
+
12
+import javax.sql.DataSource;
13
+
14
+import org.apache.ibatis.mapping.MappedStatement;
15
+
16
+import com.github.pagehelper.Dialect;
17
+import com.github.pagehelper.PageException;
18
+import com.github.pagehelper.dialect.AbstractHelperDialect;
19
+import com.github.pagehelper.dialect.helper.Db2Dialect;
20
+import com.github.pagehelper.dialect.helper.HsqldbDialect;
21
+import com.github.pagehelper.dialect.helper.InformixDialect;
22
+import com.github.pagehelper.dialect.helper.MySqlDialect;
23
+import com.github.pagehelper.dialect.helper.OracleDialect;
24
+import com.github.pagehelper.dialect.helper.SqlServer2012Dialect;
25
+import com.github.pagehelper.dialect.helper.SqlServerDialect;
26
+import com.github.pagehelper.util.StringUtil;
27
+
28
+@SuppressWarnings("rawtypes")
29
+public class PageAutoDialect {
30
+
31
+	private static Map<String, Class<? extends Dialect>> dialectAliasMap = new HashMap<String, Class<? extends Dialect>>();
32
+
33
+	public static void registerDialectAlias(String alias, Class<? extends Dialect> dialectClass) {
34
+		dialectAliasMap.put(alias, dialectClass);
35
+	}
36
+
37
+	static {
38
+		// 注册别名
39
+		registerDialectAlias("hsqldb", HsqldbDialect.class);
40
+		registerDialectAlias("h2", HsqldbDialect.class);
41
+		registerDialectAlias("postgresql", HsqldbDialect.class);
42
+		registerDialectAlias("phoenix", HsqldbDialect.class);
43
+
44
+		registerDialectAlias("mysql", MySqlDialect.class);
45
+		registerDialectAlias("mariadb", MySqlDialect.class);
46
+		registerDialectAlias("sqlite", MySqlDialect.class);
47
+
48
+		registerDialectAlias("oracle", OracleDialect.class);
49
+		registerDialectAlias("db2", Db2Dialect.class);
50
+		registerDialectAlias("informix", InformixDialect.class);
51
+		// 解决 informix-sqli #129,仍然保留上面的
52
+		registerDialectAlias("informix-sqli", InformixDialect.class);
53
+		registerDialectAlias("gbasedbt-sqli", InformixDialect.class);
54
+
55
+		registerDialectAlias("sqlserver", SqlServerDialect.class);
56
+		registerDialectAlias("sqlserver2012", SqlServer2012Dialect.class);
57
+
58
+		registerDialectAlias("derby", SqlServer2012Dialect.class);
59
+		// 达梦数据库,https://github.com/mybatis-book/book/issues/43
60
+		registerDialectAlias("dm", OracleDialect.class);
61
+		// 阿里云PPAS数据库,https://github.com/pagehelper/Mybatis-PageHelper/issues/281
62
+		registerDialectAlias("edb", OracleDialect.class);
63
+	}
64
+
65
+	// 自动获取dialect,如果没有setProperties或setSqlUtilConfig,也可以正常进行
66
+	private boolean autoDialect = true;
67
+	// 多数据源时,获取jdbcurl后是否关闭数据源
68
+	private boolean closeConn = true;
69
+	// 属性配置
70
+	private Properties properties;
71
+	// 缓存
72
+	private Map<String, AbstractHelperDialect> urlDialectMap = new ConcurrentHashMap<String, AbstractHelperDialect>();
73
+	private ReentrantLock lock = new ReentrantLock();
74
+	private AbstractHelperDialect delegate;
75
+	private ThreadLocal<AbstractHelperDialect> dialectThreadLocal = new ThreadLocal<AbstractHelperDialect>();
76
+
77
+	// 多数据动态获取时,每次需要初始化
78
+	public void initDelegateDialect(MappedStatement ms) {
79
+		if (delegate == null) {
80
+			if (autoDialect) {
81
+				this.delegate = getDialect(ms);
82
+			} else {
83
+				dialectThreadLocal.set(getDialect(ms));
84
+			}
85
+		}
86
+	}
87
+
88
+	// 获取当前的代理对象
89
+	public AbstractHelperDialect getDelegate() {
90
+		if (delegate != null) {
91
+			return delegate;
92
+		}
93
+		return dialectThreadLocal.get();
94
+	}
95
+
96
+	// 移除代理对象
97
+	public void clearDelegate() {
98
+		dialectThreadLocal.remove();
99
+	}
100
+
101
+	private String fromJdbcUrl(String jdbcUrl) {
102
+		for (String dialect : dialectAliasMap.keySet()) {
103
+			if (jdbcUrl.indexOf(":" + dialect + ":") != -1) {
104
+				return dialect;
105
+			}
106
+		}
107
+		return null;
108
+	}
109
+
110
+	/**
111
+	 * 反射类
112
+	 *
113
+	 * @param className
114
+	 * @return
115
+	 * @throws Exception
116
+	 */
117
+	private Class resloveDialectClass(String className) throws Exception {
118
+		if (dialectAliasMap.containsKey(className.toLowerCase())) {
119
+			return dialectAliasMap.get(className.toLowerCase());
120
+		} else {
121
+			return Class.forName(className);
122
+		}
123
+	}
124
+
125
+	/**
126
+	 * 初始化 helper
127
+	 *
128
+	 * @param dialectClass
129
+	 * @param properties
130
+	 */
131
+	private AbstractHelperDialect initDialect(String dialectClass, Properties properties) {
132
+		AbstractHelperDialect dialect;
133
+		if (StringUtil.isEmpty(dialectClass)) {
134
+			throw new PageException("使用 PageHelper 分页插件时,必须设置 helper 属性");
135
+		}
136
+		try {
137
+			Class sqlDialectClass = resloveDialectClass(dialectClass);
138
+			if (AbstractHelperDialect.class.isAssignableFrom(sqlDialectClass)) {
139
+				dialect = (AbstractHelperDialect) sqlDialectClass.newInstance();
140
+			} else {
141
+				throw new PageException(
142
+						"使用 PageHelper 时,方言必须是实现 " + AbstractHelperDialect.class.getCanonicalName() + " 接口的实现类!");
143
+			}
144
+		} catch (Exception e) {
145
+			throw new PageException("初始化 helper [" + dialectClass + "]时出错:" + e.getMessage(), e);
146
+		}
147
+		dialect.setProperties(properties);
148
+		return dialect;
149
+	}
150
+
151
+	/**
152
+	 * 获取url
153
+	 *
154
+	 * @param dataSource
155
+	 * @return
156
+	 */
157
+	private String getUrl(DataSource dataSource) {
158
+		Connection conn = null;
159
+		try {
160
+			conn = dataSource.getConnection();
161
+			return conn.getMetaData().getURL();
162
+		} catch (SQLException e) {
163
+			throw new PageException(e);
164
+		} finally {
165
+			if (conn != null) {
166
+				try {
167
+					if (closeConn) {
168
+						conn.close();
169
+					}
170
+				} catch (SQLException e) {
171
+					// ignore
172
+				}
173
+			}
174
+		}
175
+	}
176
+
177
+	/**
178
+	 * 根据 jdbcUrl 获取数据库方言
179
+	 *
180
+	 * @param ms
181
+	 * @return
182
+	 */
183
+	private AbstractHelperDialect getDialect(MappedStatement ms) {
184
+		// 改为对dataSource做缓存
185
+		DataSource dataSource = ms.getConfiguration().getEnvironment().getDataSource();
186
+		String url = getUrl(dataSource);
187
+		if (urlDialectMap.containsKey(url)) {
188
+			return urlDialectMap.get(url);
189
+		}
190
+		try {
191
+			lock.lock();
192
+			if (urlDialectMap.containsKey(url)) {
193
+				return urlDialectMap.get(url);
194
+			}
195
+			if (StringUtil.isEmpty(url)) {
196
+				throw new PageException("无法自动获取jdbcUrl,请在分页插件中配置dialect参数!");
197
+			}
198
+			String dialectStr = fromJdbcUrl(url);
199
+			if (dialectStr == null) {
200
+				throw new PageException("无法自动获取数据库类型,请通过 helperDialect 参数指定!");
201
+			}
202
+			AbstractHelperDialect dialect = initDialect(dialectStr, properties);
203
+			urlDialectMap.put(url, dialect);
204
+			return dialect;
205
+		} finally {
206
+			lock.unlock();
207
+		}
208
+	}
209
+
210
+	public void setProperties(Properties properties) {
211
+		// 多数据源时,获取 jdbcurl 后是否关闭数据源
212
+		String closeConn = properties.getProperty("closeConn");
213
+		if (StringUtil.isNotEmpty(closeConn)) {
214
+			this.closeConn = Boolean.parseBoolean(closeConn);
215
+		}
216
+		// 使用 sqlserver2012 作为默认分页方式,这种情况在动态数据源时方便使用
217
+		String useSqlserver2012 = properties.getProperty("useSqlserver2012");
218
+		if (StringUtil.isNotEmpty(useSqlserver2012) && Boolean.parseBoolean(useSqlserver2012)) {
219
+			registerDialectAlias("sqlserver", SqlServer2012Dialect.class);
220
+			registerDialectAlias("sqlserver2008", SqlServerDialect.class);
221
+		}
222
+		String dialectAlias = properties.getProperty("dialectAlias");
223
+		if (StringUtil.isNotEmpty(dialectAlias)) {
224
+			String[] alias = dialectAlias.split(";");
225
+			for (int i = 0; i < alias.length; i++) {
226
+				String[] kv = alias[i].split("=");
227
+				if (kv.length != 2) {
228
+					throw new IllegalArgumentException(
229
+							"dialectAlias 参数配置错误," + "请按照 alias1=xx.dialectClass;alias2=dialectClass2 的形式进行配置!");
230
+				}
231
+				for (int j = 0; j < kv.length; j++) {
232
+					try {
233
+						@SuppressWarnings("unchecked")
234
+						Class<? extends Dialect> diallectClass = (Class<? extends Dialect>) Class.forName(kv[1]);
235
+						// 允许覆盖已有的实现
236
+						registerDialectAlias(kv[0], diallectClass);
237
+					} catch (ClassNotFoundException e) {
238
+						throw new IllegalArgumentException("请确保 dialectAlias 配置的 Dialect 实现类存在!", e);
239
+					}
240
+				}
241
+			}
242
+		}
243
+		// 指定的 Helper 数据库方言,和 不同
244
+		String dialect = properties.getProperty("helperDialect");
245
+		// 运行时获取数据源
246
+		String runtimeDialect = properties.getProperty("autoRuntimeDialect");
247
+		// 1.动态多数据源
248
+		if (StringUtil.isNotEmpty(runtimeDialect) && "TRUE".equalsIgnoreCase(runtimeDialect)) {
249
+			this.autoDialect = false;
250
+			this.properties = properties;
251
+		}
252
+		// 2.动态获取方言
253
+		else if (StringUtil.isEmpty(dialect)) {
254
+			autoDialect = true;
255
+			this.properties = properties;
256
+		}
257
+		// 3.指定方言
258
+		else {
259
+			autoDialect = false;
260
+			this.delegate = initDialect(dialect, properties);
261
+		}
262
+	}
263
+}

+ 22 - 0
message-server/src/main/java/com/unis/message/server/MessageApplication.java

@@ -0,0 +1,22 @@
1
+package com.unis.message.server;
2
+
3
+import org.springframework.boot.SpringApplication;
4
+import org.springframework.boot.autoconfigure.SpringBootApplication;
5
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
6
+import org.springframework.context.annotation.ComponentScan;
7
+import org.springframework.scheduling.annotation.EnableScheduling;
8
+
9
+@SpringBootApplication
10
+@EnableDiscoveryClient
11
+@ComponentScan("com.unis")
12
+//@MapperScan("com.unis.message.server.dao")
13
+@org.mybatis.spring.annotation.MapperScan("com.unis.message.server.dao")
14
+@EnableScheduling
15
+public class MessageApplication{
16
+    public static void main( String[] args )
17
+    {
18
+        SpringApplication.run(MessageApplication.class, args);
19
+        System.out.println("-----------------------------启动成功--------------------------");
20
+    }
21
+}
22
+

+ 22 - 0
message-server/src/main/java/com/unis/message/server/config/SwaggerConfig.java

@@ -0,0 +1,22 @@
1
+package com.unis.message.server.config;
2
+
3
+import com.unis.common.utils.SwaggerUtil;
4
+import org.springframework.beans.factory.annotation.Value;
5
+import org.springframework.context.annotation.Bean;
6
+import org.springframework.context.annotation.Configuration;
7
+import springfox.documentation.spring.web.plugins.Docket;
8
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
9
+
10
+@Configuration
11
+@EnableSwagger2
12
+public class SwaggerConfig {
13
+
14
+    @Value("${spring.application.name}")
15
+    private String applicationName;
16
+
17
+    @Bean
18
+    public Docket createRestApi() {
19
+        return SwaggerUtil.getDocket(applicationName);
20
+    }
21
+
22
+}

+ 56 - 0
message-server/src/main/java/com/unis/message/server/controller/MessController.java

@@ -0,0 +1,56 @@
1
+package com.unis.message.server.controller;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.web.bind.annotation.PathVariable;
5
+import org.springframework.web.bind.annotation.PostMapping;
6
+import org.springframework.web.bind.annotation.RequestBody;
7
+import org.springframework.web.bind.annotation.RequestMapping;
8
+import org.springframework.web.bind.annotation.RestController;
9
+
10
+import com.unis.common.utils.ResponseWrapper;
11
+import com.unis.message.common.vo.MessageVO;
12
+import com.unis.message.server.service.IMessServer;
13
+
14
+import io.swagger.annotations.Api;
15
+import io.swagger.annotations.ApiOperation;
16
+import lombok.extern.slf4j.Slf4j;
17
+
18
+@RestController
19
+@RequestMapping("/mess")
20
+@Slf4j
21
+@Api(value = "短信", tags = "短信")
22
+public class MessController {
23
+	
24
+	@Autowired
25
+	private IMessServer iMessServer;
26
+
27
+	@ApiOperation(value = "发送短信", notes = "参数:短信实体信息,验证码类型短信,正文可为null")
28
+    @PostMapping(value = "/sendMessage")
29
+    public ResponseWrapper send(@RequestBody MessageVO messageVO) {
30
+        try {
31
+        	String result =iMessServer.sendMess(messageVO);
32
+            return ResponseWrapper.success(result);
33
+        } catch (Exception e) {
34
+        	 //e.printStackTrace();
35
+            log.error("发送消息,发生异常:"+e.getMessage());
36
+            return ResponseWrapper.error("发送消息失败");
37
+        }
38
+    }
39
+	
40
+	
41
+	@ApiOperation(value = "验证验证码", notes = "参数:手机号及验证码,验证码有效期15分钟")
42
+    @PostMapping(value = "/verify/{mobile}/{code}")
43
+    public ResponseWrapper verify(@PathVariable String mobile,@PathVariable String code) {
44
+        try {
45
+        	boolean result =iMessServer.verify(mobile,code);
46
+        	if(result) {
47
+        		return ResponseWrapper.success(200, "验证成功", result);
48
+        	}
49
+            return ResponseWrapper.success(200, "验证码错误或已过期", result);
50
+        } catch (Exception e) {
51
+        	 //e.printStackTrace();
52
+            log.error("发送消息,发生异常:"+e.getMessage());
53
+            return ResponseWrapper.error("获取失败");
54
+        }
55
+    }
56
+}

+ 22 - 0
message-server/src/main/java/com/unis/message/server/dao/MessageDao.java

@@ -0,0 +1,22 @@
1
+package com.unis.message.server.dao;
2
+
3
+import java.util.List;
4
+
5
+import org.springframework.stereotype.Repository;
6
+import org.springframework.transaction.annotation.Transactional;
7
+
8
+import com.unis.message.common.vo.MessageCodeVO;
9
+import com.unis.message.common.vo.MessageVO;
10
+
11
+@Transactional(rollbackFor = Exception.class)
12
+@org.apache.ibatis.annotations.Mapper
13
+@Repository
14
+public interface MessageDao {
15
+
16
+	int addList(List<MessageVO> list);
17
+
18
+	int insertCode(MessageCodeVO messageCodeVO);
19
+
20
+	int selectMessCode(MessageCodeVO messageCodeVO);
21
+
22
+}

+ 11 - 0
message-server/src/main/java/com/unis/message/server/service/IMessServer.java

@@ -0,0 +1,11 @@
1
+package com.unis.message.server.service;
2
+
3
+import com.unis.message.common.vo.MessageVO;
4
+
5
+public interface IMessServer {
6
+
7
+	String sendMess(MessageVO messageVO);
8
+
9
+	boolean verify(String mobile, String code);
10
+
11
+}

+ 16 - 0
message-server/src/main/java/com/unis/message/server/service/MessageServer.java

@@ -0,0 +1,16 @@
1
+package com.unis.message.server.service;
2
+
3
+import java.util.List;
4
+
5
+import com.unis.message.common.vo.MessageCodeVO;
6
+import com.unis.message.common.vo.MessageVO;
7
+
8
+public interface MessageServer {
9
+
10
+	int insert(List<MessageVO> list);
11
+
12
+	int insertCode(MessageCodeVO messageCodeVO);
13
+
14
+	int selectMessCode(MessageCodeVO messageCodeVO);
15
+
16
+}

+ 76 - 0
message-server/src/main/java/com/unis/message/server/service/impl/IMessServerImpl.java

@@ -0,0 +1,76 @@
1
+package com.unis.message.server.service.impl;
2
+
3
+import java.util.ArrayList;
4
+import java.util.Date;
5
+import java.util.List;
6
+
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Service;
9
+
10
+import com.unis.common.utils.UUIDUtils;
11
+import com.unis.message.common.constant.Constant;
12
+import com.unis.message.common.vo.MessageCodeVO;
13
+import com.unis.message.common.vo.MessageVO;
14
+import com.unis.message.server.service.IMessServer;
15
+import com.unis.message.server.service.MessageServer;
16
+
17
+import cn.hutool.http.HttpUtil;
18
+import cn.hutool.json.JSONArray;
19
+import cn.hutool.json.JSONObject;
20
+import cn.hutool.json.JSONUtil;
21
+
22
+@Service
23
+public class IMessServerImpl implements IMessServer {
24
+	
25
+	@Autowired
26
+	private MessageServer messageServer;
27
+
28
+	@Override
29
+	public String sendMess(MessageVO messageVO) {
30
+		List<MessageVO>  list = new ArrayList<MessageVO>();
31
+		if(messageVO.getSmstype().equals("4")) {//发送验证码
32
+			MessageCodeVO messageCodeVO = new MessageCodeVO();
33
+			messageCodeVO.setId(UUIDUtils.uuid());
34
+			messageCodeVO.setMobile(messageVO.getMobile());
35
+			messageCodeVO.setCreatedate(new Date());
36
+			String code = String.valueOf(Math.round((Math.random()+1) * 1000));
37
+			messageCodeVO.setCode(code);
38
+			messageVO.setContent("您的短信验证码为:"+code+",(验证码15分钟内有效)");
39
+			messageServer.insertCode(messageCodeVO);
40
+		}
41
+		messageVO.setSmstype("0");
42
+		messageVO.setContent("【天津市粮食和物资储备局】"+messageVO.getContent());
43
+		messageVO.setClientid(Constant.SUBACCOUNT);
44
+		messageVO.setPassword(Constant.SUBPASSWORD);
45
+		String result = HttpUtil.post(Constant.MESSURL, JSONUtil.toJsonStr(messageVO));
46
+		JSONObject jsonObject = JSONUtil.parseObj(result);
47
+		JSONArray array = jsonObject.getJSONArray("data");
48
+		for(int i=0;i<array.size();i++) {
49
+			JSONObject object = array.getJSONObject(i);
50
+			MessageVO messageVO2 = new MessageVO();
51
+			messageVO2.setContent(messageVO.getContent());
52
+			messageVO2.setSmstype(messageVO.getSmstype());
53
+			messageVO2.setSid(object.getStr("sid"));
54
+			messageVO2.setMobile(object.getStr("mobile"));
55
+			messageVO2.setCreatedate(new Date());
56
+			list.add(messageVO2);
57
+        }
58
+		if(list.size()>0) {
59
+			messageServer.insert(list);
60
+		}
61
+		return "发送成功";
62
+	}
63
+
64
+	@Override
65
+	public boolean verify(String mobile, String code) {
66
+		MessageCodeVO messageCodeVO = new MessageCodeVO();
67
+		messageCodeVO.setMobile(mobile);
68
+		messageCodeVO.setCode(code);
69
+		int i = messageServer.selectMessCode(messageCodeVO);
70
+		if(i>0) {
71
+			return true;
72
+		}
73
+		return false;
74
+	}
75
+
76
+}

+ 37 - 0
message-server/src/main/java/com/unis/message/server/service/impl/MessageServerImpl.java

@@ -0,0 +1,37 @@
1
+package com.unis.message.server.service.impl;
2
+
3
+import java.util.List;
4
+
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.stereotype.Service;
7
+
8
+import com.unis.message.common.vo.MessageCodeVO;
9
+import com.unis.message.common.vo.MessageVO;
10
+import com.unis.message.server.dao.MessageDao;
11
+import com.unis.message.server.service.MessageServer;
12
+
13
+@Service
14
+public class MessageServerImpl implements MessageServer {
15
+	
16
+	@Autowired
17
+	private MessageDao messageDao;
18
+
19
+	@Override
20
+	public int insert(List<MessageVO> list) {
21
+		// TODO Auto-generated method stub
22
+		return messageDao.addList(list);
23
+	}
24
+
25
+	@Override
26
+	public int insertCode(MessageCodeVO messageCodeVO) {
27
+		// TODO Auto-generated method stub
28
+		return messageDao.insertCode(messageCodeVO);
29
+	}
30
+
31
+	@Override
32
+	public int selectMessCode(MessageCodeVO messageCodeVO) {
33
+		// TODO Auto-generated method stub
34
+		return messageDao.selectMessCode(messageCodeVO);
35
+	}
36
+
37
+}

+ 311 - 0
message-server/src/main/java/org/hibernate/dialect/Informix8sDialect.java

@@ -0,0 +1,311 @@
1
+package org.hibernate.dialect;
2
+
3
+/*
4
+ * Hibernate, Relational Persistence for Idiomatic Java
5
+ *
6
+ * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
7
+ * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
8
+ */
9
+
10
+
11
+import java.sql.SQLException;
12
+import java.sql.Types;
13
+import java.util.Locale;
14
+
15
+import org.hibernate.dialect.function.NoArgSQLFunction;
16
+import org.hibernate.dialect.function.NvlFunction;
17
+import org.hibernate.dialect.function.SQLFunctionTemplate;
18
+import org.hibernate.dialect.function.VarArgsSQLFunction;
19
+import org.hibernate.dialect.identity.IdentityColumnSupport;
20
+import org.hibernate.dialect.identity.InformixIdentityColumnSupport;
21
+import org.hibernate.dialect.pagination.FirstLimitHandler;
22
+import org.hibernate.dialect.pagination.LegacyFirstLimitHandler;
23
+import org.hibernate.dialect.pagination.LimitHandler;
24
+import org.hibernate.dialect.unique.InformixUniqueDelegate;
25
+import org.hibernate.dialect.unique.UniqueDelegate;
26
+import org.hibernate.exception.spi.TemplatedViolatedConstraintNameExtracter;
27
+import org.hibernate.exception.spi.ViolatedConstraintNameExtracter;
28
+import org.hibernate.hql.spi.id.IdTableSupportStandardImpl;
29
+import org.hibernate.hql.spi.id.MultiTableBulkIdStrategy;
30
+import org.hibernate.hql.spi.id.local.AfterUseAction;
31
+import org.hibernate.hql.spi.id.local.LocalTemporaryTableBulkIdStrategy;
32
+import org.hibernate.internal.util.JdbcExceptionHelper;
33
+import org.hibernate.internal.util.StringHelper;
34
+import org.hibernate.type.StandardBasicTypes;
35
+
36
+/**
37
+ * Informix dialect.<br>
38
+ * <br>
39
+ * Seems to work with Informix Dynamic Server Version 7.31.UD3,  Informix JDBC driver version 2.21JC3.
40
+ *
41
+ * @author Steve Molitor
42
+ */
43
+public class Informix8sDialect extends Dialect {
44
+
45
+	private final UniqueDelegate uniqueDelegate;
46
+
47
+	/**
48
+	 * Creates new <code>InformixDialect</code> instance. Sets up the JDBC /
49
+	 * Informix type mappings.
50
+	 */
51
+	public Informix8sDialect() {
52
+		super();
53
+
54
+		registerColumnType( Types.BIGINT, "int8" );
55
+		registerColumnType( Types.BINARY, "byte" );
56
+		// Informix doesn't have a bit type
57
+		registerColumnType( Types.BIT, "smallint" );
58
+		registerColumnType( Types.CHAR, "char($l)" );
59
+		registerColumnType( Types.DATE, "date" );
60
+		registerColumnType( Types.DECIMAL, "decimal" );
61
+		registerColumnType( Types.DOUBLE, "float" );
62
+		registerColumnType( Types.FLOAT, "smallfloat" );
63
+		registerColumnType( Types.INTEGER, "integer" );
64
+		// or BYTE
65
+		registerColumnType( Types.LONGVARBINARY, "blob" );
66
+		// or TEXT?
67
+		registerColumnType( Types.LONGVARCHAR, "clob" );
68
+		// or MONEY
69
+		registerColumnType( Types.NUMERIC, "decimal" );
70
+		registerColumnType( Types.REAL, "smallfloat" );
71
+		registerColumnType( Types.SMALLINT, "smallint" );
72
+		registerColumnType( Types.TIMESTAMP, "datetime year to fraction(5)" );
73
+		registerColumnType( Types.TIME, "datetime hour to second" );
74
+		registerColumnType( Types.TINYINT, "smallint" );
75
+		registerColumnType( Types.VARBINARY, "byte" );
76
+		registerColumnType( Types.VARCHAR, "varchar($l)" );
77
+		registerColumnType( Types.VARCHAR, 255, "varchar($l)" );
78
+		registerColumnType( Types.VARCHAR, 32739, "lvarchar($l)" );
79
+
80
+		registerFunction( "concat", new VarArgsSQLFunction( StandardBasicTypes.STRING, "(", "||", ")" ) );
81
+		registerFunction( "substring", new SQLFunctionTemplate(StandardBasicTypes.STRING, "substring(?1 FROM ?2 FOR ?3)"));
82
+		registerFunction( "substr", new SQLFunctionTemplate( StandardBasicTypes.STRING, "substr(?1, ?2, ?3)"));
83
+		registerFunction( "coalesce", new NvlFunction());
84
+		registerFunction( "nvl", new NvlFunction());
85
+		registerFunction( "current_timestamp", new NoArgSQLFunction( "current", StandardBasicTypes.TIMESTAMP, false ) );
86
+		registerFunction( "current_date", new NoArgSQLFunction( "today", StandardBasicTypes.DATE, false ) );
87
+
88
+		uniqueDelegate = new InformixUniqueDelegate( this );
89
+	}
90
+
91
+	@Override
92
+	public String getAddColumnString() {
93
+		return "add";
94
+	}
95
+
96
+	/**
97
+	 * Informix constraint name must be at the end.
98
+	 * <p/>
99
+	 * {@inheritDoc}
100
+	 */
101
+	@Override
102
+	public String getAddForeignKeyConstraintString(
103
+			String constraintName,
104
+			String[] foreignKey,
105
+			String referencedTable,
106
+			String[] primaryKey,
107
+			boolean referencesPrimaryKey) {
108
+		final StringBuilder result = new StringBuilder( 30 )
109
+				.append( " add constraint " )
110
+				.append( " foreign key (" )
111
+				.append( StringHelper.join( ", ", foreignKey ) )
112
+				.append( ") references " )
113
+				.append( referencedTable );
114
+
115
+		if ( !referencesPrimaryKey ) {
116
+			result.append( " (" )
117
+					.append( StringHelper.join( ", ", primaryKey ) )
118
+					.append( ')' );
119
+		}
120
+
121
+		result.append( " constraint " ).append( constraintName );
122
+
123
+		return result.toString();
124
+	}
125
+
126
+	public String getAddForeignKeyConstraintString(
127
+			String constraintName,
128
+			String foreignKeyDefinition) {
129
+		return new StringBuilder( 30 )
130
+				.append( " add constraint " )
131
+				.append( foreignKeyDefinition )
132
+				.append( " constraint " )
133
+				.append( constraintName )
134
+				.toString();
135
+	}
136
+
137
+	/**
138
+	 * Informix constraint name must be at the end.
139
+	 * <p/>
140
+	 * {@inheritDoc}
141
+	 */
142
+	@Override
143
+	public String getAddPrimaryKeyConstraintString(String constraintName) {
144
+		return " add constraint primary key constraint " + constraintName + " ";
145
+	}
146
+
147
+	@Override
148
+	public String getCreateSequenceString(String sequenceName) {
149
+		return "create sequence " + sequenceName;
150
+	}
151
+
152
+	@Override
153
+	public String getDropSequenceString(String sequenceName) {
154
+		return "drop sequence " + sequenceName + " restrict";
155
+	}
156
+
157
+	@Override
158
+	public String getSequenceNextValString(String sequenceName) {
159
+		return "select " + getSelectSequenceNextValString( sequenceName ) + " from systables where tabid=1";
160
+	}
161
+
162
+	@Override
163
+	public String getSelectSequenceNextValString(String sequenceName) {
164
+		return sequenceName + ".nextval";
165
+	}
166
+
167
+	@Override
168
+	public boolean supportsSequences() {
169
+		return true;
170
+	}
171
+
172
+	@Override
173
+	public boolean supportsPooledSequences() {
174
+		return true;
175
+	}
176
+
177
+	@Override
178
+	public String getQuerySequencesString() {
179
+		return "select tabname from systables where tabtype='Q'";
180
+	}
181
+
182
+	@Override
183
+	public LimitHandler getLimitHandler() {
184
+		if ( isLegacyLimitHandlerBehaviorEnabled() ) {
185
+			return LegacyFirstLimitHandler.INSTANCE;
186
+		}
187
+		return FirstLimitHandler.INSTANCE;
188
+	}
189
+
190
+	@Override
191
+	public boolean supportsLimit() {
192
+		return true;
193
+	}
194
+
195
+	@Override
196
+	public boolean useMaxForLimit() {
197
+		return true;
198
+	}
199
+
200
+	@Override
201
+	public boolean supportsLimitOffset() {
202
+		return false;
203
+	}
204
+
205
+	@Override
206
+	public String getLimitString(String querySelect, int offset, int limit) {
207
+		if ( offset > 0 ) {
208
+			throw new UnsupportedOperationException( "query result offset is not supported" );
209
+		}
210
+		return new StringBuilder( querySelect.length() + 8 )
211
+				.append( querySelect )
212
+				.insert( querySelect.toLowerCase(Locale.ROOT).indexOf( "select" ) + 6, " first " + limit )
213
+				.toString();
214
+	}
215
+
216
+	@Override
217
+	public boolean supportsVariableLimit() {
218
+		return false;
219
+	}
220
+
221
+	@Override
222
+	public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter() {
223
+		return EXTRACTER;
224
+	}
225
+
226
+	private static final ViolatedConstraintNameExtracter EXTRACTER = new TemplatedViolatedConstraintNameExtracter() {
227
+		@Override
228
+		protected String doExtractConstraintName(SQLException sqle) throws NumberFormatException {
229
+			String constraintName = null;
230
+			final int errorCode = JdbcExceptionHelper.extractErrorCode( sqle );
231
+
232
+			if ( errorCode == -268 ) {
233
+				constraintName = extractUsingTemplate( "Unique constraint (", ") violated.", sqle.getMessage() );
234
+			}
235
+			else if ( errorCode == -691 ) {
236
+				constraintName = extractUsingTemplate(
237
+						"Missing key in referenced table for referential constraint (",
238
+						").",
239
+						sqle.getMessage()
240
+				);
241
+			}
242
+			else if ( errorCode == -692 ) {
243
+				constraintName = extractUsingTemplate(
244
+						"Key value for constraint (",
245
+						") is still being referenced.",
246
+						sqle.getMessage()
247
+				);
248
+			}
249
+
250
+			if ( constraintName != null ) {
251
+				// strip table-owner because Informix always returns constraint names as "<table-owner>.<constraint-name>"
252
+				final int i = constraintName.indexOf( '.' );
253
+				if ( i != -1 ) {
254
+					constraintName = constraintName.substring( i + 1 );
255
+				}
256
+			}
257
+
258
+			return constraintName;
259
+		}
260
+
261
+	};
262
+
263
+	@Override
264
+	public boolean supportsCurrentTimestampSelection() {
265
+		return true;
266
+	}
267
+
268
+	@Override
269
+	public boolean isCurrentTimestampSelectStringCallable() {
270
+		return false;
271
+	}
272
+
273
+	@Override
274
+	public String getCurrentTimestampSelectString() {
275
+		return "select distinct current timestamp from systables";
276
+	}
277
+
278
+	@Override
279
+	public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy() {
280
+		return new LocalTemporaryTableBulkIdStrategy(
281
+				new IdTableSupportStandardImpl() {
282
+					@Override
283
+					public String getCreateIdTableCommand() {
284
+						return "create temp table";
285
+					}
286
+
287
+					@Override
288
+					public String getCreateIdTableStatementOptions() {
289
+						return "with no log";
290
+					}
291
+				},
292
+				AfterUseAction.CLEAN,
293
+				null
294
+		);
295
+	}
296
+
297
+	@Override
298
+	public UniqueDelegate getUniqueDelegate() {
299
+		return uniqueDelegate;
300
+	}
301
+
302
+	@Override
303
+	public IdentityColumnSupport getIdentityColumnSupport() {
304
+		return new InformixIdentityColumnSupport();
305
+	}
306
+
307
+	@Override
308
+	public String toBooleanValueString(boolean bool) {
309
+		return bool ? "'t'" : "'f'";
310
+	}
311
+}

+ 39 - 0
message-server/src/main/resources/bootstrap.yml

@@ -0,0 +1,39 @@
1
+server:
2
+  port: 13900
3
+spring:
4
+  application:
5
+    name: message
6
+  #配置中心配置
7
+  cloud:
8
+    config:
9
+      #使用discovery 时需要将eureka 写到该文件中,开发环境使用该方式,推荐使用。
10
+      discovery:
11
+        enabled: true
12
+        service-id: config
13
+      name: gbase8s-message,initdata,feign,redis,mq-msg
14
+      profile: dev
15
+      username: configuser
16
+      password: configpasd
17
+      retry:
18
+        max-attempts: 5
19
+        max-interval: 2000
20
+      #如果出现错误立刻停止服务。
21
+      #fail-fast: true
22
+#服务注册配置
23
+eureka:
24
+  client:
25
+    service-url:
26
+#      defaultZone: http://eureka-server:11000/eureka/
27
+       defaultZone: http://172.16.0.73:11000/eureka/
28
+  instance:
29
+    prefer-ip-address: true
30
+    status-page-url-path: /swagger-ui.html
31
+#日志配置
32
+logging:
33
+  level:
34
+    com.unis: debug
35
+    root: warn
36
+    org.springframework.web: debug
37
+    org.hibernate: error
38
+    com.unis.demo.controller: info
39
+  path: ./log/

+ 46 - 0
message-server/src/main/resources/mybatis/mapper/MessageMapper.xml

@@ -0,0 +1,46 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.unis.message.server.dao.MessageDao" >
4
+  <insert id="addList" parameterType="java.util.List" >
5
+    insert into sys_message (sid,mobile,smstype,createdate,content,fszt)
6
+    values 
7
+    <foreach collection ="list" item="reddemCode" index= "index" separator =",">
8
+      (
9
+        #{reddemCode.sid}, #{reddemCode.mobile},
10
+       #{reddemCode.smstype},
11
+        #{reddemCode.createdate},
12
+         #{reddemCode.content}, '0'
13
+      )
14
+    </foreach >
15
+  </insert>
16
+  
17
+  
18
+  <insert id="insertCode" parameterType="com.unis.message.common.vo.MessageCodeVO" >
19
+    insert into sys_code (id,mobile,code,createdate)
20
+    	values 
21
+    (#{id}, #{mobile},#{code},#{createdate})
22
+  </insert>
23
+  
24
+  
25
+  <select id="selectMessCode" resultType="java.lang.Integer" parameterType="com.unis.message.common.vo.MessageCodeVO" >
26
+  	select count(*) from sys_code
27
+  	where mobile = #{mobile}
28
+  	and code = #{code}
29
+  	and createdate> (current -15 units minute)
30
+  </select>
31
+
32
+<!--   <update id="updateByPrimaryKey" parameterType="com.unis.inspectiontask.server.entity.TFileDO" >
33
+    update T_FILE
34
+    set file_type = #{fileType,jdbcType=INTEGER}
35
+      sj_id = #{sj_id,jdbcType=VARCHAR},
36
+      status = #{status,jdbcType=INTEGER},
37
+      creator = #{creator,jdbcType=VARCHAR},
38
+      creator_code = #{creatorCode,jdbcType=VARCHAR},
39
+      create_date = #{createDate,jdbcType=TIMESTAMP},
40
+      refresher = #{refresher,jdbcType=VARCHAR},
41
+      refresher_code = #{refresherCode,jdbcType=VARCHAR},
42
+      refresh_date = #{refreshTime,jdbcType=TIMESTAMP},
43
+      remark = #{remark,jdbcType=VARCHAR}
44
+    where id = #{id,jdbcType=INTEGER}
45
+  </update> -->
46
+</mapper>

+ 10 - 0
message-server/src/main/resources/mybatis/mybatis-config.xml

@@ -0,0 +1,10 @@
1
+<configuration>
2
+    <typeAliases>
3
+        <typeAlias alias="Integer" type="java.lang.Integer" />
4
+        <typeAlias alias="Long" type="java.lang.Long" />
5
+        <typeAlias alias="HashMap" type="java.util.HashMap" />
6
+        <typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap" />
7
+        <typeAlias alias="ArrayList" type="java.util.ArrayList" />
8
+        <typeAlias alias="LinkedList" type="java.util.LinkedList" />
9
+    </typeAliases>
10
+</configuration>

+ 38 - 0
message-server/src/test/java/org/jdjcjh/server/AppTest.java

@@ -0,0 +1,38 @@
1
+package org.jdjcjh.server;
2
+
3
+import junit.framework.Test;
4
+import junit.framework.TestCase;
5
+import junit.framework.TestSuite;
6
+
7
+/**
8
+ * Unit test for simple App.
9
+ */
10
+public class AppTest 
11
+    extends TestCase
12
+{
13
+    /**
14
+     * Create the test case
15
+     *
16
+     * @param testName name of the test case
17
+     */
18
+    public AppTest( String testName )
19
+    {
20
+        super( testName );
21
+    }
22
+
23
+    /**
24
+     * @return the suite of tests being tested
25
+     */
26
+    public static Test suite()
27
+    {
28
+        return new TestSuite( AppTest.class );
29
+    }
30
+
31
+    /**
32
+     * Rigourous Test :-)
33
+     */
34
+    public void testApp()
35
+    {
36
+        assertTrue( true );
37
+    }
38
+}

+ 39 - 0
message-server/target/classes/bootstrap.yml

@@ -0,0 +1,39 @@
1
+server:
2
+  port: 13900
3
+spring:
4
+  application:
5
+    name: message
6
+  #配置中心配置
7
+  cloud:
8
+    config:
9
+      #使用discovery 时需要将eureka 写到该文件中,开发环境使用该方式,推荐使用。
10
+      discovery:
11
+        enabled: true
12
+        service-id: config
13
+      name: gbase8s-message,initdata,feign,redis,mq-msg
14
+      profile: dev
15
+      username: configuser
16
+      password: configpasd
17
+      retry:
18
+        max-attempts: 5
19
+        max-interval: 2000
20
+      #如果出现错误立刻停止服务。
21
+      #fail-fast: true
22
+#服务注册配置
23
+eureka:
24
+  client:
25
+    service-url:
26
+#      defaultZone: http://eureka-server:11000/eureka/
27
+       defaultZone: http://172.16.0.73:11000/eureka/
28
+  instance:
29
+    prefer-ip-address: true
30
+    status-page-url-path: /swagger-ui.html
31
+#日志配置
32
+logging:
33
+  level:
34
+    com.unis: debug
35
+    root: warn
36
+    org.springframework.web: debug
37
+    org.hibernate: error
38
+    com.unis.demo.controller: info
39
+  path: ./log/

BIN
message-server/target/classes/com/github/pagehelper/page/PageAutoDialect.class


BIN
message-server/target/classes/com/unis/message/server/MessageApplication.class


BIN
message-server/target/classes/com/unis/message/server/config/SwaggerConfig.class


BIN
message-server/target/classes/com/unis/message/server/controller/MessController.class


BIN
message-server/target/classes/com/unis/message/server/dao/MessageDao.class


BIN
message-server/target/classes/com/unis/message/server/service/IMessServer.class


BIN
message-server/target/classes/com/unis/message/server/service/MessageServer.class


BIN
message-server/target/classes/com/unis/message/server/service/impl/IMessServerImpl.class


BIN
message-server/target/classes/com/unis/message/server/service/impl/MessageServerImpl.class


+ 46 - 0
message-server/target/classes/mybatis/mapper/MessageMapper.xml

@@ -0,0 +1,46 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.unis.message.server.dao.MessageDao" >
4
+  <insert id="addList" parameterType="java.util.List" >
5
+    insert into sys_message (sid,mobile,smstype,createdate,content,fszt)
6
+    values 
7
+    <foreach collection ="list" item="reddemCode" index= "index" separator =",">
8
+      (
9
+        #{reddemCode.sid}, #{reddemCode.mobile},
10
+       #{reddemCode.smstype},
11
+        #{reddemCode.createdate},
12
+         #{reddemCode.content}, '0'
13
+      )
14
+    </foreach >
15
+  </insert>
16
+  
17
+  
18
+  <insert id="insertCode" parameterType="com.unis.message.common.vo.MessageCodeVO" >
19
+    insert into sys_code (id,mobile,code,createdate)
20
+    	values 
21
+    (#{id}, #{mobile},#{code},#{createdate})
22
+  </insert>
23
+  
24
+  
25
+  <select id="selectMessCode" resultType="java.lang.Integer" parameterType="com.unis.message.common.vo.MessageCodeVO" >
26
+  	select count(*) from sys_code
27
+  	where mobile = #{mobile}
28
+  	and code = #{code}
29
+  	and createdate> (current -15 units minute)
30
+  </select>
31
+
32
+<!--   <update id="updateByPrimaryKey" parameterType="com.unis.inspectiontask.server.entity.TFileDO" >
33
+    update T_FILE
34
+    set file_type = #{fileType,jdbcType=INTEGER}
35
+      sj_id = #{sj_id,jdbcType=VARCHAR},
36
+      status = #{status,jdbcType=INTEGER},
37
+      creator = #{creator,jdbcType=VARCHAR},
38
+      creator_code = #{creatorCode,jdbcType=VARCHAR},
39
+      create_date = #{createDate,jdbcType=TIMESTAMP},
40
+      refresher = #{refresher,jdbcType=VARCHAR},
41
+      refresher_code = #{refresherCode,jdbcType=VARCHAR},
42
+      refresh_date = #{refreshTime,jdbcType=TIMESTAMP},
43
+      remark = #{remark,jdbcType=VARCHAR}
44
+    where id = #{id,jdbcType=INTEGER}
45
+  </update> -->
46
+</mapper>

+ 10 - 0
message-server/target/classes/mybatis/mybatis-config.xml

@@ -0,0 +1,10 @@
1
+<configuration>
2
+    <typeAliases>
3
+        <typeAlias alias="Integer" type="java.lang.Integer" />
4
+        <typeAlias alias="Long" type="java.lang.Long" />
5
+        <typeAlias alias="HashMap" type="java.util.HashMap" />
6
+        <typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap" />
7
+        <typeAlias alias="ArrayList" type="java.util.ArrayList" />
8
+        <typeAlias alias="LinkedList" type="java.util.LinkedList" />
9
+    </typeAliases>
10
+</configuration>

BIN
message-server/target/classes/org/hibernate/dialect/Informix8sDialect$1.class


BIN
message-server/target/classes/org/hibernate/dialect/Informix8sDialect$2.class


BIN
message-server/target/classes/org/hibernate/dialect/Informix8sDialect.class


BIN
message-server/target/test-classes/org/jdjcjh/server/AppTest.class


+ 24 - 0
pom.xml

@@ -0,0 +1,24 @@
1
+<project xmlns="http://maven.apache.org/POM/4.0.0"
2
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4
+	<modelVersion>4.0.0</modelVersion>
5
+	
6
+	<parent>
7
+        <groupId>com.unis.springcloud</groupId>
8
+        <artifactId>parent</artifactId>
9
+        <version>1.0.0</version>
10
+    </parent>
11
+
12
+	<groupId>com.unis.message</groupId>
13
+	<artifactId>message-service</artifactId>
14
+	<version>0.0.1-SNAPSHOT</version>
15
+	<packaging>pom</packaging>
16
+
17
+	<name>message-service</name>
18
+	
19
+	<modules>
20
+		<module>message-server</module>
21
+		<module>message-common</module>
22
+		<module>message-client</module>
23
+	</modules>
24
+</project>