Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/smartschool-platform

# Conflicts:
#	applications/school/school-server/school-server.iml
#	applications/websocket/websocket-server/websocket-server.iml
Arison 6 years ago
parent
commit
59058b30e9
100 changed files with 4313 additions and 1753 deletions
  1. 1 1
      .gitignore
  2. 0 15
      applications/applications.iml
  3. 0 15
      applications/school/school-api/school-api.iml
  4. 55 0
      applications/school/school-dto/src/main/java/com/usoftchina/smartschool/school/dto/DocBaseDTO.java
  5. 0 1
      applications/school/school-server/pom.xml
  6. 0 215
      applications/school/school-server/school-server.iml
  7. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/SchoolApplication.java
  8. 27 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/ClassController.java
  9. 37 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/GradeController.java
  10. 2 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/SchoolController.java
  11. 52 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/StudentController.java
  12. 48 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/TeacherController.java
  13. 7 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/ClassService.java
  14. 7 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/GradeService.java
  15. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/SchoolService.java
  16. 16 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/StudentService.java
  17. 16 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/TeacherService.java
  18. 45 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/ClassServiceImpl.java
  19. 49 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/GradeServiceImpl.java
  20. 3 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/SchoolServiceImpl.java
  21. 122 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/StudentServiceImpl.java
  22. 77 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/TeacherServiceImpl.java
  23. 0 16
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/GradeController.java
  24. 2 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java
  25. 24 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysClazzMapper.java
  26. 21 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysGradeMapper.java
  27. 33 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysStudentMapper.java
  28. 26 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysTeacherMapper.java
  29. 39 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ClassForm.java
  30. 29 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/StudentForm.java
  31. 79 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysClazz.java
  32. 91 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysGrade.java
  33. 161 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysParents.java
  34. 21 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysSchool.java
  35. 159 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysStudent.java
  36. 171 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysTeacher.java
  37. 54 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TeacherDetail.java
  38. 32 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TeacherForm.java
  39. 127 0
      applications/school/school-server/src/main/resources/mapper/SysClazzMapper.xml
  40. 109 0
      applications/school/school-server/src/main/resources/mapper/SysGradeMapper.xml
  41. 341 0
      applications/school/school-server/src/main/resources/mapper/SysStudentMapper.xml
  42. 269 0
      applications/school/school-server/src/main/resources/mapper/SysTeacherMapper.xml
  43. 0 15
      applications/school/school.iml
  44. 0 15
      applications/websocket/websocket-api/websocket-api.iml
  45. 0 246
      applications/websocket/websocket-server/websocket-server.iml
  46. 0 12
      applications/websocket/websocket.iml
  47. 0 21
      applications/wechat/wechat-api/wechat-api.iml
  48. 0 213
      applications/wechat/wechat-server/wechat-server.iml
  49. 0 15
      applications/wechat/wechat.iml
  50. 35 0
      base-servers/account/account-api/pom.xml
  51. 21 0
      base-servers/account/account-api/src/main/java/com/usoftchina/smartschool/account/api/AccountApi.java
  52. 16 0
      base-servers/account/account-dto/pom.xml
  53. 58 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/smartschool/account/dto/AccountDTO.java
  54. 59 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/smartschool/account/dto/AccountRegDTO.java
  55. 72 0
      base-servers/account/account-server/pom.xml
  56. 6 0
      base-servers/account/account-server/src/main/docker/Dockerfile
  57. 22 0
      base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/AccountApplication.java
  58. 95 0
      base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/controller/AccountController.java
  59. 51 0
      base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/mapper/AccountMapper.java
  60. 15 0
      base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/mapper/AccountRoleMapper.java
  61. 54 0
      base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/po/Account.java
  62. 59 0
      base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/service/AccountService.java
  63. 67 0
      base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/service/impl/AccountServiceImpl.java
  64. 91 0
      base-servers/account/account-server/src/main/resources/application.yml
  65. 52 0
      base-servers/account/account-server/src/main/resources/mapper/AccountMapper.xml
  66. 17 0
      base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml
  67. 0 15
      base-servers/account/account.iml
  68. 6 0
      base-servers/account/pom.xml
  69. 17 0
      base-servers/auth/auth-api/pom.xml
  70. 60 0
      base-servers/auth/auth-dto/pom.xml
  71. 46 0
      base-servers/auth/auth-dto/src/main/java/com/usoftchina/smartschool/auth/dto/AuthDTO.java
  72. 45 0
      base-servers/auth/auth-dto/src/main/java/com/usoftchina/smartschool/auth/dto/TokenDTO.java
  73. 102 0
      base-servers/auth/auth-dto/src/main/java/com/usoftchina/smartschool/auth/jwt/JwtHelper.java
  74. 56 0
      base-servers/auth/auth-dto/src/main/java/com/usoftchina/smartschool/auth/jwt/JwtInfo.java
  75. 65 0
      base-servers/auth/auth-dto/src/main/java/com/usoftchina/smartschool/auth/jwt/JwtToken.java
  76. 77 0
      base-servers/auth/auth-server/pom.xml
  77. 6 0
      base-servers/auth/auth-server/src/main/docker/Dockerfile
  78. 19 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/AuthApplication.java
  79. 65 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/controller/AuthController.java
  80. 47 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/dto/AuthorizeLogDTO.java
  81. 37 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/mapper/AuthorizeLogMapper.java
  82. 117 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/po/AuthorizeLog.java
  83. 117 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/po/VirtualAuthorizeLog.java
  84. 68 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/service/AuthorizeCountService.java
  85. 36 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/service/AuthorizeLogService.java
  86. 48 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/service/impl/AuthorizeLogServiceImpl.java
  87. 88 0
      base-servers/auth/auth-server/src/main/resources/application.yml
  88. BIN
      base-servers/auth/auth-server/src/main/resources/auth/pri.key
  89. BIN
      base-servers/auth/auth-server/src/main/resources/auth/pub.key
  90. 22 0
      base-servers/auth/pom.xml
  91. 0 15
      base-servers/base-servers.iml
  92. 0 160
      base-servers/eureka-server/eureka-server.iml
  93. 0 116
      base-servers/file/file-api/file-api.iml
  94. 0 44
      base-servers/file/file-dto/file-dto.iml
  95. 0 228
      base-servers/file/file-server/file-server.iml
  96. 0 15
      base-servers/file/file.iml
  97. 0 194
      base-servers/gateway-server/gateway-server.iml
  98. 10 0
      base-servers/gateway-server/pom.xml
  99. 14 159
      base-servers/gateway-server/src/main/java/com/usoftchina/smartschool/gateway/config/AuthFilter.java
  100. 1 0
      base-servers/pom.xml

+ 1 - 1
.gitignore

@@ -37,4 +37,4 @@ nbdist/
 .nb-gradle/
 generatorConfig.xml
 
-*.log:
+*.log:

+ 0 - 15
applications/applications.iml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 0 - 15
applications/school/school-api/school-api.iml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 55 - 0
applications/school/school-dto/src/main/java/com/usoftchina/smartschool/school/dto/DocBaseDTO.java

@@ -0,0 +1,55 @@
+package com.usoftchina.smartschool.school.dto;
+
+import java.io.Serializable;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 19:53
+ **/
+public class DocBaseDTO implements Serializable{
+    private Long id;
+    private String code;
+    private String name;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String toString() {
+        return "DocBaseDTO{" +
+                "id=" + id +
+                ", code='" + code + '\'' +
+                ", name='" + name + '\'' +
+                '}';
+    }
+
+    public DocBaseDTO(Long id, String code, String name) {
+        this.id = id;
+        this.code = code;
+        this.name = name;
+    }
+
+    public DocBaseDTO() {
+    }
+}

+ 0 - 1
applications/school/school-server/pom.xml

@@ -72,7 +72,6 @@
         <dependency>
             <groupId>com.usoftchina.smartschool</groupId>
             <artifactId>school-dto</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 

+ 0 - 215
applications/school/school-server/school-server.iml

@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration />
-    </facet>
-    <facet type="web" name="Web">
-      <configuration>
-        <webroots />
-        <sourceRoots>
-          <root url="file://$MODULE_DIR$/src/main/java" />
-          <root url="file://$MODULE_DIR$/src/main/resources" />
-        </sourceRoots>
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="server-starter" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.10" level="project" />
-    <orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.11.Final" level="project" />
-    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.0.8.RELEASE" level="project" />
-    <orderEntry type="module" module-name="core" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
-    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
-    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
-    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
-    <orderEntry type="module" module-name="test-starter" scope="TEST" />
-    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:6.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.0" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.7.9" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.5" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-zipkin:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-sleuth:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave:5.1.0" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-context-log4j2:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-web:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-http:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-rabbit:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-kafka-clients:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpclient:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpasyncclient:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-webmvc:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-servlet:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-zipkin:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.zipkin2:zipkin:2.11.1" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-reporter:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-kafka11:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-amqp-client:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.1.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.2.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: net.logstash.logback:logstash-logback-encoder:4.11" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.22" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.7" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.7" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.6" level="project" />
-    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.0.7.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-java8:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-client:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.jettison:jettison:1.3.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: stax:stax-api:1.0.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: joda-time:joda-time:2.9.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-math:2.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.inject:guice:4.1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: aopalliance:aopalliance:1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.vlsi.compactmap:compactmap:1.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.andrewoma.dexx:dexx-collections:0.2" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-core:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.4.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
-    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-codec-http:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-unix-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-eureka:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.10" level="project" />
-    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
-    <orderEntry type="module" module-name="school-dto" />
-    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.44" level="project" />
-  </component>
-</module>

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/SchoolApplication.java

@@ -12,7 +12,7 @@ import org.springframework.context.annotation.ComponentScan;
  * @create: 2019-01-16 17:41
  **/
 @SpringBootApplication
-@MapperScan("com.usoftchina.smartschool.school")
+@MapperScan("com.usoftchina.smartschool.school.mapper")
 @EnableEurekaClient
 @EnableFeignClients("com.usoftchina.smartschool")
 @ComponentScan(basePackages = {"com.usoftchina.smartschool"})

+ 27 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/ClassController.java

@@ -0,0 +1,27 @@
+package com.usoftchina.smartschool.school.basic.controller;
+
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.school.basic.service.ClassService;
+import com.usoftchina.smartschool.school.po.ClassForm;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 17:39
+ **/
+@RestController
+@RequestMapping("/class")
+public class ClassController {
+
+    @Autowired
+    private ClassService classService;
+
+    @RequestMapping("/read/{id}")
+    public Result getClass(@PathVariable("id") Long id) {
+        ClassForm classForm = classService.getFormdata(id);
+        return Result.success(classForm);
+    }
+}

+ 37 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/GradeController.java

@@ -0,0 +1,37 @@
+package com.usoftchina.smartschool.school.basic.controller;
+
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.school.basic.service.GradeService;
+import com.usoftchina.smartschool.school.po.SysSchool;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 09:27
+ **/
+@RestController
+@RequestMapping("/grade")
+public class GradeController {
+
+    @Autowired
+    private GradeService gradeService;
+
+    /**
+    * @Description 获取学校树状数据
+    * @Param: [id]
+    * @return: com.usoftchina.smartschool.base.Result
+    * @Author: guq
+    * @Date: 2019/1/22
+    */
+    @RequestMapping("/read/{id}")
+    public Result getSchoolTree(@PathVariable("id") Long id) {
+        SysSchool school = gradeService.getSchoolTree(id);
+        return Result.success(school);
+    }
+
+
+
+}

+ 2 - 2
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/SchoolController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/SchoolController.java

@@ -1,8 +1,8 @@
-package com.usoftchina.smartschool.school.controller;
+package com.usoftchina.smartschool.school.basic.controller;
 
 import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.school.basic.service.SchoolService;
 import com.usoftchina.smartschool.school.po.SysSchool;
-import com.usoftchina.smartschool.school.service.SchoolService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;

+ 52 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/StudentController.java

@@ -0,0 +1,52 @@
+package com.usoftchina.smartschool.school.basic.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.mysql.cj.api.xdevapi.DocResult;
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.page.PageDefault;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.basic.service.StudentService;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.StudentForm;
+import com.usoftchina.smartschool.school.po.SysSchool;
+import com.usoftchina.smartschool.school.po.SysStudent;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 17:40
+ **/
+@RestController
+@RequestMapping("/student")
+public class StudentController {
+
+    @Autowired
+    private StudentService studentService;
+
+    @RequestMapping("/list")
+    public Result getList(@PageDefault PageRequest page, ListReqDTO listReqDTO) {
+        PageInfo<SysStudent> student = studentService.getListData(page, listReqDTO);
+        return Result.success(student);
+    }
+
+
+    @RequestMapping("/read/{id}")
+    public Result getFormData(@PathVariable("id") Long id) {
+         StudentForm formData = studentService.getFormData(id);
+        return Result.success(formData);
+    }
+
+    @RequestMapping("/save")
+    public Result getFormData(@RequestBody StudentForm form) {
+        DocBaseDTO formData = studentService.saveFormData(form);
+        return Result.success(formData);
+    }
+
+
+
+}

+ 48 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/TeacherController.java

@@ -0,0 +1,48 @@
+package com.usoftchina.smartschool.school.basic.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.page.PageDefault;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.basic.service.TeacherService;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.StudentForm;
+import com.usoftchina.smartschool.school.po.SysStudent;
+import com.usoftchina.smartschool.school.po.SysTeacher;
+import com.usoftchina.smartschool.school.po.TeacherForm;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 17:40
+ **/
+@RestController
+@RequestMapping("teacher")
+public class TeacherController {
+
+    @Autowired
+    private TeacherService teacherService;
+
+    @RequestMapping("/list")
+    public Result getList(@PageDefault PageRequest page, ListReqDTO listReqDTO) {
+        PageInfo<SysTeacher> teacher = teacherService.getListData(page, listReqDTO);
+        return Result.success(teacher);
+    }
+
+    @RequestMapping("/read/{id}")
+    public Result getFormData(@PathVariable("id") Long id) {
+        TeacherForm formData = teacherService.getFormData(id);
+        return Result.success(formData);
+    }
+
+    @RequestMapping("/save")
+    public Result getFormData(@RequestBody SysTeacher teacher) {
+        DocBaseDTO formData = teacherService.saveFormData(teacher);
+        return Result.success(formData);
+    }
+}

+ 7 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/ClassService.java

@@ -0,0 +1,7 @@
+package com.usoftchina.smartschool.school.basic.service;
+
+import com.usoftchina.smartschool.school.po.ClassForm;
+
+public interface ClassService {
+    ClassForm getFormdata(Long id);
+}

+ 7 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/GradeService.java

@@ -0,0 +1,7 @@
+package com.usoftchina.smartschool.school.basic.service;
+
+import com.usoftchina.smartschool.school.po.SysSchool;
+
+public interface GradeService {
+    SysSchool getSchoolTree(Long id);
+}

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/SchoolService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/SchoolService.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.school.service;
+package com.usoftchina.smartschool.school.basic.service;
 
 import com.usoftchina.smartschool.school.po.SysSchool;
 

+ 16 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/StudentService.java

@@ -0,0 +1,16 @@
+package com.usoftchina.smartschool.school.basic.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.StudentForm;
+import com.usoftchina.smartschool.school.po.SysStudent;
+
+public interface StudentService {
+    PageInfo<SysStudent> getListData(PageRequest page, ListReqDTO listReqDTO);
+
+    StudentForm getFormData(Long id);
+
+    DocBaseDTO saveFormData(StudentForm form);
+}

+ 16 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/TeacherService.java

@@ -0,0 +1,16 @@
+package com.usoftchina.smartschool.school.basic.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.SysTeacher;
+import com.usoftchina.smartschool.school.po.TeacherForm;
+
+public interface TeacherService {
+    PageInfo<SysTeacher> getListData(PageRequest page, ListReqDTO listReqDTO);
+
+    TeacherForm getFormData(Long id);
+
+    DocBaseDTO saveFormData(SysTeacher teacher);
+}

+ 45 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/ClassServiceImpl.java

@@ -0,0 +1,45 @@
+package com.usoftchina.smartschool.school.basic.service.impl;
+
+import com.usoftchina.smartschool.context.BaseContextHolder;
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.school.basic.service.ClassService;
+import com.usoftchina.smartschool.school.exception.BizExceptionCode;
+import com.usoftchina.smartschool.school.mapper.SysClazzMapper;
+import com.usoftchina.smartschool.school.mapper.SysStudentMapper;
+import com.usoftchina.smartschool.school.po.ClassForm;
+import com.usoftchina.smartschool.school.po.SysClazz;
+import com.usoftchina.smartschool.school.po.SysStudent;
+import com.usoftchina.smartschool.school.po.TeacherDetail;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-23 16:57
+ **/
+@Service
+public class ClassServiceImpl implements ClassService{
+
+    @Autowired
+    private SysClazzMapper sysClazzMapper;
+    @Autowired
+    private SysStudentMapper sysStudentMapper;
+
+    @Override
+    public ClassForm getFormdata(Long id) {
+        if (null == id || "0".equals(id)) {
+            throw new BizException(BizExceptionCode.USELESS_DATA);
+        }
+        Long school_id = BaseContextHolder.getSchoolId();
+        ClassForm cf = new ClassForm();
+        SysClazz clazz = sysClazzMapper.selectByPrimaryKey(id);
+        List<SysStudent> students = sysStudentMapper.selectByConditon("clazz_id=" + id, school_id);
+        List<TeacherDetail> teacherDetails = sysClazzMapper.selectTeacher(id);
+        cf.setMain(clazz);
+        cf.setItems1(students);
+        cf.setItems2(teacherDetails);
+        return cf;
+    }
+}

+ 49 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/GradeServiceImpl.java

@@ -0,0 +1,49 @@
+package com.usoftchina.smartschool.school.basic.service.impl;
+
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.school.basic.service.GradeService;
+import com.usoftchina.smartschool.school.exception.BizExceptionCode;
+import com.usoftchina.smartschool.school.mapper.SysClazzMapper;
+import com.usoftchina.smartschool.school.mapper.SysGradeMapper;
+import com.usoftchina.smartschool.school.mapper.SysSchoolMapper;
+import com.usoftchina.smartschool.school.po.SysClazz;
+import com.usoftchina.smartschool.school.po.SysGrade;
+import com.usoftchina.smartschool.school.po.SysSchool;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 16:13
+ **/
+@Service
+public class GradeServiceImpl implements GradeService{
+
+    @Autowired
+    private SysSchoolMapper sysSchoolMapper;
+
+    @Autowired
+    private SysGradeMapper sysGradeMapper;
+
+    @Autowired
+    private SysClazzMapper sysClazzMapper;
+
+    @Override
+    public SysSchool getSchoolTree(Long id) {
+        if (null == id || "0".equals(id)) {
+            throw new BizException(BizExceptionCode.USELESS_DATA);
+        }
+        SysSchool school = sysSchoolMapper.selectByPrimaryKey(id);
+        List<SysGrade> grades = sysGradeMapper.selectBySchool(id);
+        if (null != grades && grades.size() > 0) {
+            for (SysGrade grade : grades) {
+                List<SysClazz> classes = sysClazzMapper.selectBygrade(grade.getGrade_id());
+                grade.setChildren(classes);
+            }
+        }
+        school.setChildren(grades);
+        return school;
+    }
+}

+ 3 - 3
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/impl/SchoolServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/SchoolServiceImpl.java

@@ -1,10 +1,10 @@
-package com.usoftchina.smartschool.school.service.impl;
+package com.usoftchina.smartschool.school.basic.service.impl;
 
 import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.school.basic.service.SchoolService;
 import com.usoftchina.smartschool.school.exception.BizExceptionCode;
 import com.usoftchina.smartschool.school.mapper.SysSchoolMapper;
 import com.usoftchina.smartschool.school.po.SysSchool;
-import com.usoftchina.smartschool.school.service.SchoolService;
 import com.usoftchina.smartschool.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
  * @create: 2019-01-21 16:49
  **/
 @Service
-public class SchoolServiceImpl implements SchoolService{
+public class SchoolServiceImpl implements SchoolService {
 
     @Autowired
     private SysSchoolMapper sysSchoolMapper;

+ 122 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/StudentServiceImpl.java

@@ -0,0 +1,122 @@
+package com.usoftchina.smartschool.school.basic.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.context.BaseContextHolder;
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.basic.service.StudentService;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.exception.BizExceptionCode;
+import com.usoftchina.smartschool.school.mapper.SysStudentMapper;
+import com.usoftchina.smartschool.school.po.StudentForm;
+import com.usoftchina.smartschool.school.po.SysParents;
+import com.usoftchina.smartschool.school.po.SysStudent;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 17:57
+ **/
+@Service
+public class StudentServiceImpl implements StudentService{
+
+    @Autowired
+    private SysStudentMapper sysStudentMapper;
+
+    @Override
+    public PageInfo<SysStudent> getListData(PageRequest page, ListReqDTO listReqDTO) {
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        Long schoolId = BaseContextHolder.getSchoolId();
+        //condition语句
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        List<SysStudent> studentList = sysStudentMapper.selectByConditon(condition, schoolId);
+        PageInfo<SysStudent> list = new PageInfo<>(studentList);
+        return list;
+    }
+
+    @Override
+    public StudentForm getFormData(Long id) {
+        if (null == id || "0".equals(id)) {
+            throw new BizException(BizExceptionCode.USELESS_DATA);
+        }
+        SysStudent student = sysStudentMapper.selectByPrimaryKey(id);
+        List<SysParents> parents = sysStudentMapper.selectParent(id);
+        StudentForm studentForm = new StudentForm();
+        studentForm.setMain(student);
+        studentForm.setItems(parents);
+        return studentForm;
+    }
+
+    @Override
+    public DocBaseDTO saveFormData(StudentForm formdata) {
+        if (null == formdata || null == formdata.getMain()){
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
+        }
+        SysStudent student = formdata.getMain();
+        List<SysParents> items = formdata.getItems();
+        Long id = student.getStu_id();
+        Long schoolid = BaseContextHolder.getSchoolId();
+        //插入从表数据
+        List<SysParents> insertDetails = new ArrayList<>();
+        //更新从表数据
+        List<SysParents> updateDetails = new ArrayList<>();
+        //新增学生
+        if (StringUtils.isEmpty(id) || "0".equals(id.toString())) {
+            student.setSchool_id(schoolid);
+            sysStudentMapper.insertSelective(student);
+            id = student.getStu_id();
+            if (null != items && items.size() > 0) {
+                Long pr_id = null;
+                for (SysParents item : items) {
+                    item.setSchool_id(schoolid);
+                    sysStudentMapper.insertparent(item);
+                    pr_id = item.getParent_id();
+                    sysStudentMapper.insertrelation(id, pr_id);
+                }
+            }
+            return new DocBaseDTO(id, null, "student");
+        }
+        //更新学生
+        sysStudentMapper.updateByPrimaryKeySelective(student);
+
+        //添加从表传输对象
+        for (SysParents detail : items) {
+            detail.setSchool_id(schoolid);
+            if (StringUtils.isEmpty(detail.getParent_id()) || "0".equals(detail.getParent_id().toString())) {
+                insertDetails.add(detail);
+            } else {
+                updateDetails.add(detail);
+            }
+        }
+        //插入从表
+        if (insertDetails.size() > 0) {
+            Long pr_id = null;
+            for (SysParents item : items) {
+                item.setSchool_id(schoolid);
+                sysStudentMapper.insertparent(item);
+                pr_id = item.getParent_id();
+                sysStudentMapper.insertrelation(id, pr_id);
+            }
+        }
+        //更新从表
+        if (updateDetails.size() > 0) {
+            sysStudentMapper.updateParents(updateDetails);
+            for (SysParents item : items) {
+                sysStudentMapper.updateRelation(item.getParent_id(), id, item.getPr_relation());
+            }
+        }
+
+        return null;
+    }
+}

+ 77 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/TeacherServiceImpl.java

@@ -0,0 +1,77 @@
+package com.usoftchina.smartschool.school.basic.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.context.BaseContextHolder;
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.basic.service.TeacherService;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.exception.BizExceptionCode;
+import com.usoftchina.smartschool.school.mapper.SysTeacherMapper;
+import com.usoftchina.smartschool.school.po.SysTeacher;
+import com.usoftchina.smartschool.school.po.TeacherDetail;
+import com.usoftchina.smartschool.school.po.TeacherForm;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-23 14:05
+ **/
+@Service
+public class TeacherServiceImpl implements TeacherService{
+
+    @Autowired
+    private SysTeacherMapper sysTeacherMapper;
+
+    @Override
+    public PageInfo<SysTeacher> getListData(PageRequest page, ListReqDTO listReqDTO) {
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        Long schoolId = BaseContextHolder.getSchoolId();
+        //condition语句
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        List<SysTeacher> teacherList = sysTeacherMapper.selectByConditon(condition, schoolId);
+        PageInfo<SysTeacher> list = new PageInfo<>(teacherList);
+        return list;
+    }
+
+    @Override
+    public TeacherForm getFormData(Long id) {
+        if (null == id || "0".equals(id)) {
+            throw new BizException(BizExceptionCode.USELESS_DATA);
+        }
+        SysTeacher teacher = sysTeacherMapper.selectByPrimaryKey(id);
+        List<TeacherDetail> details = sysTeacherMapper.selectDetail(id);
+        TeacherForm teacherForm = new TeacherForm();
+        teacherForm.setMain(teacher);
+        teacherForm.setItems(details);
+        return teacherForm;
+    }
+
+    @Override
+    public DocBaseDTO saveFormData(SysTeacher formdata) {
+        if (null == formdata){
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
+        }
+        Long school_id = BaseContextHolder.getSchoolId();
+        formdata.setSchool_id(school_id);
+        //新增教师
+        if (StringUtils.isEmpty(formdata.getSchool_id()) || "0".equals(formdata.getSchool_id().toString())) {
+            sysTeacherMapper.insertSelective(formdata);
+
+        } else {
+            //更新教师
+            sysTeacherMapper.updateByPrimaryKeySelective(formdata);
+        }
+        return new DocBaseDTO(formdata.getTeacher_id(), null, null);
+    }
+
+}

+ 0 - 16
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/GradeController.java

@@ -1,16 +0,0 @@
-package com.usoftchina.smartschool.school.controller;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author: guq
- * @create: 2019-01-22 09:27
- **/
-@RestController
-@RequestMapping("/grade")
-public class GradeController {
-
-
-
-}

+ 2 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java

@@ -8,6 +8,8 @@ import com.usoftchina.smartschool.exception.BaseExceptionCode;
  **/
 public enum BizExceptionCode implements BaseExceptionCode {
 
+
+    EMPTY_DATA(76100,"数据为空,请填写后再保存"),
     USELESS_DATA(50001, "无效数据");
 
     private int code;

+ 24 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysClazzMapper.java

@@ -0,0 +1,24 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.SysClazz;
+import com.usoftchina.smartschool.school.po.TeacherDetail;
+
+import java.util.List;
+
+public interface SysClazzMapper {
+    int deleteByPrimaryKey(Long clazz_id);
+
+    int insert(SysClazz record);
+
+    int insertSelective(SysClazz record);
+
+    SysClazz selectByPrimaryKey(Long clazz_id);
+
+    int updateByPrimaryKeySelective(SysClazz record);
+
+    int updateByPrimaryKey(SysClazz record);
+
+    List<SysClazz> selectBygrade(Long id);
+
+    List<TeacherDetail> selectTeacher(Long id);
+}

+ 21 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysGradeMapper.java

@@ -0,0 +1,21 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.SysGrade;
+
+import java.util.List;
+
+public interface SysGradeMapper {
+    int deleteByPrimaryKey(Long grade_id);
+
+    int insert(SysGrade record);
+
+    int insertSelective(SysGrade record);
+
+    SysGrade selectByPrimaryKey(Long grade_id);
+
+    int updateByPrimaryKeySelective(SysGrade record);
+
+    int updateByPrimaryKey(SysGrade record);
+
+    List<SysGrade> selectBySchool(Long id);
+}

+ 33 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysStudentMapper.java

@@ -0,0 +1,33 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.SysParents;
+import com.usoftchina.smartschool.school.po.SysStudent;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface SysStudentMapper {
+    int deleteByPrimaryKey(Long stu_id);
+
+    int insert(SysStudent record);
+
+    int insertSelective(SysStudent record);
+
+    SysStudent selectByPrimaryKey(Long stu_id);
+
+    int updateByPrimaryKeySelective(SysStudent record);
+
+    int updateByPrimaryKey(SysStudent record);
+
+    List<SysStudent> selectByConditon(@Param("con") String con, @Param("schoolId") Long schoolId);
+
+    List<SysParents> selectParent(Long id);
+
+    void insertparent(SysParents item);
+
+    void insertrelation(@Param("id") Long id, @Param("pr_id") Long pr_id);
+
+    void updateParents(List<SysParents> updateDetails);
+
+    void updateRelation(@Param("parent_id") Long parent_id, @Param("id") Long id, @Param("relation") String relation);
+}

+ 26 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysTeacherMapper.java

@@ -0,0 +1,26 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.SysTeacher;
+import com.usoftchina.smartschool.school.po.TeacherDetail;
+
+import java.util.List;
+
+public interface SysTeacherMapper {
+    int deleteByPrimaryKey(Long teacher_id);
+
+    int insert(SysTeacher record);
+
+    int insertSelective(SysTeacher record);
+
+    SysTeacher selectByPrimaryKey(Long teacher_id);
+
+    int updateByPrimaryKeySelective(SysTeacher record);
+
+    int updateByPrimaryKeyWithBLOBs(SysTeacher record);
+
+    int updateByPrimaryKey(SysTeacher record);
+
+    List<SysTeacher> selectByConditon(String condition, Long schoolId);
+
+    List<TeacherDetail> selectDetail(Long id);
+}

+ 39 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ClassForm.java

@@ -0,0 +1,39 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-23 17:03
+ **/
+public class ClassForm implements Serializable{
+    private SysClazz main;
+    private List<SysStudent> items1;
+    private List<TeacherDetail> items2;
+
+
+    public SysClazz getMain() {
+        return main;
+    }
+
+    public void setMain(SysClazz main) {
+        this.main = main;
+    }
+
+    public List<SysStudent> getItems1() {
+        return items1;
+    }
+
+    public void setItems1(List<SysStudent> items1) {
+        this.items1 = items1;
+    }
+
+    public List<TeacherDetail> getItems2() {
+        return items2;
+    }
+
+    public void setItems2(List<TeacherDetail> items2) {
+        this.items2 = items2;
+    }
+}

+ 29 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/StudentForm.java

@@ -0,0 +1,29 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 19:26
+ **/
+public class StudentForm implements Serializable{
+    private SysStudent main;
+    private List<SysParents> items;
+
+    public SysStudent getMain() {
+        return main;
+    }
+
+    public void setMain(SysStudent main) {
+        this.main = main;
+    }
+
+    public List<SysParents> getItems() {
+        return items;
+    }
+
+    public void setItems(List<SysParents> items) {
+        this.items = items;
+    }
+}

+ 79 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysClazz.java

@@ -0,0 +1,79 @@
+package com.usoftchina.smartschool.school.po;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 16:12
+ **/
+public class SysClazz {
+
+    private Long clazz_id;
+
+    private String clazz_name;
+
+    private String clazz_adress;
+
+    private Integer clazz_status;
+
+    private String clazz_remarks;
+
+    private Long grade_id;
+
+    private Boolean leaf = true;
+
+    public Boolean getLeaf() {
+        return leaf;
+    }
+
+    public void setLeaf(Boolean leaf) {
+        this.leaf = leaf;
+    }
+
+    public Long getClazz_id() {
+        return clazz_id;
+    }
+
+    public void setClazz_id(Long clazz_id) {
+        this.clazz_id = clazz_id;
+    }
+
+    public String getClazz_name() {
+        return clazz_name;
+    }
+
+    public void setClazz_name(String clazz_name) {
+        this.clazz_name = clazz_name == null ? null : clazz_name.trim();
+    }
+
+    public String getClazz_adress() {
+        return clazz_adress;
+    }
+
+    public void setClazz_adress(String clazz_adress) {
+        this.clazz_adress = clazz_adress == null ? null : clazz_adress.trim();
+    }
+
+    public Integer getClazz_status() {
+        return clazz_status;
+    }
+
+    public void setClazz_status(Integer clazz_status) {
+        this.clazz_status = clazz_status;
+    }
+
+    public String getClazz_remarks() {
+        return clazz_remarks;
+    }
+
+    public void setClazz_remarks(String clazz_remarks) {
+        this.clazz_remarks = clazz_remarks == null ? null : clazz_remarks.trim();
+    }
+
+    public Long getGrade_id() {
+        return grade_id;
+    }
+
+    public void setGrade_id(Long grade_id) {
+        this.grade_id = grade_id;
+    }
+
+}

+ 91 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysGrade.java

@@ -0,0 +1,91 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 16:11
+ **/
+public class SysGrade {
+
+    private Long grade_id;
+
+    private String grade_name;
+
+    private Integer grade_status;
+
+    private String grade_remarks;
+
+    private String grade_address;
+
+    private Long school_id;
+
+    private List<SysClazz> children;
+
+    private Boolean leaf = false;
+
+    public Boolean getLeaf() {
+        return leaf;
+    }
+
+    public void setLeaf(Boolean leaf) {
+        this.leaf = leaf;
+    }
+
+    public List<SysClazz> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<SysClazz> children) {
+        this.children = children;
+    }
+
+    public Long getGrade_id() {
+        return grade_id;
+    }
+
+    public void setGrade_id(Long grade_id) {
+        this.grade_id = grade_id;
+    }
+
+    public String getGrade_name() {
+        return grade_name;
+    }
+
+    public void setGrade_name(String grade_name) {
+        this.grade_name = grade_name == null ? null : grade_name.trim();
+    }
+
+    public Integer getGrade_status() {
+        return grade_status;
+    }
+
+    public void setGrade_status(Integer grade_status) {
+        this.grade_status = grade_status;
+    }
+
+    public String getGrade_remarks() {
+        return grade_remarks;
+    }
+
+    public void setGrade_remarks(String grade_remarks) {
+        this.grade_remarks = grade_remarks == null ? null : grade_remarks.trim();
+    }
+
+    public String getGrade_address() {
+        return grade_address;
+    }
+
+    public void setGrade_address(String grade_address) {
+        this.grade_address = grade_address == null ? null : grade_address.trim();
+    }
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+
+}

+ 161 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysParents.java

@@ -0,0 +1,161 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 19:31
+ **/
+public class SysParents {
+
+    private Long parent_id;
+
+    private Long user_id;
+
+    private String openid;
+
+    private Long school_id;
+
+    private String parents_name;
+
+    private Date parents_birthday;
+
+    private Integer parents_sex;
+
+    private Integer parents_status;
+
+    private String parents_job;
+
+    private String parents_address;
+
+    private String parents_honor;
+
+    private String parents_remarks;
+
+    private String parents_photo;
+
+    private Long pr_stuid;
+
+    private String pr_relation;
+
+    public String getPr_relation() {
+        return pr_relation;
+    }
+
+    public void setPr_relation(String pr_relation) {
+        this.pr_relation = pr_relation;
+    }
+
+    public Long getPr_stuid() {
+        return pr_stuid;
+    }
+
+    public void setPr_stuid(Long pr_stuid) {
+        this.pr_stuid = pr_stuid;
+    }
+
+    public Long getParent_id() {
+        return parent_id;
+    }
+
+    public void setParent_id(Long parent_id) {
+        this.parent_id = parent_id;
+    }
+
+    public Long getUser_id() {
+        return user_id;
+    }
+
+    public void setUser_id(Long user_id) {
+        this.user_id = user_id;
+    }
+
+    public String getOpenid() {
+        return openid;
+    }
+
+    public void setOpenid(String openid) {
+        this.openid = openid == null ? null : openid.trim();
+    }
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+
+    public String getParents_name() {
+        return parents_name;
+    }
+
+    public void setParents_name(String parents_name) {
+        this.parents_name = parents_name == null ? null : parents_name.trim();
+    }
+
+    public Date getParents_birthday() {
+        return parents_birthday;
+    }
+
+    public void setParents_birthday(Date parents_birthday) {
+        this.parents_birthday = parents_birthday;
+    }
+
+    public Integer getParents_sex() {
+        return parents_sex;
+    }
+
+    public void setParents_sex(Integer parents_sex) {
+        this.parents_sex = parents_sex;
+    }
+
+    public Integer getParents_status() {
+        return parents_status;
+    }
+
+    public void setParents_status(Integer parents_status) {
+        this.parents_status = parents_status;
+    }
+
+    public String getParents_job() {
+        return parents_job;
+    }
+
+    public void setParents_job(String parents_job) {
+        this.parents_job = parents_job == null ? null : parents_job.trim();
+    }
+
+    public String getParents_address() {
+        return parents_address;
+    }
+
+    public void setParents_address(String parents_address) {
+        this.parents_address = parents_address == null ? null : parents_address.trim();
+    }
+
+    public String getParents_honor() {
+        return parents_honor;
+    }
+
+    public void setParents_honor(String parents_honor) {
+        this.parents_honor = parents_honor == null ? null : parents_honor.trim();
+    }
+
+    public String getParents_remarks() {
+        return parents_remarks;
+    }
+
+    public void setParents_remarks(String parents_remarks) {
+        this.parents_remarks = parents_remarks == null ? null : parents_remarks.trim();
+    }
+
+    public String getParents_photo() {
+        return parents_photo;
+    }
+
+    public void setParents_photo(String parents_photo) {
+        this.parents_photo = parents_photo == null ? null : parents_photo.trim();
+    }
+
+}

+ 21 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysSchool.java

@@ -1,6 +1,7 @@
 package com.usoftchina.smartschool.school.po;
 
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * @author: guq
@@ -24,6 +25,26 @@ public class SysSchool implements Serializable{
 
     private String school_secret;
 
+    private List<SysGrade> children;
+
+    private Boolean leaf = false;
+
+    public Boolean getLeaf() {
+        return leaf;
+    }
+
+    public void setLeaf(Boolean leaf) {
+        this.leaf = leaf;
+    }
+
+    public List<SysGrade> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<SysGrade> children) {
+        this.children = children;
+    }
+
     public Long getSchool_id() {
         return school_id;
     }

+ 159 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysStudent.java

@@ -0,0 +1,159 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 17:50
+ **/
+public class SysStudent {
+    private Long stu_id;
+
+    private String stu_number;
+
+    private String stu_name;
+
+    private Date stu_enroll_date;
+
+    private Date stu_graduate_date;
+
+    private Date stu_birthday;
+
+    private Integer stu_age;
+
+    private Integer stu_sex;
+
+    private String stu_address;
+
+    private String stu_photo;
+
+    private Integer stu_status;
+
+    private Integer stu_is_write;
+
+    private String stu_remarks;
+
+    private Long clazz_id;
+
+    private Long school_id;
+
+    public Long getStu_id() {
+        return stu_id;
+    }
+
+    public void setStu_id(Long stu_id) {
+        this.stu_id = stu_id;
+    }
+
+    public String getStu_number() {
+        return stu_number;
+    }
+
+    public void setStu_number(String stu_number) {
+        this.stu_number = stu_number == null ? null : stu_number.trim();
+    }
+
+    public String getStu_name() {
+        return stu_name;
+    }
+
+    public void setStu_name(String stu_name) {
+        this.stu_name = stu_name == null ? null : stu_name.trim();
+    }
+
+    public Date getStu_enroll_date() {
+        return stu_enroll_date;
+    }
+
+    public void setStu_enroll_date(Date stu_enroll_date) {
+        this.stu_enroll_date = stu_enroll_date;
+    }
+
+    public Date getStu_graduate_date() {
+        return stu_graduate_date;
+    }
+
+    public void setStu_graduate_date(Date stu_graduate_date) {
+        this.stu_graduate_date = stu_graduate_date;
+    }
+
+    public Date getStu_birthday() {
+        return stu_birthday;
+    }
+
+    public void setStu_birthday(Date stu_birthday) {
+        this.stu_birthday = stu_birthday;
+    }
+
+    public Integer getStu_age() {
+        return stu_age;
+    }
+
+    public void setStu_age(Integer stu_age) {
+        this.stu_age = stu_age;
+    }
+
+    public Integer getStu_sex() {
+        return stu_sex;
+    }
+
+    public void setStu_sex(Integer stu_sex) {
+        this.stu_sex = stu_sex;
+    }
+
+    public String getStu_address() {
+        return stu_address;
+    }
+
+    public void setStu_address(String stu_address) {
+        this.stu_address = stu_address == null ? null : stu_address.trim();
+    }
+
+    public String getStu_photo() {
+        return stu_photo;
+    }
+
+    public void setStu_photo(String stu_photo) {
+        this.stu_photo = stu_photo == null ? null : stu_photo.trim();
+    }
+
+    public Integer getStu_status() {
+        return stu_status;
+    }
+
+    public void setStu_status(Integer stu_status) {
+        this.stu_status = stu_status;
+    }
+
+    public Integer getStu_is_write() {
+        return stu_is_write;
+    }
+
+    public void setStu_is_write(Integer stu_is_write) {
+        this.stu_is_write = stu_is_write;
+    }
+
+    public String getStu_remarks() {
+        return stu_remarks;
+    }
+
+    public void setStu_remarks(String stu_remarks) {
+        this.stu_remarks = stu_remarks == null ? null : stu_remarks.trim();
+    }
+
+    public Long getClazz_id() {
+        return clazz_id;
+    }
+
+    public void setClazz_id(Long clazz_id) {
+        this.clazz_id = clazz_id;
+    }
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+}

+ 171 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysTeacher.java

@@ -0,0 +1,171 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2019-01-23 14:32
+ **/
+public class SysTeacher {
+
+    private Long teacher_id;
+
+    private Long user_id;
+
+    private String openid;
+
+    private Long school_id;
+
+    private String teacher_number;
+
+    private String teacher_name;
+
+    private Integer teacher_sex;
+
+    private Date teacher_birthday;
+
+    private Double teacher_working_age;
+
+    private Integer teacher_status;
+
+    private String teacher_address;
+
+    private Date teacher_entry;
+
+    private String teacher_honor;
+
+    private String teacher_remarks;
+
+    private String teacher_photo;
+
+    private String teacher_experience;
+
+    public String getTeacher_photo() {
+        return teacher_photo;
+    }
+
+    public void setTeacher_photo(String teacher_photo) {
+        this.teacher_photo = teacher_photo;
+    }
+
+    public String getTeacher_experience() {
+        return teacher_experience;
+    }
+
+    public void setTeacher_experience(String teacher_experience) {
+        this.teacher_experience = teacher_experience;
+    }
+
+    public Long getTeacher_id() {
+        return teacher_id;
+    }
+
+    public void setTeacher_id(Long teacher_id) {
+        this.teacher_id = teacher_id;
+    }
+
+    public Long getUser_id() {
+        return user_id;
+    }
+
+    public void setUser_id(Long user_id) {
+        this.user_id = user_id;
+    }
+
+    public String getOpenid() {
+        return openid;
+    }
+
+    public void setOpenid(String openid) {
+        this.openid = openid == null ? null : openid.trim();
+    }
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+
+    public String getTeacher_number() {
+        return teacher_number;
+    }
+
+    public void setTeacher_number(String teacher_number) {
+        this.teacher_number = teacher_number == null ? null : teacher_number.trim();
+    }
+
+    public String getTeacher_name() {
+        return teacher_name;
+    }
+
+    public void setTeacher_name(String teacher_name) {
+        this.teacher_name = teacher_name == null ? null : teacher_name.trim();
+    }
+
+    public Integer getTeacher_sex() {
+        return teacher_sex;
+    }
+
+    public void setTeacher_sex(Integer teacher_sex) {
+        this.teacher_sex = teacher_sex;
+    }
+
+    public Date getTeacher_birthday() {
+        return teacher_birthday;
+    }
+
+    public void setTeacher_birthday(Date teacher_birthday) {
+        this.teacher_birthday = teacher_birthday;
+    }
+
+    public Double getTeacher_working_age() {
+        return teacher_working_age;
+    }
+
+    public void setTeacher_working_age(Double teacher_working_age) {
+        this.teacher_working_age = teacher_working_age;
+    }
+
+    public Integer getTeacher_status() {
+        return teacher_status;
+    }
+
+    public void setTeacher_status(Integer teacher_status) {
+        this.teacher_status = teacher_status;
+    }
+
+    public String getTeacher_address() {
+        return teacher_address;
+    }
+
+    public void setTeacher_address(String teacher_address) {
+        this.teacher_address = teacher_address == null ? null : teacher_address.trim();
+    }
+
+    public Date getTeacher_entry() {
+        return teacher_entry;
+    }
+
+    public void setTeacher_entry(Date teacher_entry) {
+        this.teacher_entry = teacher_entry;
+    }
+
+    public String getTeacher_honor() {
+        return teacher_honor;
+    }
+
+    public void setTeacher_honor(String teacher_honor) {
+        this.teacher_honor = teacher_honor == null ? null : teacher_honor.trim();
+    }
+
+    public String getTeacher_remarks() {
+        return teacher_remarks;
+    }
+
+    public void setTeacher_remarks(String teacher_remarks) {
+        this.teacher_remarks = teacher_remarks == null ? null : teacher_remarks.trim();
+    }
+
+}

+ 54 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TeacherDetail.java

@@ -0,0 +1,54 @@
+package com.usoftchina.smartschool.school.po;
+
+/**
+ * @author: guq
+ * @create: 2019-01-23 14:55
+ **/
+public class TeacherDetail {
+
+    private Long teacher_id;
+    private String teacher;
+    private String grade;
+    private String classes;
+    private String subject;
+
+    public String getTeacher() {
+        return teacher;
+    }
+
+    public void setTeacher(String teacher) {
+        this.teacher = teacher;
+    }
+
+    public Long getTeacher_id() {
+        return teacher_id;
+    }
+
+    public void setTeacher_id(Long teacher_id) {
+        this.teacher_id = teacher_id;
+    }
+
+    public String getGrade() {
+        return grade;
+    }
+
+    public void setGrade(String grade) {
+        this.grade = grade;
+    }
+
+    public String getClasses() {
+        return classes;
+    }
+
+    public void setClasses(String classes) {
+        this.classes = classes;
+    }
+
+    public String getSubject() {
+        return subject;
+    }
+
+    public void setSubject(String subject) {
+        this.subject = subject;
+    }
+}

+ 32 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TeacherForm.java

@@ -0,0 +1,32 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-23 14:55
+ **/
+public class TeacherForm implements Serializable{
+
+    private SysTeacher main;
+
+    private List<TeacherDetail> items;
+
+
+    public SysTeacher getMain() {
+        return main;
+    }
+
+    public void setMain(SysTeacher main) {
+        this.main = main;
+    }
+
+    public List<TeacherDetail> getItems() {
+        return items;
+    }
+
+    public void setItems(List<TeacherDetail> items) {
+        this.items = items;
+    }
+}

+ 127 - 0
applications/school/school-server/src/main/resources/mapper/SysClazzMapper.xml

@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.smartschool.school.mapper.SysClazzMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.SysClazz" >
+    <id column="clazz_id" property="clazz_id" jdbcType="BIGINT" />
+    <result column="clazz_name" property="clazz_name" jdbcType="VARCHAR" />
+    <result column="clazz_adress" property="clazz_adress" jdbcType="VARCHAR" />
+    <result column="clazz_status" property="clazz_status" jdbcType="INTEGER" />
+    <result column="clazz_remarks" property="clazz_remarks" jdbcType="VARCHAR" />
+    <result column="grade_id" property="grade_id" jdbcType="BIGINT" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    clazz_id, clazz_name, clazz_adress, clazz_status, clazz_remarks, grade_id
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from sys_clazz
+    where clazz_id = #{clazz_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from sys_clazz
+    where clazz_id = #{clazz_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.SysClazz" >
+
+    insert into sys_clazz (clazz_id, clazz_name, clazz_adress, 
+      clazz_status, clazz_remarks, grade_id
+      )
+    values (#{clazz_id,jdbcType=BIGINT}, #{clazz_name,jdbcType=VARCHAR}, #{clazz_adress,jdbcType=VARCHAR}, 
+      #{clazz_status,jdbcType=INTEGER}, #{clazz_remarks,jdbcType=VARCHAR}, #{grade_id,jdbcType=BIGINT}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.SysClazz" >
+    insert into sys_clazz
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="clazz_id != null" >
+        clazz_id,
+      </if>
+      <if test="clazz_name != null" >
+        clazz_name,
+      </if>
+      <if test="clazz_adress != null" >
+        clazz_adress,
+      </if>
+      <if test="clazz_status != null" >
+        clazz_status,
+      </if>
+      <if test="clazz_remarks != null" >
+        clazz_remarks,
+      </if>
+      <if test="grade_id != null" >
+        grade_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="clazz_id != null" >
+        #{clazz_id,jdbcType=BIGINT},
+      </if>
+      <if test="clazz_name != null" >
+        #{clazz_name,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_adress != null" >
+        #{clazz_adress,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_status != null" >
+        #{clazz_status,jdbcType=INTEGER},
+      </if>
+      <if test="clazz_remarks != null" >
+        #{clazz_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_id != null" >
+        #{grade_id,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.SysClazz" >
+    update sys_clazz
+    <set >
+      <if test="clazz_name != null" >
+        clazz_name = #{clazz_name,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_adress != null" >
+        clazz_adress = #{clazz_adress,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_status != null" >
+        clazz_status = #{clazz_status,jdbcType=INTEGER},
+      </if>
+      <if test="clazz_remarks != null" >
+        clazz_remarks = #{clazz_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_id != null" >
+        grade_id = #{grade_id,jdbcType=BIGINT},
+      </if>
+    </set>
+    where clazz_id = #{clazz_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.SysClazz" >
+    update sys_clazz
+    set clazz_name = #{clazz_name,jdbcType=VARCHAR},
+      clazz_adress = #{clazz_adress,jdbcType=VARCHAR},
+      clazz_status = #{clazz_status,jdbcType=INTEGER},
+      clazz_remarks = #{clazz_remarks,jdbcType=VARCHAR},
+      grade_id = #{grade_id,jdbcType=BIGINT}
+    where clazz_id = #{clazz_id,jdbcType=BIGINT}
+  </update>
+
+  <select id="selectBygrade" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select * from sys_clazz where grade_id = #{id}
+  </select>
+
+  <resultMap id="teacherMap" type="com.usoftchina.smartschool.school.po.TeacherDetail" >
+    <result column="teacher" property="teacher" jdbcType="VARCHAR" />
+    <result column="grade" property="grade" jdbcType="VARCHAR" />
+    <result column="subject" property="subject" jdbcType="INTEGER" />
+    <result column="classes" property="classes" jdbcType="VARCHAR" />
+  </resultMap>
+
+  <select id="selectTeacher" parameterType="long" resultMap="teacherMap">
+    select  sys_teacher.teacher_name teacher,sys_grade.grade_name grade,sys_clazz.clazz_name classes,subject.subject_name subject
+from sys_teacher_clazz left join subject on sys_teacher_clazz.subject_id = subject.subject_id
+left join sys_clazz on sys_teacher_clazz.clazz_id = sys_clazz.clazz_id
+left join sys_grade on sys_grade.grade_id=sys_clazz.grade_id
+left join sys_teacher on sys_teacher.teacher_id = sys_teacher_clazz.teacher_id
+where sys_teacher_clazz.clazz_id=#{id};
+  </select>
+</mapper>

+ 109 - 0
applications/school/school-server/src/main/resources/mapper/SysGradeMapper.xml

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.smartschool.school.mapper.SysGradeMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.SysGrade" >
+    <id column="grade_id" property="grade_id" jdbcType="BIGINT" />
+    <result column="grade_name" property="grade_name" jdbcType="VARCHAR" />
+    <result column="grade_status" property="grade_status" jdbcType="INTEGER" />
+    <result column="grade_remarks" property="grade_remarks" jdbcType="VARCHAR" />
+    <result column="grade_address" property="grade_address" jdbcType="VARCHAR" />
+    <result column="school_id" property="school_id" jdbcType="BIGINT" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    grade_id, grade_name, grade_status, grade_remarks, grade_address, school_id
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from sys_grade
+    where grade_id = #{grade_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from sys_grade
+    where grade_id = #{grade_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.SysGrade" >
+    insert into sys_grade (grade_id, grade_name, grade_status, 
+      grade_remarks, grade_address, school_id
+      )
+    values (#{grade_id,jdbcType=BIGINT}, #{grade_name,jdbcType=VARCHAR}, #{grade_status,jdbcType=INTEGER}, 
+      #{grade_remarks,jdbcType=VARCHAR}, #{grade_address,jdbcType=VARCHAR}, #{school_id,jdbcType=BIGINT}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.SysGrade" >
+    insert into sys_grade
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="grade_id != null" >
+        grade_id,
+      </if>
+      <if test="grade_name != null" >
+        grade_name,
+      </if>
+      <if test="grade_status != null" >
+        grade_status,
+      </if>
+      <if test="grade_remarks != null" >
+        grade_remarks,
+      </if>
+      <if test="grade_address != null" >
+        grade_address,
+      </if>
+      <if test="school_id != null" >
+        school_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="grade_id != null" >
+        #{grade_id,jdbcType=BIGINT},
+      </if>
+      <if test="grade_name != null" >
+        #{grade_name,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_status != null" >
+        #{grade_status,jdbcType=INTEGER},
+      </if>
+      <if test="grade_remarks != null" >
+        #{grade_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_address != null" >
+        #{grade_address,jdbcType=VARCHAR},
+      </if>
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.SysGrade" >
+    update sys_grade
+    <set >
+      <if test="grade_name != null" >
+        grade_name = #{grade_name,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_status != null" >
+        grade_status = #{grade_status,jdbcType=INTEGER},
+      </if>
+      <if test="grade_remarks != null" >
+        grade_remarks = #{grade_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_address != null" >
+        grade_address = #{grade_address,jdbcType=VARCHAR},
+      </if>
+      <if test="school_id != null" >
+        school_id = #{school_id,jdbcType=BIGINT},
+      </if>
+    </set>
+    where grade_id = #{grade_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.SysGrade" >
+    update sys_grade
+    set grade_name = #{grade_name,jdbcType=VARCHAR},
+      grade_status = #{grade_status,jdbcType=INTEGER},
+      grade_remarks = #{grade_remarks,jdbcType=VARCHAR},
+      grade_address = #{grade_address,jdbcType=VARCHAR},
+      school_id = #{school_id,jdbcType=BIGINT}
+    where grade_id = #{grade_id,jdbcType=BIGINT}
+  </update>
+  <select id="selectBySchool" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select * from sys_grade where school_id = #{id}
+  </select>
+</mapper>

+ 341 - 0
applications/school/school-server/src/main/resources/mapper/SysStudentMapper.xml

@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.smartschool.school.mapper.SysStudentMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.SysStudent" >
+    <id column="stu_id" property="stu_id" jdbcType="BIGINT" />
+    <result column="stu_number" property="stu_number" jdbcType="VARCHAR" />
+    <result column="stu_name" property="stu_name" jdbcType="VARCHAR" />
+    <result column="stu_enroll_date" property="stu_enroll_date" jdbcType="DATE" />
+    <result column="stu_graduate_date" property="stu_graduate_date" jdbcType="DATE" />
+    <result column="stu_birthday" property="stu_birthday" jdbcType="DATE" />
+    <result column="stu_age" property="stu_age" jdbcType="INTEGER" />
+    <result column="stu_sex" property="stu_sex" jdbcType="INTEGER" />
+    <result column="stu_address" property="stu_address" jdbcType="VARCHAR" />
+    <result column="stu_photo" property="stu_photo" jdbcType="VARCHAR" />
+    <result column="stu_status" property="stu_status" jdbcType="INTEGER" />
+    <result column="stu_is_write" property="stu_is_write" jdbcType="INTEGER" />
+    <result column="stu_remarks" property="stu_remarks" jdbcType="VARCHAR" />
+    <result column="clazz_id" property="clazz_id" jdbcType="BIGINT" />
+    <result column="school_id" property="school_id" jdbcType="BIGINT" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    stu_id, stu_number, stu_name, stu_enroll_date, stu_graduate_date, stu_birthday, stu_age, 
+    stu_sex, stu_address, stu_photo, stu_status, stu_is_write, stu_remarks, clazz_id, 
+    school_id
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from sys_student
+    where stu_id = #{stu_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from sys_student
+    where stu_id = #{stu_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.SysStudent" >
+    insert into sys_student (stu_id, stu_number, stu_name, 
+      stu_enroll_date, stu_graduate_date, stu_birthday, 
+      stu_age, stu_sex, stu_address, 
+      stu_photo, stu_status, stu_is_write, 
+      stu_remarks, clazz_id, school_id
+      )
+    values (#{stu_id,jdbcType=BIGINT}, #{stu_number,jdbcType=VARCHAR}, #{stu_name,jdbcType=VARCHAR}, 
+      #{stu_enroll_date,jdbcType=DATE}, #{stu_graduate_date,jdbcType=DATE}, #{stu_birthday,jdbcType=DATE}, 
+      #{stu_age,jdbcType=INTEGER}, #{stu_sex,jdbcType=INTEGER}, #{stu_address,jdbcType=VARCHAR}, 
+      #{stu_photo,jdbcType=VARCHAR}, #{stu_status,jdbcType=INTEGER}, #{stu_is_write,jdbcType=INTEGER}, 
+      #{stu_remarks,jdbcType=VARCHAR}, #{clazz_id,jdbcType=BIGINT}, #{school_id,jdbcType=BIGINT}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.SysStudent" >
+    <selectKey  resultType="java.lang.Long" keyProperty="stu_id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into sys_student
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="stu_number != null" >
+        stu_number,
+      </if>
+      <if test="stu_name != null" >
+        stu_name,
+      </if>
+      <if test="stu_enroll_date != null" >
+        stu_enroll_date,
+      </if>
+      <if test="stu_graduate_date != null" >
+        stu_graduate_date,
+      </if>
+      <if test="stu_birthday != null" >
+        stu_birthday,
+      </if>
+      <if test="stu_age != null" >
+        stu_age,
+      </if>
+      <if test="stu_sex != null" >
+        stu_sex,
+      </if>
+      <if test="stu_address != null" >
+        stu_address,
+      </if>
+      <if test="stu_photo != null" >
+        stu_photo,
+      </if>
+      <if test="stu_status != null" >
+        stu_status,
+      </if>
+      <if test="stu_is_write != null" >
+        stu_is_write,
+      </if>
+      <if test="stu_remarks != null" >
+        stu_remarks,
+      </if>
+      <if test="clazz_id != null" >
+        clazz_id,
+      </if>
+      <if test="school_id != null" >
+        school_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="stu_number != null" >
+        #{stu_number,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_name != null" >
+        #{stu_name,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_enroll_date != null" >
+        #{stu_enroll_date,jdbcType=DATE},
+      </if>
+      <if test="stu_graduate_date != null" >
+        #{stu_graduate_date,jdbcType=DATE},
+      </if>
+      <if test="stu_birthday != null" >
+        #{stu_birthday,jdbcType=DATE},
+      </if>
+      <if test="stu_age != null" >
+        #{stu_age,jdbcType=INTEGER},
+      </if>
+      <if test="stu_sex != null" >
+        #{stu_sex,jdbcType=INTEGER},
+      </if>
+      <if test="stu_address != null" >
+        #{stu_address,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_photo != null" >
+        #{stu_photo,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_status != null" >
+        #{stu_status,jdbcType=INTEGER},
+      </if>
+      <if test="stu_is_write != null" >
+        #{stu_is_write,jdbcType=INTEGER},
+      </if>
+      <if test="stu_remarks != null" >
+        #{stu_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_id != null" >
+        #{clazz_id,jdbcType=BIGINT},
+      </if>
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.SysStudent" >
+    update sys_student
+    <set >
+      <if test="stu_number != null" >
+        stu_number = #{stu_number,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_name != null" >
+        stu_name = #{stu_name,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_enroll_date != null" >
+        stu_enroll_date = #{stu_enroll_date,jdbcType=DATE},
+      </if>
+      <if test="stu_graduate_date != null" >
+        stu_graduate_date = #{stu_graduate_date,jdbcType=DATE},
+      </if>
+      <if test="stu_birthday != null" >
+        stu_birthday = #{stu_birthday,jdbcType=DATE},
+      </if>
+      <if test="stu_age != null" >
+        stu_age = #{stu_age,jdbcType=INTEGER},
+      </if>
+      <if test="stu_sex != null" >
+        stu_sex = #{stu_sex,jdbcType=INTEGER},
+      </if>
+      <if test="stu_address != null" >
+        stu_address = #{stu_address,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_photo != null" >
+        stu_photo = #{stu_photo,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_status != null" >
+        stu_status = #{stu_status,jdbcType=INTEGER},
+      </if>
+      <if test="stu_is_write != null" >
+        stu_is_write = #{stu_is_write,jdbcType=INTEGER},
+      </if>
+      <if test="stu_remarks != null" >
+        stu_remarks = #{stu_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_id != null" >
+        clazz_id = #{clazz_id,jdbcType=BIGINT},
+      </if>
+      <if test="school_id != null" >
+        school_id = #{school_id,jdbcType=BIGINT},
+      </if>
+    </set>
+    where stu_id = #{stu_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.SysStudent" >
+    update sys_student
+    set stu_number = #{stu_number,jdbcType=VARCHAR},
+      stu_name = #{stu_name,jdbcType=VARCHAR},
+      stu_enroll_date = #{stu_enroll_date,jdbcType=DATE},
+      stu_graduate_date = #{stu_graduate_date,jdbcType=DATE},
+      stu_birthday = #{stu_birthday,jdbcType=DATE},
+      stu_age = #{stu_age,jdbcType=INTEGER},
+      stu_sex = #{stu_sex,jdbcType=INTEGER},
+      stu_address = #{stu_address,jdbcType=VARCHAR},
+      stu_photo = #{stu_photo,jdbcType=VARCHAR},
+      stu_status = #{stu_status,jdbcType=INTEGER},
+      stu_is_write = #{stu_is_write,jdbcType=INTEGER},
+      stu_remarks = #{stu_remarks,jdbcType=VARCHAR},
+      clazz_id = #{clazz_id,jdbcType=BIGINT},
+      school_id = #{school_id,jdbcType=BIGINT}
+    where stu_id = #{stu_id,jdbcType=BIGINT}
+  </update>
+
+  <select id="selectByConditon" resultMap="BaseResultMap">
+    select * from sys_student
+    <where>
+    <if test="con != null">
+      ${con}
+    </if>
+    <if test="schoolId != null">
+      and school_id=#{schoolId}
+    </if>
+  </where>
+    ORDER BY stu_id DESC
+  </select>
+
+  <resultMap id="parentMap" type="com.usoftchina.smartschool.school.po.SysParents" >
+    <id column="parent_id" property="parent_id" jdbcType="BIGINT" />
+    <result column="user_id" property="user_id" jdbcType="BIGINT" />
+    <result column="openid" property="openid" jdbcType="VARCHAR" />
+    <result column="school_id" property="school_id" jdbcType="BIGINT" />
+    <result column="parents_name" property="parents_name" jdbcType="VARCHAR" />
+    <result column="parents_birthday" property="parents_birthday" jdbcType="DATE" />
+    <result column="parents_sex" property="parents_sex" jdbcType="INTEGER" />
+    <result column="parents_status" property="parents_status" jdbcType="INTEGER" />
+    <result column="parents_job" property="parents_job" jdbcType="VARCHAR" />
+    <result column="parents_address" property="parents_address" jdbcType="VARCHAR" />
+    <result column="parents_honor" property="parents_honor" jdbcType="VARCHAR" />
+    <result column="parents_remarks" property="parents_remarks" jdbcType="VARCHAR" />
+  </resultMap>
+  <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.smartschool.school.po.SysParents" extends="parentMap" >
+    <result column="parents_photo" property="parents_photo" jdbcType="LONGVARCHAR" />
+  </resultMap>
+
+  <select id="selectParent" resultMap="parentMap">
+    select sys_parents.* from sys_parents left join sys_parents_stu on sys_parents.parent_id =
+    sys_parents_stu.parent_id where sys_parents_stu.stu_id=#{id}
+  </select>
+
+  <insert id="insertparent" parameterType="com.usoftchina.smartschool.school.po.SysParents" >
+    <selectKey  resultType="java.lang.Long" keyProperty="parent_id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into sys_parents
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="user_id != null" >
+        user_id,
+      </if>
+      <if test="openid != null" >
+        openid,
+      </if>
+      <if test="school_id != null" >
+        school_id,
+      </if>
+      <if test="parents_name != null" >
+        parents_name,
+      </if>
+      <if test="parents_birthday != null" >
+        parents_birthday,
+      </if>
+      <if test="parents_sex != null" >
+        parents_sex,
+      </if>
+      <if test="parents_status != null" >
+        parents_status,
+      </if>
+      <if test="parents_job != null" >
+        parents_job,
+      </if>
+      <if test="parents_address != null" >
+        parents_address,
+      </if>
+      <if test="parents_honor != null" >
+        parents_honor,
+      </if>
+      <if test="parents_remarks != null" >
+        parents_remarks,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="user_id != null" >
+        #{user_id,jdbcType=BIGINT},
+      </if>
+      <if test="openid != null" >
+        #{openid,jdbcType=VARCHAR},
+      </if>
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+      <if test="parents_name != null" >
+        #{parents_name,jdbcType=VARCHAR},
+      </if>
+      <if test="parents_birthday != null" >
+        #{parents_birthday,jdbcType=DATE},
+      </if>
+      <if test="parents_sex != null" >
+        #{parents_sex,jdbcType=INTEGER},
+      </if>
+      <if test="parents_status != null" >
+        #{parents_status,jdbcType=INTEGER},
+      </if>
+      <if test="parents_job != null" >
+        #{parents_job,jdbcType=VARCHAR},
+      </if>
+      <if test="parents_address != null" >
+        #{parents_address,jdbcType=VARCHAR},
+      </if>
+      <if test="parents_honor != null" >
+        #{parents_honor,jdbcType=VARCHAR},
+      </if>
+      <if test="parents_remarks != null" >
+        #{parents_remarks,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+
+  <insert id="insertrelation">
+    insert into sys_parents_stu (stu_id,parent_id) VALUES (#{id},#{pr_id})
+  </insert>
+
+  <update id="updateParents" parameterType="com.usoftchina.smartschool.school.po.SysParents" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+      update sys_parents <set>
+      parents_name = #{item.parents_name,jdbcType=VARCHAR}
+    </set>
+      where parent_id = #{item.parent_id,jdbcType=BIGINT}
+    </foreach>
+  </update>
+
+
+  <update id="updateRelation">
+    update sys_parents_stu set ps_relation=#{relation} where parent_id=#{parent_id} and stu_id =#{id}
+  </update>
+</mapper>

+ 269 - 0
applications/school/school-server/src/main/resources/mapper/SysTeacherMapper.xml

@@ -0,0 +1,269 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.smartschool.school.mapper.SysTeacherMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.SysTeacher" >
+    <id column="teacher_id" property="teacher_id" jdbcType="BIGINT" />
+    <result column="user_id" property="user_id" jdbcType="BIGINT" />
+    <result column="openid" property="openid" jdbcType="VARCHAR" />
+    <result column="school_id" property="school_id" jdbcType="BIGINT" />
+    <result column="teacher_number" property="teacher_number" jdbcType="VARCHAR" />
+    <result column="teacher_name" property="teacher_name" jdbcType="VARCHAR" />
+    <result column="teacher_sex" property="teacher_sex" jdbcType="INTEGER" />
+    <result column="teacher_birthday" property="teacher_birthday" jdbcType="DATE" />
+    <result column="teacher_working_age" property="teacher_working_age" jdbcType="DOUBLE" />
+    <result column="teacher_status" property="teacher_status" jdbcType="INTEGER" />
+    <result column="teacher_address" property="teacher_address" jdbcType="VARCHAR" />
+    <result column="teacher_entry" property="teacher_entry" jdbcType="DATE" />
+    <result column="teacher_honor" property="teacher_honor" jdbcType="VARCHAR" />
+    <result column="teacher_remarks" property="teacher_remarks" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    teacher_id, user_id, openid, school_id, teacher_number, teacher_name, teacher_sex, 
+    teacher_birthday, teacher_working_age, teacher_status, teacher_address, teacher_entry, 
+    teacher_honor, teacher_remarks
+  </sql>
+  <sql id="Blob_Column_List" >
+    teacher_photo, teacher_experience
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from sys_teacher
+    where teacher_id = #{teacher_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from sys_teacher
+    where teacher_id = #{teacher_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.SysTeacher" >
+    insert into sys_teacher (teacher_id, user_id, openid, 
+      school_id, teacher_number, teacher_name, 
+      teacher_sex, teacher_birthday, teacher_working_age, 
+      teacher_status, teacher_address, teacher_entry, 
+      teacher_honor, teacher_remarks, teacher_photo, 
+      teacher_experience)
+    values (#{teacher_id,jdbcType=BIGINT}, #{user_id,jdbcType=BIGINT}, #{openid,jdbcType=VARCHAR}, 
+      #{school_id,jdbcType=BIGINT}, #{teacher_number,jdbcType=VARCHAR}, #{teacher_name,jdbcType=VARCHAR}, 
+      #{teacher_sex,jdbcType=INTEGER}, #{teacher_birthday,jdbcType=DATE}, #{teacher_working_age,jdbcType=DOUBLE}, 
+      #{teacher_status,jdbcType=INTEGER}, #{teacher_address,jdbcType=VARCHAR}, #{teacher_entry,jdbcType=DATE}, 
+      #{teacher_honor,jdbcType=VARCHAR}, #{teacher_remarks,jdbcType=VARCHAR}, #{teacher_photo,jdbcType=LONGVARCHAR}, 
+      #{teacher_experience,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.SysTeacher" >
+    <selectKey  resultType="java.lang.Long" keyProperty="teacher_id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into sys_teacher
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="user_id != null" >
+        user_id,
+      </if>
+      <if test="openid != null" >
+        openid,
+      </if>
+      <if test="school_id != null" >
+        school_id,
+      </if>
+      <if test="teacher_number != null" >
+        teacher_number,
+      </if>
+      <if test="teacher_name != null" >
+        teacher_name,
+      </if>
+      <if test="teacher_sex != null" >
+        teacher_sex,
+      </if>
+      <if test="teacher_birthday != null" >
+        teacher_birthday,
+      </if>
+      <if test="teacher_working_age != null" >
+        teacher_working_age,
+      </if>
+      <if test="teacher_status != null" >
+        teacher_status,
+      </if>
+      <if test="teacher_address != null" >
+        teacher_address,
+      </if>
+      <if test="teacher_entry != null" >
+        teacher_entry,
+      </if>
+      <if test="teacher_honor != null" >
+        teacher_honor,
+      </if>
+      <if test="teacher_remarks != null" >
+        teacher_remarks,
+      </if>
+      <if test="teacher_photo != null" >
+        teacher_photo,
+      </if>
+      <if test="teacher_experience != null" >
+        teacher_experience,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="user_id != null" >
+        #{user_id,jdbcType=BIGINT},
+      </if>
+      <if test="openid != null" >
+        #{openid,jdbcType=VARCHAR},
+      </if>
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+      <if test="teacher_number != null" >
+        #{teacher_number,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_name != null" >
+        #{teacher_name,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_sex != null" >
+        #{teacher_sex,jdbcType=INTEGER},
+      </if>
+      <if test="teacher_birthday != null" >
+        #{teacher_birthday,jdbcType=DATE},
+      </if>
+      <if test="teacher_working_age != null" >
+        #{teacher_working_age,jdbcType=DOUBLE},
+      </if>
+      <if test="teacher_status != null" >
+        #{teacher_status,jdbcType=INTEGER},
+      </if>
+      <if test="teacher_address != null" >
+        #{teacher_address,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_entry != null" >
+        #{teacher_entry,jdbcType=DATE},
+      </if>
+      <if test="teacher_honor != null" >
+        #{teacher_honor,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_remarks != null" >
+        #{teacher_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_photo != null" >
+        #{teacher_photo,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_experience != null" >
+        #{teacher_experience,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.SysTeacher" >
+    update sys_teacher
+    <set >
+      <if test="user_id != null" >
+        user_id = #{user_id,jdbcType=BIGINT},
+      </if>
+      <if test="openid != null" >
+        openid = #{openid,jdbcType=VARCHAR},
+      </if>
+      <if test="school_id != null" >
+        school_id = #{school_id,jdbcType=BIGINT},
+      </if>
+      <if test="teacher_number != null" >
+        teacher_number = #{teacher_number,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_name != null" >
+        teacher_name = #{teacher_name,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_sex != null" >
+        teacher_sex = #{teacher_sex,jdbcType=INTEGER},
+      </if>
+      <if test="teacher_birthday != null" >
+        teacher_birthday = #{teacher_birthday,jdbcType=DATE},
+      </if>
+      <if test="teacher_working_age != null" >
+        teacher_working_age = #{teacher_working_age,jdbcType=DOUBLE},
+      </if>
+      <if test="teacher_status != null" >
+        teacher_status = #{teacher_status,jdbcType=INTEGER},
+      </if>
+      <if test="teacher_address != null" >
+        teacher_address = #{teacher_address,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_entry != null" >
+        teacher_entry = #{teacher_entry,jdbcType=DATE},
+      </if>
+      <if test="teacher_honor != null" >
+        teacher_honor = #{teacher_honor,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_remarks != null" >
+        teacher_remarks = #{teacher_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_photo != null" >
+        teacher_photo = #{teacher_photo,jdbcType=VARCHAR},
+      </if>
+      <if test="teacher_experience != null" >
+        teacher_experience = #{teacher_experience,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where teacher_id = #{teacher_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.smartschool.school.po.SysTeacher" >
+    update sys_teacher
+    set user_id = #{user_id,jdbcType=BIGINT},
+      openid = #{openid,jdbcType=VARCHAR},
+      school_id = #{school_id,jdbcType=BIGINT},
+      teacher_number = #{teacher_number,jdbcType=VARCHAR},
+      teacher_name = #{teacher_name,jdbcType=VARCHAR},
+      teacher_sex = #{teacher_sex,jdbcType=INTEGER},
+      teacher_birthday = #{teacher_birthday,jdbcType=DATE},
+      teacher_working_age = #{teacher_working_age,jdbcType=DOUBLE},
+      teacher_status = #{teacher_status,jdbcType=INTEGER},
+      teacher_address = #{teacher_address,jdbcType=VARCHAR},
+      teacher_entry = #{teacher_entry,jdbcType=DATE},
+      teacher_honor = #{teacher_honor,jdbcType=VARCHAR},
+      teacher_remarks = #{teacher_remarks,jdbcType=VARCHAR},
+      teacher_photo = #{teacher_photo,jdbcType=LONGVARCHAR},
+      teacher_experience = #{teacher_experience,jdbcType=LONGVARCHAR}
+    where teacher_id = #{teacher_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.SysTeacher" >
+    update sys_teacher
+    set user_id = #{user_id,jdbcType=BIGINT},
+      openid = #{openid,jdbcType=VARCHAR},
+      school_id = #{school_id,jdbcType=BIGINT},
+      teacher_number = #{teacher_number,jdbcType=VARCHAR},
+      teacher_name = #{teacher_name,jdbcType=VARCHAR},
+      teacher_sex = #{teacher_sex,jdbcType=INTEGER},
+      teacher_birthday = #{teacher_birthday,jdbcType=DATE},
+      teacher_working_age = #{teacher_working_age,jdbcType=DOUBLE},
+      teacher_status = #{teacher_status,jdbcType=INTEGER},
+      teacher_address = #{teacher_address,jdbcType=VARCHAR},
+      teacher_entry = #{teacher_entry,jdbcType=DATE},
+      teacher_honor = #{teacher_honor,jdbcType=VARCHAR},
+      teacher_remarks = #{teacher_remarks,jdbcType=VARCHAR}
+    where teacher_id = #{teacher_id,jdbcType=BIGINT}
+  </update>
+
+  <select id="selectByConditon" resultMap="BaseResultMap">
+    select * from sys_teacher
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="schoolId != null">
+        and school_id=#{schoolId}
+      </if>
+    </where>
+    ORDER BY teacher_id DESC
+  </select>
+
+  <resultMap id="detailMap" type="com.usoftchina.smartschool.school.po.TeacherDetail" >
+    <id column="teacher_id" property="teacher_id" jdbcType="BIGINT" />
+    <result column="grade" property="grade" jdbcType="VARCHAR" />
+    <result column="classes" property="classes" jdbcType="VARCHAR" />
+    <result column="subject" property="subject" jdbcType="VARCHAR" />
+  </resultMap>
+
+  <select id="selectDetail" parameterType="long" resultMap="detailMap">
+    select  sys_grade.grade_name grade,sys_clazz.clazz_name classes,subject.subject_name subject
+from sys_teacher_clazz left join subject on sys_teacher_clazz.subject_id = subject.subject_id
+left join sys_clazz on sys_teacher_clazz.clazz_id = sys_clazz.clazz_id
+left join sys_grade on sys_grade.grade_id=sys_clazz.grade_id
+where sys_teacher_clazz.teacher_id=#{id}
+  </select>
+</mapper>

+ 0 - 15
applications/school/school.iml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 0 - 15
applications/websocket/websocket-api/websocket-api.iml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 0 - 246
applications/websocket/websocket-server/websocket-server.iml

@@ -1,246 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration />
-    </facet>
-    <facet type="web" name="Web">
-      <configuration>
-        <webroots />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="server-starter" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.10" level="project" />
-    <orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.11.Final" level="project" />
-    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.0.8.RELEASE" level="project" />
-    <orderEntry type="module" module-name="core" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
-    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
-    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
-    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
-    <orderEntry type="module" module-name="test-starter" scope="TEST" />
-    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:6.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.5" level="project" />
-    <orderEntry type="library" name="Maven: tk.mybatis:mapper:3.4.2" level="project" />
-    <orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-zipkin:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-sleuth:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave:5.1.0" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-context-log4j2:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-web:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-http:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-rabbit:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-kafka-clients:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpclient:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpasyncclient:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-webmvc:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-servlet:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-zipkin:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.zipkin2:zipkin:2.11.1" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-reporter:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-kafka11:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-amqp-client:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.1.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.2.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: net.logstash.logback:logstash-logback-encoder:4.11" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.22" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.7" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.0" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.7.9" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.7" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.6" level="project" />
-    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.0.7.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-java8:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-client:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.jettison:jettison:1.3.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: stax:stax-api:1.0.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: joda-time:joda-time:2.9.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-math:2.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.inject:guice:4.1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: aopalliance:aopalliance:1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.vlsi.compactmap:compactmap:1.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.andrewoma.dexx:dexx-collections:0.2" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-core:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.4.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
-    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-codec-http:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-unix-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-eureka:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.10" level="project" />
-    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-websocket:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-websocket:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
-    <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.springframework.boot:spring-boot-devtools:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.44" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.9.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.15.0" level="project" />
-    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.7.11" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.7.11" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.5.1" level="project" />
-  </component>
-</module>

+ 0 - 12
applications/websocket/websocket.iml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 0 - 21
applications/wechat/wechat-api/wechat-api.iml

@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
-    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.22" level="project" />
-    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.9" level="project" />
-    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
-  </component>
-</module>

+ 0 - 213
applications/wechat/wechat-server/wechat-server.iml

@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration />
-    </facet>
-    <facet type="web" name="Web">
-      <configuration>
-        <webroots />
-        <sourceRoots>
-          <root url="file://$MODULE_DIR$/src/main/java" />
-          <root url="file://$MODULE_DIR$/src/main/resources" />
-        </sourceRoots>
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="server-starter" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.10" level="project" />
-    <orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.11.Final" level="project" />
-    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.0.8.RELEASE" level="project" />
-    <orderEntry type="module" module-name="core" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
-    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
-    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
-    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
-    <orderEntry type="module" module-name="test-starter" scope="TEST" />
-    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:6.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.0" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.7.9" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.5" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-zipkin:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-sleuth:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave:5.1.0" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-context-log4j2:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-web:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-http:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-rabbit:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-kafka-clients:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpclient:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpasyncclient:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-webmvc:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-servlet:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-zipkin:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.zipkin2:zipkin:2.11.1" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-reporter:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-kafka11:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-amqp-client:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.1.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.2.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: net.logstash.logback:logstash-logback-encoder:4.11" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.22" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.7" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.7" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.6" level="project" />
-    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.0.7.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-java8:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-client:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.jettison:jettison:1.3.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: stax:stax-api:1.0.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: joda-time:joda-time:2.9.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-math:2.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.inject:guice:4.1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: aopalliance:aopalliance:1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.vlsi.compactmap:compactmap:1.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.andrewoma.dexx:dexx-collections:0.2" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-core:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.4.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
-    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-codec-http:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-unix-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-eureka:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.10" level="project" />
-    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
-  </component>
-</module>

+ 0 - 15
applications/wechat/wechat.iml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 35 - 0
base-servers/account/account-api/pom.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>account</artifactId>
+    <groupId>com.usoftchina.smartschool</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.usoftchina.smartschool</groupId>
+  <artifactId>account-api</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-openfeign</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.usoftchina.smartschool</groupId>
+      <artifactId>account-dto</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>com.usoftchina.smartschool</groupId>
+      <artifactId>core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-data-redis</artifactId>
+    </dependency>
+  </dependencies>
+</project>

+ 21 - 0
base-servers/account/account-api/src/main/java/com/usoftchina/smartschool/account/api/AccountApi.java

@@ -0,0 +1,21 @@
+package com.usoftchina.smartschool.account.api;
+
+import com.usoftchina.smartschool.account.dto.AccountDTO;
+import com.usoftchina.smartschool.base.Result;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/22
+ */
+@FeignClient(name = "account-server")
+public interface AccountApi {
+
+    @GetMapping(value = "/account/read", params = "mobile")
+    Result<AccountDTO> findByMobile(@RequestParam("mobile") String mobile);
+
+    @GetMapping(value = "/pwd/check")
+    Result<AccountDTO> checkPwd(@RequestParam(value = "username") String username, @RequestParam(value = "password") String password);
+}

+ 16 - 0
base-servers/account/account-dto/pom.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>account</artifactId>
+    <groupId>com.usoftchina.smartschool</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.usoftchina.smartschool</groupId>
+  <artifactId>account-dto</artifactId>
+
+
+</project>

+ 58 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/smartschool/account/dto/AccountDTO.java

@@ -0,0 +1,58 @@
+package com.usoftchina.smartschool.account.dto;
+
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/22
+ */
+public class AccountDTO implements Serializable {
+
+    private Long id;
+    private String user_phone;
+    private String user_code;
+    private String salt;
+    private List<RoleDTO> roleMaps;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getUser_phone() {
+        return user_phone;
+    }
+
+    public void setUser_phone(String user_phone) {
+        this.user_phone = user_phone;
+    }
+
+    public String getUser_code() {
+        return user_code;
+    }
+
+    public void setUser_code(String user_code) {
+        this.user_code = user_code;
+    }
+
+    public String getSalt() {
+        return salt;
+    }
+
+    public void setSalt(String salt) {
+        this.salt = salt;
+    }
+
+    public List<RoleDTO> getRoleMaps() {
+        return roleMaps;
+    }
+
+    public void setRoleMaps(List<RoleDTO> roleMaps) {
+        this.roleMaps = roleMaps;
+    }
+}

+ 59 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/smartschool/account/dto/AccountRegDTO.java

@@ -0,0 +1,59 @@
+package com.usoftchina.smartschool.account.dto;
+
+import java.io.Serializable;
+
+/**
+ * @Description 账户注册
+ * @Author chenwei
+ * @Date 2019/01/22
+ */
+public class AccountRegDTO implements Serializable {
+    /**
+     * 手机号(用户名)
+     */
+    private String user_phone;
+    /**
+     * 密码
+     */
+    private String user_pass;
+    /**
+     * 编号
+     */
+    private String user_code;
+    /**
+     * 角色ID
+     */
+    private Long roleId;
+
+    public String getUser_phone() {
+        return user_phone;
+    }
+
+    public void setUser_phone(String user_phone) {
+        this.user_phone = user_phone;
+    }
+
+    public String getUser_pass() {
+        return user_pass;
+    }
+
+    public void setUser_pass(String user_pass) {
+        this.user_pass = user_pass;
+    }
+
+    public String getUser_code() {
+        return user_code;
+    }
+
+    public void setUser_code(String user_code) {
+        this.user_code = user_code;
+    }
+
+    public Long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(Long roleId) {
+        this.roleId = roleId;
+    }
+}

+ 72 - 0
base-servers/account/account-server/pom.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>account</artifactId>
+    <groupId>com.usoftchina.smartschool</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.usoftchina.smartschool</groupId>
+  <artifactId>account-server</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.usoftchina.smartschool</groupId>
+      <artifactId>server-starter</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.usoftchina.smartschool</groupId>
+      <artifactId>file-api</artifactId>
+    </dependency>
+    <!-- db -->
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.mybatis.spring.boot</groupId>
+      <artifactId>mybatis-spring-boot-starter</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.github.pagehelper</groupId>
+      <artifactId>pagehelper-spring-boot-starter</artifactId>
+    </dependency>
+    <!-- sleuth -->
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-zipkin</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.amqp</groupId>
+      <artifactId>spring-rabbit</artifactId>
+    </dependency>
+    <!-- test -->
+    <dependency>
+      <groupId>com.usoftchina.saas</groupId>
+      <artifactId>test-starter</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.usoftchina.smartschool</groupId>
+      <artifactId>account-dto</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-maven-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>com.spotify</groupId>
+        <artifactId>docker-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

+ 6 - 0
base-servers/account/account-server/src/main/docker/Dockerfile

@@ -0,0 +1,6 @@
+FROM frolvlad/alpine-oraclejdk8:slim
+VOLUME /tmp
+ADD account-server-1.0.0-SNAPSHOT.jar app.jar
+RUN sh -c 'touch /app.jar'
+ENV JAVA_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]

+ 22 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/AccountApplication.java

@@ -0,0 +1,22 @@
+package com.usoftchina.smartschool.account;
+
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * @author yingp
+ * @date 2018/10/2
+ */
+@SpringBootApplication
+@EnableEurekaClient
+@EnableTransactionManagement
+@MapperScan(basePackages = "com.usoftchina.smartschool.account.mapper")
+public class AccountApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(AccountApplication.class, args);
+    }
+}

+ 95 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/controller/AccountController.java

@@ -0,0 +1,95 @@
+package com.usoftchina.smartschool.account.controller;
+
+import com.usoftchina.smartschool.account.dto.AccountDTO;
+import com.usoftchina.smartschool.account.dto.AccountRegDTO;
+import com.usoftchina.smartschool.account.po.Account;
+import com.usoftchina.smartschool.account.service.AccountService;
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.context.BaseContextHolder;
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.exception.ExceptionCode;
+import com.usoftchina.smartschool.utils.BeanMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/22
+ */
+@RestController
+@RequestMapping("/account")
+public class AccountController {
+
+    @Autowired
+    private AccountService accountService;
+
+    /**
+     * 注册
+     * @param accountRegDTO
+     * @return
+     */
+    @PostMapping("/register")
+    public Result register(@RequestBody AccountRegDTO accountRegDTO){
+        //校验用户是否已存在
+        AccountDTO accountDTO = accountService.findByMobile(accountRegDTO.getUser_phone());
+        if (accountDTO != null) {
+            return Result.error(ExceptionCode.USER_NAME_EXIST);
+        }
+        Account account = BeanMapper.map(accountRegDTO, Account.class);
+        account.setSalt(accountDTO.getUser_phone());
+        account.setUser_pass(accountService.getEncryptedPassword(accountRegDTO.getUser_pass(), account.getSalt()));
+        //保存账户
+        accountService.save(account);
+        //绑定角色
+        accountService.bindRole(account.getId(), accountRegDTO.getRoleId());
+
+        return Result.success();
+    }
+
+    /**
+     * 通过手机号查找账户信息
+     * @param mobile
+     * @return
+     */
+    @GetMapping(value = "/read", params = "mobile")
+    public Result<AccountDTO> findByMobile(@RequestParam("mobile") String mobile){
+        AccountDTO accountDTO = accountService.findByMobile(mobile);
+        return Result.success(accountDTO);
+    }
+
+    /**
+     * 校验用户名密码
+     * @param username
+     * @param password
+     * @return
+     */
+    @GetMapping(value = "/pwd/check")
+    public Result<AccountDTO> checkPwd(@RequestParam(value = "username") String username, @RequestParam(value = "password") String password){
+        AccountDTO accountDTO = accountService.findByMobile(username);
+        if (null == accountDTO){
+            return Result.error(ExceptionCode.USER_NOT_EXIST);
+        }
+        boolean checked = accountService.checkPwd(username, password);
+        if (!checked){
+            return Result.error(ExceptionCode.USER_PWD_ERROR);
+        }
+        return Result.success(accountService.findByMobile(username));
+    }
+
+    /**
+     * 重置密码
+     * @param password
+     * @return
+     */
+    @PostMapping("/password/reset")
+    public Result resetPassword(@RequestParam("password") String password){
+        Account account = accountService.findByPrimaryKey(BaseContextHolder.getUserId());
+        if (null == account) {
+            return Result.error(ExceptionCode.USER_NOT_EXIST);
+        }
+        account.setUser_pass(accountService.getEncryptedPassword(password, account.getSalt()));
+        accountService.updateByPrimaryKeySelective(account);
+        return Result.success();
+    }
+
+}

+ 51 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/mapper/AccountMapper.java

@@ -0,0 +1,51 @@
+package com.usoftchina.smartschool.account.mapper;
+
+import com.usoftchina.smartschool.account.po.Account;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/22
+ */
+public interface AccountMapper {
+
+    /**
+     * 保存非空数据
+     * @param account
+     * @return
+     */
+    int insertSelective(Account account);
+
+    /**
+     * 按主键更新
+     *
+     * @param account
+     * @return
+     */
+    int updateByPrimaryKey(Account account);
+
+    /**
+     * 按主键更新非空字段
+     *
+     * @param account
+     * @return
+     */
+    int updateByPrimaryKeySelective(Account account);
+
+    /**
+     * 按ID查找
+     *
+     * @param id
+     * @return
+     */
+    Account selectByPrimaryKey(@Param("id") Long id);
+
+    /**
+     * 按手机号查找
+     *
+     * @param mobile
+     * @return
+     */
+    Account selectByMobile(@Param("mobile") String mobile);
+
+}

+ 15 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/mapper/AccountRoleMapper.java

@@ -0,0 +1,15 @@
+package com.usoftchina.smartschool.account.mapper;
+
+import com.usoftchina.smartschool.account.dto.RoleDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface AccountRoleMapper {
+
+    List<RoleDTO> selectByAccountId(@Param("id") Long id);
+
+    void bindRole(@Param("accountId") Long accountId, @Param("roleId") Long roleId);
+
+    void unbindRole(@Param("accountId") Long accountId, @Param("roleId") Long roleId);
+}

+ 54 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/po/Account.java

@@ -0,0 +1,54 @@
+package com.usoftchina.smartschool.account.po;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/22
+ */
+public class Account {
+
+    private Long id;
+    private String user_phone;
+    private String user_pass;
+    private String user_code;
+    private String salt;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getUser_phone() {
+        return user_phone;
+    }
+
+    public void setUser_phone(String user_phone) {
+        this.user_phone = user_phone;
+    }
+
+    public String getUser_pass() {
+        return user_pass;
+    }
+
+    public void setUser_pass(String user_pass) {
+        this.user_pass = user_pass;
+    }
+
+    public String getUser_code() {
+        return user_code;
+    }
+
+    public void setUser_code(String user_code) {
+        this.user_code = user_code;
+    }
+
+    public String getSalt() {
+        return salt;
+    }
+
+    public void setSalt(String salt) {
+        this.salt = salt;
+    }
+}

+ 59 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/service/AccountService.java

@@ -0,0 +1,59 @@
+package com.usoftchina.smartschool.account.service;
+
+import com.usoftchina.smartschool.account.dto.AccountDTO;
+import com.usoftchina.smartschool.account.po.Account;
+
+public interface AccountService {
+
+    /**
+     * 注册
+     * @return
+     */
+    AccountDTO save(Account account);
+
+    /**
+     * 通过手机号查找用户
+     * @param mobile
+     * @return
+     */
+    AccountDTO findByMobile(String mobile);
+
+    /**
+     * 通过主键查找用户
+     * @param id
+     * @return
+     */
+    Account findByPrimaryKey(Long id);
+
+    /**
+     * 密码加密
+     * @param password
+     * @param salt
+     * @return
+     */
+    String getEncryptedPassword(String password, String salt);
+
+    /**
+     * 根据主键更新
+     * @param account
+     * @return
+     */
+    boolean updateByPrimaryKeySelective(Account account);
+
+    /**
+     * 账户绑定角色
+     * @param accountId
+     * @param roleId
+     */
+    void bindRole(Long accountId, Long roleId);
+
+    /**
+     * 校验密码
+     *
+     * @param username
+     * @param plainPassword
+     * @return
+     */
+    boolean checkPwd(String username, String plainPassword);
+
+}

+ 67 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/smartschool/account/service/impl/AccountServiceImpl.java

@@ -0,0 +1,67 @@
+package com.usoftchina.smartschool.account.service.impl;
+
+import com.usoftchina.smartschool.account.dto.AccountDTO;
+import com.usoftchina.smartschool.account.dto.RoleDTO;
+import com.usoftchina.smartschool.account.mapper.AccountMapper;
+import com.usoftchina.smartschool.account.mapper.AccountRoleMapper;
+import com.usoftchina.smartschool.account.po.Account;
+import com.usoftchina.smartschool.account.service.AccountService;
+import com.usoftchina.smartschool.utils.BeanMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.DigestUtils;
+
+import java.util.List;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/22
+ */
+@Service
+public class AccountServiceImpl implements AccountService {
+
+    @Autowired
+    private AccountMapper accountMapper;
+    @Autowired
+    private AccountRoleMapper accountRoleMapper;
+
+    @Override
+    public AccountDTO save(Account account) {
+        return null;
+    }
+
+    @Override
+    public AccountDTO findByMobile(String mobile) {
+        Account account = accountMapper.selectByMobile(mobile);
+        AccountDTO accountDTO = BeanMapper.map(account, AccountDTO.class);
+        List<RoleDTO> roleDTOList = accountRoleMapper.selectByAccountId(account.getId());
+        accountDTO.setRoleMaps(roleDTOList);
+        return accountDTO;
+    }
+
+    @Override
+    public Account findByPrimaryKey(Long id) {
+        return accountMapper.selectByPrimaryKey(id);
+    }
+
+    @Override
+    public String getEncryptedPassword(String password, String salt) {
+        return DigestUtils.md5DigestAsHex(String.format("%s{%s}", password, salt).getBytes());
+    }
+
+    @Override
+    public boolean updateByPrimaryKeySelective(Account account) {
+        return accountMapper.updateByPrimaryKeySelective(account) > 0;
+    }
+
+    @Override
+    public void bindRole(Long accountId, Long roleId) {
+        accountRoleMapper.bindRole(accountId, roleId);
+    }
+
+    @Override
+    public boolean checkPwd(String username, String plainPassword) {
+        Account account = accountMapper.selectByMobile(username);
+        return getEncryptedPassword(plainPassword, account.getSalt()).equals(account.getUser_pass());
+    }
+}

+ 91 - 0
base-servers/account/account-server/src/main/resources/application.yml

@@ -0,0 +1,91 @@
+spring:
+  application:
+    name: account-server
+  security:
+    user:
+      name: admin
+      password: select111***
+  datasource:
+    driver-class-name: com.mysql.jdbc.Driver
+    url: jdbc:mysql://10.10.100.166:3306/school?characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
+    username: root
+    password: select111***
+    hikari:
+      minimum-idle: 5
+      maximum-pool-size: 50
+      idle-timeout: 30000
+      max-lifetime: 1800000
+      connection-timeout: 30000
+  messages:
+    basename: i18n/messages
+    encoding: UTF-8
+  rabbitmq:
+    host: 10.10.100.166
+    port: 3306
+    virtual-host: school
+    username: root
+    password: select111***
+  zipkin:
+    sender:
+      type: rabbit
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      probability: 1.0
+  redis:
+    host: 10.1.81.62
+    port: 6379
+  profiles:
+    active: dev
+eureka:
+  instance:
+    leaseRenewalIntervalInSeconds: 10
+    health-check-url-path: /actuator/health
+    status-page-url-path: /actuator/info
+    metadata-map:
+      user.name: ${spring.security.user.name}
+      user.password: ${spring.security.user.password}
+  client:
+    registryFetchIntervalSeconds: 5
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:9500/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
+server:
+  port: 9700
+  tomcat:
+    uri-encoding: UTF-8
+info:
+  name: '@project.artifactId@'
+  description: '@project.description@'
+  version: '@project.version@'
+  spring-boot-version: '@spring.boot.version@'
+  spring-cloud-version: '@spring.cloud.version@'
+mybatis:
+  type-aliases-package: com.usoftchina.smartschool.account.po
+  mapper-locations: classpath:mapper/*.xml
+auth:
+  public-key: auth/pub.key
+ribbon:
+  ReadTimeout: 10000
+  ConnectTimeout: 10000
+feign:
+  hystrix:
+    enabled: true
+hystrix:
+    command:
+        default:
+            execution:
+              timeout:
+                enabled: true
+              isolation:
+                    thread:
+                        timeoutInMilliseconds: 4000

+ 52 - 0
base-servers/account/account-server/src/main/resources/mapper/AccountMapper.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.smartschool.account.mapper.AccountMapper">
+  <select id="selectByPrimaryKey" resultType="com.usoftchina.smartschool.account.po.Account">
+    SELECT * FROM SYS_USER WHERE USER_ID = #{id}
+  </select>
+  <select id="selectByMobile" resultType="com.usoftchina.smartschool.account.dto.AccountDTO">
+    select users.user_id id, users.user_phone, users.user_code
+    from sys_user users
+    where user_phone = #{mobile};
+  </select>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.account.po.Account">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into sys_user
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="user_phone != null">
+        user_phone,
+      </if>
+      <if test="user_pass != null">
+        user_pass,
+      </if>
+      <if test="user_code != null">
+        user_code,
+      </if>
+      <if test="salt != null">
+        salt,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="user_phone != null">
+        #{user_phone,jdbcType=VARCHAR},
+      </if>
+      <if test="user_pass != null">
+        #{user_pass,jdbcType=VARCHAR},
+      </if>
+      <if test="user_code != null">
+        #{user_code,jdbcType=VARCHAR},
+      </if>
+      <if test="salt != null">
+        #{salt,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey">
+
+  </update>
+  <update id="updateByPrimaryKeySelective">
+
+  </update>
+</mapper>

+ 17 - 0
base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.smartschool.account.mapper.AccountRoleMapper">
+  <select id="selectByAccountId" parameterType="int" resultType="com.usoftchina.smartschool.account.dto.RoleDTO">
+    select sys_role.role_id,sys_role.role_name,sys_role.role_sign,sys_role.create_date,sys_role.role_remarks,sys_teacher.school_id
+    from sys_user_role
+    left join sys_teacher on sys_teacher.user_id = sys_user_role.user_id
+    left join sys_role on sys_role.role_id = sys_user_role.role_id
+    where sys_user_role.user_id = #{id}
+  </select>
+  <insert id="bindRole">
+    insert into sys_user_role(user_id, role_id) values(#{accountId}, #{roleId})
+  </insert>
+  <delete id="unbindRole">
+    delete from sys_user_role where user_id = #{accountId} and role_id = #{roleId}
+  </delete>
+</mapper>

+ 0 - 15
base-servers/account/account.iml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 6 - 0
base-servers/account/pom.xml

@@ -10,6 +10,12 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>account</artifactId>
+  <packaging>pom</packaging>
+  <modules>
+    <module>account-server</module>
+    <module>account-api</module>
+    <module>account-dto</module>
+  </modules>
 
 
 </project>

+ 17 - 0
base-servers/auth/auth-api/pom.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>auth</artifactId>
+    <groupId>com.usoftchina.smartschool</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.usoftchina.smartschool</groupId>
+  <artifactId>auth-api</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+
+
+</project>

+ 60 - 0
base-servers/auth/auth-dto/pom.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>auth</artifactId>
+    <groupId>com.usoftchina.smartschool</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.usoftchina.smartschool</groupId>
+  <artifactId>auth-dto</artifactId>
+  <properties>
+    <jjwt.version>0.7.0</jjwt.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.usoftchina.smartschool</groupId>
+      <artifactId>account-dto</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>io.jsonwebtoken</groupId>
+      <artifactId>jjwt</artifactId>
+      <version>${jjwt.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-netflix-core</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.usoftchina.smartschool</groupId>
+      <artifactId>core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>joda-time</groupId>
+      <artifactId>joda-time</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-bus-amqp</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>javax.servlet-api</artifactId>
+      <scope>compile</scope>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+
+</project>

+ 46 - 0
base-servers/auth/auth-dto/src/main/java/com/usoftchina/smartschool/auth/dto/AuthDTO.java

@@ -0,0 +1,46 @@
+package com.usoftchina.smartschool.auth.dto;
+
+import com.usoftchina.smartschool.account.dto.AccountDTO;
+
+import java.io.Serializable;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/22
+ */
+public class AuthDTO implements Serializable {
+
+    private TokenDTO token;
+    private AccountDTO account;
+
+    public TokenDTO getToken() {
+        return token;
+    }
+
+    public void setToken(TokenDTO token) {
+        this.token = token;
+    }
+
+    public AccountDTO getAccount() {
+        return account;
+    }
+
+    public void setAccount(AccountDTO account) {
+        this.account = account;
+    }
+    public AuthDTO() {
+    }
+
+    public AuthDTO(TokenDTO token, AccountDTO account) {
+        this.token = token;
+        this.account = account;
+    }
+
+    @Override
+    public String toString() {
+        return "AuthDTO{" +
+                "token=" + token +
+                ", account=" + account +
+                '}';
+    }
+}

+ 45 - 0
base-servers/auth/auth-dto/src/main/java/com/usoftchina/smartschool/auth/dto/TokenDTO.java

@@ -0,0 +1,45 @@
+package com.usoftchina.smartschool.auth.dto;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/22
+ */
+public class TokenDTO {
+
+    /**
+     * token
+     */
+    private String token;
+    /**
+     * 有效时间:单位:秒
+     */
+    private Integer expire;
+    /**
+     * 产生时间
+     */
+    private Long timestamp;
+
+    public String getToken() {
+        return token;
+    }
+
+    public void setToken(String token) {
+        this.token = token;
+    }
+
+    public Integer getExpire() {
+        return expire;
+    }
+
+    public void setExpire(Integer expire) {
+        this.expire = expire;
+    }
+
+    public Long getTimestamp() {
+        return timestamp;
+    }
+
+    public void setTimestamp(Long timestamp) {
+        this.timestamp = timestamp;
+    }
+}

+ 102 - 0
base-servers/auth/auth-dto/src/main/java/com/usoftchina/smartschool/auth/jwt/JwtHelper.java

@@ -0,0 +1,102 @@
+package com.usoftchina.smartschool.auth.jwt;
+
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.exception.ExceptionCode;
+import com.usoftchina.smartschool.utils.ObjectUtils;
+import com.usoftchina.smartschool.utils.RsaUtils;
+import io.jsonwebtoken.*;
+import org.joda.time.DateTime;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.InvalidKeySpecException;
+
+/**
+ * @author yingp
+ * @date 2018/10/2
+ */
+public class JwtHelper {
+
+    private static final Logger log = LoggerFactory.getLogger(JwtHelper.class);
+
+    /**
+     * 密钥加密token
+     *
+     * @param jwtInfo    jwt 帐号信息
+     * @param priKeyPath 私钥地址
+     * @param expire     过期时间
+     * @return
+     * @throws Exception
+     */
+    public static JwtToken generateToken(JwtInfo jwtInfo, String priKeyPath, int expire) throws BizException {
+        try {
+            String compactJws =
+                    // 返回的字符串便是我们的jwt串了
+                    Jwts.builder()
+                            // 设置主题
+                            .setSubject(jwtInfo.getUserName())
+                            .claim("appId", jwtInfo.getAppId())
+                            .claim("userId", jwtInfo.getUserId())
+                            .claim("userName", jwtInfo.getUserName())
+                            .setExpiration(DateTime.now().plusSeconds(expire).toDate())
+                            // 设置算法(必须)
+                            .signWith(SignatureAlgorithm.RS256, RsaUtils.getPrivateKey(priKeyPath))
+                            // 这个是全部设置完成后拼成jwt串的方法
+                            .compact();
+            return new JwtToken(compactJws, expire);
+        } catch (IOException | NoSuchAlgorithmException | InvalidKeySpecException e) {
+            log.error(e.getMessage());
+            throw new BizException(ExceptionCode.JWT_GEN_TOKEN_FAIL.getCode(), ExceptionCode.JWT_GEN_TOKEN_FAIL.getMessage());
+        }
+    }
+
+    /**
+     * 公钥解析token
+     *
+     * @param token
+     * @param pubKeyPath 公钥路径
+     * @return
+     * @throws Exception
+     */
+    private static Jws<Claims> parserToken(String token, String pubKeyPath) throws BizException {
+        try {
+            return Jwts.parser().setSigningKey(RsaUtils.getPublicKey(pubKeyPath)).parseClaimsJws(token);
+        } catch (ExpiredJwtException ex) {
+            log.error("ExpiredJwtException:", ex);
+            //过期
+            throw new BizException(ExceptionCode.JWT_TOKEN_EXPIRED.getCode(), ExceptionCode.JWT_TOKEN_EXPIRED.getMessage());
+        } catch (SignatureException ex) {
+            log.error("SignatureException:", ex);
+            //签名错误
+            throw new BizException(ExceptionCode.JWT_SIGNATURE.getCode(), ExceptionCode.JWT_SIGNATURE.getMessage());
+        } catch (IllegalArgumentException ex) {
+            log.error("IllegalArgumentException:", ex);
+            //token 为空
+            throw new BizException(ExceptionCode.JWT_ILLEGAL_ARGUMENT.getCode(), ExceptionCode.JWT_ILLEGAL_ARGUMENT.getMessage());
+        } catch (Exception e) {
+            log.error("message:", e);
+            throw new BizException(ExceptionCode.JWT_PARSER_TOKEN_FAIL.getCode(), ExceptionCode.JWT_PARSER_TOKEN_FAIL.getMessage());
+        }
+    }
+
+    /**
+     * 获取token中的用户信息
+     *
+     * @param token      token
+     * @param pubKeyPath 公钥路径
+     * @return
+     * @throws Exception
+     */
+    public static JwtInfo getInfoFromToken(String token, String pubKeyPath) throws BizException {
+        Jws<Claims> claimsJws = parserToken(token, pubKeyPath);
+        Claims body = claimsJws.getBody();
+        return new JwtInfo(
+                ObjectUtils.getStringValue(body.get("appId")),
+                ObjectUtils.getLongValue(body.get("school_id")),
+                ObjectUtils.getLongValue(body.get("userId")),
+                ObjectUtils.getStringValue(body.get("userName"))
+        );
+    }
+}

+ 56 - 0
base-servers/auth/auth-dto/src/main/java/com/usoftchina/smartschool/auth/jwt/JwtInfo.java

@@ -0,0 +1,56 @@
+package com.usoftchina.smartschool.auth.jwt;
+
+import java.io.Serializable;
+
+/**
+ * @author yingp
+ * @date 2018/10/2
+ */
+public class JwtInfo implements Serializable{
+    private String appId;
+    private Long school_id;
+    private Long userId;
+    private String userName;
+
+    public JwtInfo() {
+    }
+
+    public JwtInfo(String appId, Long school_id, Long userId, String userName) {
+        this.appId = appId;
+        this.school_id = school_id;
+        this.userId = userId;
+        this.userName = userName;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+}

+ 65 - 0
base-servers/auth/auth-dto/src/main/java/com/usoftchina/smartschool/auth/jwt/JwtToken.java

@@ -0,0 +1,65 @@
+package com.usoftchina.smartschool.auth.jwt;
+
+import java.io.Serializable;
+
+/**
+ * @author yingp
+ * @date 2018/10/2
+ */
+public class JwtToken implements Serializable {
+    /**
+     * token
+     */
+    private String token;
+    /**
+     * 有效时间:单位:秒
+     */
+    private Integer expire;
+
+    private Long timestamp;
+
+    public JwtToken(String token, Integer expire) {
+        this.token = token;
+        this.expire = expire;
+        this.timestamp = System.currentTimeMillis();
+    }
+
+    public JwtToken(String token, Integer expire, Long timestamp) {
+        this.token = token;
+        this.expire = expire;
+        this.timestamp = timestamp;
+    }
+
+    public String getToken() {
+        return token;
+    }
+
+    public void setToken(String token) {
+        this.token = token;
+    }
+
+    public Integer getExpire() {
+        return expire;
+    }
+
+    public void setExpire(Integer expire) {
+        this.expire = expire;
+    }
+
+    public Long getTimestamp() {
+        return timestamp;
+    }
+
+    public void setTimestamp(Long timestamp) {
+        this.timestamp = timestamp;
+    }
+
+    @Override
+    public String toString() {
+        return "JwtToken{" +
+                "token='" + token + '\'' +
+                ", expire=" + expire +
+                ", timestamp=" + timestamp +
+                '}';
+    }
+}

+ 77 - 0
base-servers/auth/auth-server/pom.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>auth</artifactId>
+    <groupId>com.usoftchina.smartschool</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.usoftchina.smartschool</groupId>
+  <artifactId>auth-server</artifactId>
+  <description>authentication server</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.usoftchina.smartschool</groupId>
+      <artifactId>auth-dto</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>com.usoftchina.smartschool</groupId>
+      <artifactId>server-starter</artifactId>
+    </dependency>
+    <!-- db -->
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.mybatis.spring.boot</groupId>
+      <artifactId>mybatis-spring-boot-starter</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.github.pagehelper</groupId>
+      <artifactId>pagehelper-spring-boot-starter</artifactId>
+    </dependency>
+    <!-- api doc -->
+    <dependency>
+      <groupId>io.springfox</groupId>
+      <artifactId>springfox-swagger-ui</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>io.springfox</groupId>
+      <artifactId>springfox-swagger2</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.amqp</groupId>
+      <artifactId>spring-rabbit</artifactId>
+    </dependency>
+    <!-- test -->
+    <dependency>
+      <groupId>com.usoftchina.saas</groupId>
+      <artifactId>test-starter</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.usoftchina.smartschool</groupId>
+      <artifactId>account-api</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-maven-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>com.spotify</groupId>
+        <artifactId>docker-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

+ 6 - 0
base-servers/auth/auth-server/src/main/docker/Dockerfile

@@ -0,0 +1,6 @@
+FROM frolvlad/alpine-oraclejdk8:slim
+VOLUME /tmp
+ADD auth-server-1.0.0-SNAPSHOT.jar app.jar
+RUN sh -c 'touch /app.jar'
+ENV JAVA_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]

+ 19 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/AuthApplication.java

@@ -0,0 +1,19 @@
+package com.usoftchina.smartschool.auth;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+
+/**
+ * @author yingp
+ * @date 2018/9/30
+ */
+@SpringBootApplication
+@EnableEurekaClient
+@MapperScan(basePackages = "com.usoftchina.smartschool.auth.mapper")
+public class AuthApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(AuthApplication.class, args);
+    }
+}

+ 65 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/controller/AuthController.java

@@ -0,0 +1,65 @@
+package com.usoftchina.smartschool.auth.controller;
+
+import com.usoftchina.smartschool.account.api.AccountApi;
+import com.usoftchina.smartschool.account.dto.AccountDTO;
+import com.usoftchina.smartschool.auth.dto.AuthDTO;
+import com.usoftchina.smartschool.auth.dto.TokenDTO;
+import com.usoftchina.smartschool.auth.jwt.JwtHelper;
+import com.usoftchina.smartschool.auth.jwt.JwtInfo;
+import com.usoftchina.smartschool.auth.jwt.JwtToken;
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.utils.BeanMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @author yingp
+ * @date 2018/10/2
+ */
+@RestController
+public class AuthController {
+
+    @Value("${auth.public-key}")
+    private String publicKeyPath;
+
+    @Value("${auth.private-key}")
+    private String privateKeyPath;
+
+    @Value("${auth.header:Authorization}")
+    private String authHeader;
+
+    @Value("${auth.expire:18000}")
+    private int expire;
+
+    @Value("${auth.max-errors:5}")
+    private int maxErrors;
+
+    @Autowired
+    private AccountApi accountApi;
+
+    @PostMapping("/authorize")
+    public Result<AuthDTO> authorize(HttpServletRequest request, @RequestParam String username, @RequestParam String password){
+        Result<AccountDTO> result = accountApi.checkPwd(username, password);
+        if (result.isSuccess()){
+            AccountDTO accountDTO = result.getData();
+            Long school_id = accountDTO.getRoleMaps().stream().filter(roleDTO -> "教师".equals(roleDTO.getRole_name())).findFirst().get().getSchool_id();
+            JwtInfo jwtInfo = new JwtInfo("school", school_id, accountDTO.getId(), accountDTO.getUser_phone());
+            JwtToken jwtToken = JwtHelper.generateToken(jwtInfo, privateKeyPath, expire);
+            TokenDTO tokenDTO = BeanMapper.map(jwtToken, TokenDTO.class);
+            // 登录日志
+            /*authorizeLogService.save(AuthorizeLog.from(request)
+                    .setAccountId(accountDTO.getId())
+                    .setAppId(appId).build());*/
+            return Result.success(new AuthDTO(tokenDTO, accountDTO));
+        }else {
+            return Result.error(result.getCode(), result.getMessage());
+        }
+    }
+
+
+}

+ 47 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/dto/AuthorizeLogDTO.java

@@ -0,0 +1,47 @@
+package com.usoftchina.smartschool.auth.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author yingp
+ * @date 2018/11/7
+ */
+public class AuthorizeLogDTO implements Serializable{
+    private String clientIp;
+    private String userAgent;
+    private Date loginTime;
+
+    public String getClientIp() {
+        return clientIp;
+    }
+
+    public void setClientIp(String clientIp) {
+        this.clientIp = clientIp;
+    }
+
+    public String getUserAgent() {
+        return userAgent;
+    }
+
+    public void setUserAgent(String userAgent) {
+        this.userAgent = userAgent;
+    }
+
+    public Date getLoginTime() {
+        return loginTime;
+    }
+
+    public void setLoginTime(Date loginTime) {
+        this.loginTime = loginTime;
+    }
+
+    @Override
+    public String toString() {
+        return "AuthorizeLogDTO{" +
+                "clientIp='" + clientIp + '\'' +
+                ", userAgent='" + userAgent + '\'' +
+                ", loginTime=" + loginTime +
+                '}';
+    }
+}

+ 37 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/mapper/AuthorizeLogMapper.java

@@ -0,0 +1,37 @@
+package com.usoftchina.smartschool.auth.mapper;
+
+import com.usoftchina.saas.auth.po.AuthorizeLog;
+import com.usoftchina.saas.auth.po.VirtualAuthorizeLog;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author yingp
+ * @date 2018/11/6
+ */
+public interface AuthorizeLogMapper {
+    /**
+     * 保存
+     *
+     * @param authorizeLog
+     * @return
+     */
+    int insert(AuthorizeLog authorizeLog);
+
+    /**
+     * 查找个人日志
+     *
+     * @param appId
+     * @param accountId
+     * @return
+     */
+    List<AuthorizeLog> selectByAppIdAndAccountId(@Param("appId") String appId, @Param("accountId") Long accountId);
+
+    /**
+     * 保存虚拟登陆的LOG
+     * @param virtualAuthorizeLog
+     * @return
+     */
+    int insertVirtual(VirtualAuthorizeLog virtualAuthorizeLog);
+}

+ 117 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/po/AuthorizeLog.java

@@ -0,0 +1,117 @@
+package com.usoftchina.smartschool.auth.po;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author yingp
+ * @date 2018/11/6
+ */
+public class AuthorizeLog implements Serializable{
+    private Long id;
+    private Long accountId;
+    private String clientIp;
+    private String userAgent;
+    private Date loginTime;
+    private String appId;
+
+    public AuthorizeLog() {
+    }
+
+    public AuthorizeLog(Long accountId, String clientIp, String userAgent, String appId) {
+        this.accountId = accountId;
+        this.clientIp = clientIp;
+        this.userAgent = userAgent;
+        this.loginTime = new Date();
+        this.appId = appId;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public String getClientIp() {
+        return clientIp;
+    }
+
+    public void setClientIp(String clientIp) {
+        this.clientIp = clientIp;
+    }
+
+    public String getUserAgent() {
+        return userAgent;
+    }
+
+    public void setUserAgent(String userAgent) {
+        this.userAgent = userAgent;
+    }
+
+    public Date getLoginTime() {
+        return loginTime;
+    }
+
+    public void setLoginTime(Date loginTime) {
+        this.loginTime = loginTime;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+
+    public static Builder from(HttpServletRequest request) {
+        return new Builder(request);
+    }
+
+    public static class Builder {
+        private Long accountId;
+        private String clientIp;
+        private String userAgent;
+        private String appId;
+
+        public Builder(HttpServletRequest request) {
+            this.clientIp = request.getRemoteAddr();
+            this.userAgent = request.getHeader("User-Agent");
+        }
+
+        public Builder setAccountId(Long accountId) {
+            this.accountId = accountId;
+            return this;
+        }
+
+        public Builder setClientIp(String clientIp) {
+            this.clientIp = clientIp;
+            return this;
+        }
+
+        public Builder setUserAgent(String userAgent) {
+            this.userAgent = userAgent;
+            return this;
+        }
+
+        public Builder setAppId(String appId) {
+            this.appId = appId;
+            return this;
+        }
+
+        public AuthorizeLog build() {
+            return new AuthorizeLog(accountId, clientIp, userAgent, appId);
+        }
+    }
+}

+ 117 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/po/VirtualAuthorizeLog.java

@@ -0,0 +1,117 @@
+package com.usoftchina.smartschool.auth.po;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author chenw
+ * @date 2018/11/26
+ */
+public class VirtualAuthorizeLog implements Serializable{
+    private Long id;
+    private Long mobile;
+    private String clientIp;
+    private String userAgent;
+    private Date loginTime;
+    private String appId;
+
+    public VirtualAuthorizeLog() {
+    }
+
+    public VirtualAuthorizeLog(Long mobile, String clientIp, String userAgent, String appId) {
+        this.mobile = mobile;
+        this.clientIp = clientIp;
+        this.userAgent = userAgent;
+        this.loginTime = new Date();
+        this.appId = appId;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(Long mobile) {
+        this.mobile = mobile;
+    }
+
+    public String getClientIp() {
+        return clientIp;
+    }
+
+    public void setClientIp(String clientIp) {
+        this.clientIp = clientIp;
+    }
+
+    public String getUserAgent() {
+        return userAgent;
+    }
+
+    public void setUserAgent(String userAgent) {
+        this.userAgent = userAgent;
+    }
+
+    public Date getLoginTime() {
+        return loginTime;
+    }
+
+    public void setLoginTime(Date loginTime) {
+        this.loginTime = loginTime;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+
+    public static Builder from(HttpServletRequest request) {
+        return new Builder(request);
+    }
+
+    public static class Builder {
+        private Long mobile;
+        private String clientIp;
+        private String userAgent;
+        private String appId;
+
+        public Builder(HttpServletRequest request) {
+            this.clientIp = request.getRemoteAddr();
+            this.userAgent = request.getHeader("User-Agent");
+        }
+
+        public Builder setMobile(Long mobile) {
+            this.mobile = mobile;
+            return this;
+        }
+
+        public Builder setClientIp(String clientIp) {
+            this.clientIp = clientIp;
+            return this;
+        }
+
+        public Builder setUserAgent(String userAgent) {
+            this.userAgent = userAgent;
+            return this;
+        }
+
+        public Builder setAppId(String appId) {
+            this.appId = appId;
+            return this;
+        }
+
+        public VirtualAuthorizeLog build() {
+            return new VirtualAuthorizeLog(mobile, clientIp, userAgent, appId);
+        }
+    }
+}

+ 68 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/service/AuthorizeCountService.java

@@ -0,0 +1,68 @@
+package com.usoftchina.smartschool.auth.service;
+
+import com.usoftchina.saas.cache.CacheKeyHelper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.stereotype.Service;
+
+import java.util.concurrent.TimeUnit;
+
+/**
+ * 登录失败记录
+ *
+ * @author yingp
+ * @date 2018/11/6
+ */
+@Service
+public class AuthorizeCountService {
+
+    @Autowired
+    private StringRedisTemplate redisTemplate;
+
+    @Value("${auth.max-errors:5}")
+    private int maxErrors;
+
+    /**
+     * 账户锁定时间
+     */
+    @Value("${auth.error-lock-time:30}")
+    private int lockTime;
+
+    /**
+     * 记录一次
+     *
+     * @param username
+     * @return
+     */
+    public Long increaseAndGet(String username) {
+        String key = generateKey(username);
+        Long value = redisTemplate.opsForValue().increment(key, 1);
+        redisTemplate.expire(key, lockTime, TimeUnit.MINUTES);
+        return value;
+    }
+
+    private String generateKey(String username) {
+        return CacheKeyHelper.generatePrivateKey("auth", "authorize", username);
+    }
+
+    /**
+     * 清零
+     *
+     * @param username
+     */
+    public void clear(String username) {
+        redisTemplate.delete(generateKey(username));
+    }
+
+    /**
+     * 账户是否冻结
+     *
+     * @param username
+     * @return
+     */
+    public boolean isFrozen(String username) {
+        Object value = redisTemplate.opsForValue().get(generateKey(username));
+        return null != value && Integer.parseInt(value.toString()) > maxErrors;
+    }
+}

+ 36 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/service/AuthorizeLogService.java

@@ -0,0 +1,36 @@
+package com.usoftchina.smartschool.auth.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.auth.dto.AuthorizeLogDTO;
+import com.usoftchina.saas.auth.po.AuthorizeLog;
+import com.usoftchina.saas.auth.po.VirtualAuthorizeLog;
+import com.usoftchina.saas.page.PageRequest;
+
+/**
+ * @author yingp
+ * @date 2018/11/6
+ */
+public interface AuthorizeLogService {
+    /**
+     * 保存
+     *
+     * @param authorizeLog
+     * @return
+     */
+    boolean save(AuthorizeLog authorizeLog);
+
+    /**
+     * 分页查询
+     *
+     * @param page
+     * @return
+     */
+    PageInfo<AuthorizeLogDTO> findByPage(PageRequest page);
+
+    /**
+     * 保存虚拟账户登录LOG
+     * @param virtualAuthorizeLog
+     * @return
+     */
+    boolean saveVirtual(VirtualAuthorizeLog virtualAuthorizeLog);
+}

+ 48 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/smartschool/auth/service/impl/AuthorizeLogServiceImpl.java

@@ -0,0 +1,48 @@
+package com.usoftchina.smartschool.auth.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.auth.dto.AuthorizeLogDTO;
+import com.usoftchina.saas.auth.mapper.AuthorizeLogMapper;
+import com.usoftchina.saas.auth.po.AuthorizeLog;
+import com.usoftchina.saas.auth.po.VirtualAuthorizeLog;
+import com.usoftchina.saas.auth.service.AuthorizeLogService;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.utils.BeanMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author yingp
+ * @date 2018/11/6
+ */
+@Service
+public class AuthorizeLogServiceImpl implements AuthorizeLogService{
+
+    @Autowired
+    private AuthorizeLogMapper authorizeLogMapper;
+
+    @Override
+    @Async
+    public boolean save(AuthorizeLog authorizeLog) {
+        return authorizeLogMapper.insert(authorizeLog) > 0;
+    }
+
+    @Override
+    public PageInfo<AuthorizeLogDTO> findByPage(PageRequest page) {
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<AuthorizeLog> logs = authorizeLogMapper.selectByAppIdAndAccountId(
+                BaseContextHolder.getAppId(), BaseContextHolder.getCompanyId()
+        );
+        return new PageInfo<>(BeanMapper.mapList(logs, AuthorizeLogDTO.class));
+    }
+
+    @Override
+    public boolean saveVirtual(VirtualAuthorizeLog virtualAuthorizeLog) {
+        return authorizeLogMapper.insertVirtual(virtualAuthorizeLog) > 0;
+    }
+}

+ 88 - 0
base-servers/auth/auth-server/src/main/resources/application.yml

@@ -0,0 +1,88 @@
+spring:
+  profiles:
+    active: dev
+  application:
+    name: auth-server
+  security:
+    user:
+      name: admin
+      password: select111***
+  datasource:
+    driver-class-name: com.mysql.jdbc.Driver
+    url: jdbc:mysql://10.10.100.166:3306/school?characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
+    username: root
+    password: select111***
+    hikari:
+      minimum-idle: 5
+      maximum-pool-size: 50
+      idle-timeout: 30000
+      max-lifetime: 1800000
+      connection-timeout: 30000
+  messages:
+    basename: i18n/messages
+    encoding: UTF-8
+  rabbitmq:
+    host: 10.10.100.166
+    port: 3306
+    virtual-host: school
+    username: root
+    password: select111***
+  zipkin:
+    sender:
+      type: rabbit
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      probability: 1.0
+  redis:
+    host: 10.1.81.62
+    port: 6379
+  jackson:
+    date-format: yyyy-MM-dd HH:mm:ss
+    time-zone: GMT+8
+eureka:
+  instance:
+    leaseRenewalIntervalInSeconds: 10
+    health-check-url-path: /actuator/health
+    status-page-url-path: /actuator/info
+    prefer-ip-address: true
+    metadata-map:
+      user.name: ${spring.security.user.name}
+      user.password: ${spring.security.user.password}
+  client:
+    registryFetchIntervalSeconds: 5
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
+server:
+  port: 9720
+  tomcat:
+    uri-encoding: UTF-8
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+    restart:
+      enabled: true
+info:
+  name: '@project.artifactId@'
+  description: '@project.description@'
+  version: '@project.version@'
+  spring-boot-version: '@spring.boot.version@'
+  spring-cloud-version: '@spring.cloud.version@'
+mybatis:
+  type-aliases-package: com.usoftchina.saas.auth.po
+  mapper-locations: classpath:mapper/*.xml
+auth:
+  private-key: auth/pri.key
+  public-key: auth/pub.key
+ribbon:
+  ReadTimeout: 5000
+  ConnectTimeout: 5000

BIN
base-servers/auth/auth-server/src/main/resources/auth/pri.key


BIN
base-servers/auth/auth-server/src/main/resources/auth/pub.key


+ 22 - 0
base-servers/auth/pom.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>base-servers</artifactId>
+    <groupId>com.usoftchina.smartschool</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.usoftchina.smartschool</groupId>
+  <artifactId>auth</artifactId>
+  <packaging>pom</packaging>
+  <modules>
+    <module>auth-api</module>
+    <module>auth-dto</module>
+    <module>auth-server</module>
+  </modules>
+
+
+</project>

+ 0 - 15
base-servers/base-servers.iml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 0 - 160
base-servers/eureka-server/eureka-server.iml

@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration />
-    </facet>
-    <facet type="web" name="Web">
-      <configuration>
-        <webroots />
-        <sourceRoots>
-          <root url="file://$MODULE_DIR$/src/main/java" />
-          <root url="file://$MODULE_DIR$/src/main/resources" />
-        </sourceRoots>
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-server:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.0.7.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-server:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.11.Final" level="project" />
-    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.28" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-client:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.jettison:jettison:1.3.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: stax:stax-api:1.0.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: joda-time:joda-time:2.9.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-math:2.2" level="project" />
-    <orderEntry type="library" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
-    <orderEntry type="library" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-codec:commons-codec:1.11" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.inject:guice:4.1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: aopalliance:aopalliance:1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.vlsi.compactmap:compactmap:1.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.andrewoma.dexx:dexx-collections:0.2" level="project" />
-    <orderEntry type="library" name="Maven: com.sun.jersey:jersey-servlet:1.19.1" level="project" />
-    <orderEntry type="library" name="Maven: com.sun.jersey:jersey-server:1.19.1" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-core:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.4.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.guava:guava:18.0" level="project" />
-    <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
-    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.10" level="project" />
-    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
-    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.hystrix:hystrix-core:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-codec-http:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-codec:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-buffer:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-unix-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-resolver:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-eureka:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-security:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.0" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:5.0.7.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.0.7.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.0.7.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.10" level="project" />
-    <orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
-    <orderEntry type="library" name="Maven: net.logstash.logback:logstash-logback-encoder:4.11" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
-  </component>
-</module>

+ 0 - 116
base-servers/file/file-api/file-api.iml

@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration />
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.0" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.0.7.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-java8:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
-    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
-    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
-    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
-    <orderEntry type="module" module-name="core" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
-    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
-    <orderEntry type="module" module-name="file-dto" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.7.11" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
-    <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.0.3" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.0.3" level="project" />
-  </component>
-</module>

+ 0 - 44
base-servers/file/file-dto/file-dto.iml

@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration />
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.7.11" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
-    <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
-    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
-  </component>
-</module>

+ 0 - 228
base-servers/file/file-server/file-server.iml

@@ -1,228 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration />
-    </facet>
-    <facet type="web" name="Web">
-      <configuration>
-        <webroots />
-        <sourceRoots>
-          <root url="file://$MODULE_DIR$/src/main/java" />
-          <root url="file://$MODULE_DIR$/src/main/resources" />
-        </sourceRoots>
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="server-starter" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-client:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.jettison:jettison:1.3.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: stax:stax-api:1.0.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: joda-time:joda-time:2.9.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-math:2.2" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.inject:guice:4.1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: aopalliance:aopalliance:1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.vlsi.compactmap:compactmap:1.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.andrewoma.dexx:dexx-collections:0.2" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-core:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.4.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
-    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-codec-http:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:4.1.27.Final" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-unix-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-eureka:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.10" level="project" />
-    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.10" level="project" />
-    <orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.32" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.0.8.RELEASE" level="project" />
-    <orderEntry type="module" module-name="file-dto" />
-    <orderEntry type="module" module-name="core" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
-    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
-    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
-    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
-    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:6.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.0" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.7.9" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.5" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.7" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.7" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.6" level="project" />
-    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.2" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
-    <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.7.11" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.github.tobato:fastdfs-client:1.26.3" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
-    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.1" level="project" />
-    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
-    <orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.5.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.11.Final" level="project" />
-    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.8" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.18" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-zipkin:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-sleuth:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave:5.1.0" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-context-log4j2:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-web:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-http:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-rabbit:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-kafka-clients:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpclient:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpasyncclient:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-webmvc:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-servlet:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-zipkin:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.0.7.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.zipkin2:zipkin:2.11.1" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-reporter:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-kafka11:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-amqp-client:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.1.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.2.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: net.logstash.logback:logstash-logback-encoder:4.11" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
-    <orderEntry type="module" module-name="test-starter" />
-  </component>
-</module>

+ 0 - 15
base-servers/file/file.iml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 0 - 194
base-servers/gateway-server/gateway-server.iml

@@ -1,194 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration />
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.0" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.10" level="project" />
-    <orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-client:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.jettison:jettison:1.3.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: stax:stax-api:1.0.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: joda-time:joda-time:2.9.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-math:2.2" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.inject:guice:4.1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: aopalliance:aopalliance:1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.vlsi.compactmap:compactmap:1.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.andrewoma.dexx:dexx-collections:0.2" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-core:1.9.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.4.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
-    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-eureka:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.10" level="project" />
-    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.0.7.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-webflux:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-reactor-netty:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.projectreactor.ipc:reactor-netty:0.7.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-codec-http:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-handler-proxy:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-codec-socks:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-transport-native-epoll:linux-x86_64:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-transport-native-unix-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.11.Final" level="project" />
-    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-webflux:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.synchronoss.cloud:nio-multipart-parser:1.1.0" level="project" />
-    <orderEntry type="library" name="Maven: org.synchronoss.cloud:nio-stream-storage:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-gateway:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-gateway-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.projectreactor.addons:reactor-extra:3.1.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
-    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.0.9.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.27.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-zipkin:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-sleuth:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave:5.1.0" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-context-log4j2:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-web:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-http:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-rabbit:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-kafka-clients:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpclient:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpasyncclient:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-webmvc:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-servlet:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-zipkin:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.zipkin2:zipkin:2.11.1" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-reporter:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-kafka11:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-amqp-client:2.7.7" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.1.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.2.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: net.logstash.logback:logstash-logback-encoder:4.11" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
-    <orderEntry type="module" module-name="core" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
-    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
-    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.0.1.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:9.5.1" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-java8:9.5.1" level="project" />
-  </component>
-</module>

+ 10 - 0
base-servers/gateway-server/pom.xml

@@ -66,6 +66,16 @@
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-openfeign</artifactId>
         </dependency>
+      <dependency>
+        <groupId>com.usoftchina.smartschool</groupId>
+        <artifactId>auth-dto</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+        <groupId>com.usoftchina.smartschool</groupId>
+        <artifactId>account-api</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+      </dependency>
     </dependencies>
     <build>
         <plugins>

+ 14 - 159
base-servers/gateway-server/src/main/java/com/usoftchina/smartschool/gateway/config/AuthFilter.java

@@ -1,27 +1,12 @@
-/*
 package com.usoftchina.smartschool.gateway.config;
 
-import com.usoftchina.saas.account.cache.AccountCache;
-import com.usoftchina.saas.account.cache.ResourceCache;
-import com.usoftchina.saas.account.com.usoftchina.smartschool.file.dto.AccountDTO;
-import com.usoftchina.saas.account.com.usoftchina.smartschool.file.dto.UrlResourceDTO;
-import com.usoftchina.saas.auth.api.AuthApi;
-import com.usoftchina.saas.auth.common.cookie.CookieHelper;
-import com.usoftchina.saas.auth.common.cookie.CookieInfo;
-import com.usoftchina.saas.auth.common.jwt.JwtHelper;
-import com.usoftchina.saas.auth.common.jwt.JwtInfo;
-import com.usoftchina.saas.auth.com.usoftchina.smartschool.file.dto.AuthDTO;
-import com.usoftchina.saas.auth.com.usoftchina.smartschool.file.dto.TokenDTO;
-import com.usoftchina.saas.base.Result;
-import com.usoftchina.saas.cache.CacheKeyHelper;
-import com.usoftchina.saas.context.BaseContextHolder;
-import com.usoftchina.saas.exception.BizException;
-import com.usoftchina.saas.exception.ExceptionCode;
-import com.usoftchina.saas.gateway.error.PermissionException;
-import com.usoftchina.saas.gateway.util.AntPathRequestMatcher;
-import com.usoftchina.saas.utils.CollectionUtils;
-import com.usoftchina.saas.utils.JsonUtils;
-import com.usoftchina.saas.utils.RedisUtil;
+import com.usoftchina.smartschool.account.api.AccountApi;
+import com.usoftchina.smartschool.account.dto.AccountDTO;
+import com.usoftchina.smartschool.auth.jwt.JwtHelper;
+import com.usoftchina.smartschool.auth.jwt.JwtInfo;
+import com.usoftchina.smartschool.context.BaseContextHolder;
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.exception.ExceptionCode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -35,151 +20,47 @@ import org.springframework.web.server.ServerWebExchange;
 import reactor.core.publisher.Mono;
 
 import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
 
-*/
-/**
- * 全局过滤器鉴权
- *
- * @author yingp
- * @date 2018/10/13
- *//*
 
 @Configuration
 @EnableConfigurationProperties({
-        AuthConfig.class,
-        CookieConfig.class
+        AuthConfig.class
 })
 public class AuthFilter implements GlobalFilter, Ordered {
 
     @Autowired
     private AuthConfig authConfig;
-
-    @Autowired
-    private CookieConfig cookieConfig;
-
     @Autowired
-    private AuthApi authApi;
+    private AccountApi accountApi;
 
     private static final Logger LOGGER = LoggerFactory.getLogger(AuthFilter.class);
 
     @Override
     public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
         try {
-            if (!isIgnore(exchange.getRequest())) {
                 // 鉴别身份信息
                 String token = getAuthToken(exchange.getRequest());
-                String key = CacheKeyHelper.generatePublicKey(token);
-                //刷新时间
-                RedisUtil.expire(key, authConfig.getExpire());
                 JwtInfo jwt = null;
                 try {
                     jwt = JwtHelper.getInfoFromToken(token, authConfig.getPublicKey());
                 } catch (BizException e) {
-                    if (ExceptionCode.JWT_TOKEN_EXPIRED.getCode() == e.getCode()) {
-                        jwt = (JwtInfo)RedisUtil.get(key);
-                        if (jwt == null) {
-                            throw new BizException(ExceptionCode.JWT_TOKEN_EXPIRED.getCode(), ExceptionCode.JWT_TOKEN_EXPIRED.getMessage());
-                        }
-                        Result<TokenDTO> result = authApi.generateToken(jwt);
-                        if (result.isSuccess() && null != result.getData()) {
-                            token = result.getData().getToken();
-                            //返回前端处理
-                            exchange.getResponse().getHeaders().add(authConfig.getAuthHeader(), token);
-                            //向headers中放token,记得build
-                            ServerHttpRequest request = exchange.getRequest().mutate().header(authConfig.getAuthHeader(), token).build();
-                            //将现在的request 变成 change对象
-                            exchange = exchange.mutate().request(request).build();
-                        }
-                        //删除已过期token信息
-                        RedisUtil.del(key);
-                    }
+                    throw new BizException(ExceptionCode.JWT_TOKEN_EXPIRED.getCode(), ExceptionCode.JWT_TOKEN_EXPIRED.getMessage());
                 }
                 BaseContextHolder.setAppId(jwt.getAppId());
                 BaseContextHolder.setUserId(jwt.getUserId());
-                BaseContextHolder.setCompanyId(jwt.getCompanyId());
-                BaseContextHolder.setUserName(jwt.getRealName());
+                BaseContextHolder.setUserName(jwt.getUserName());
                 BaseContextHolder.setToken(token);
-                if (jwt.getUserId() != -99999) {    //非虚拟用户登录时
-                    AccountDTO accountDTO = AccountCache.current().getAccount();
-                    if (null == accountDTO) {
-                        throw new BizException(ExceptionCode.USER_NOT_EXIST);
-                    }
-                    // 鉴别角色权限
-                    checkPermission(exchange.getRequest(), jwt, accountDTO);
+                AccountDTO accountDTO = accountApi.findByMobile(jwt.getUserName()).getData();
+                if (null == accountDTO) {
+                    throw new BizException(ExceptionCode.USER_NOT_EXIST);
                 }
-
-            }
             return chain.filter(exchange);
         } finally {
             BaseContextHolder.remove();
         }
     }
 
-    */
-/**
-     * 鉴别角色权限
-     *
-     * @param request
-     * @param jwt
-     * @param accountDTO
-     *//*
-
-    private void checkPermission(ServerHttpRequest request, JwtInfo jwt, AccountDTO accountDTO) {
-        LOGGER.info("JwtInfo: " + JsonUtils.toJsonString(jwt));
-        LOGGER.info("accountDTO:" + JsonUtils.toJsonString(accountDTO));
-        if (!accountDTO.isAdmin(jwt.getCompanyId())) {
-            // 非管理账户,需要鉴权
-            List<UrlResourceDTO> resources = ResourceCache.current().getUrlResources();
-            if (!CollectionUtils.isEmpty(resources)) {
-                // 本次请求相关的资源
-                List<UrlResourceDTO> permissions = resources.parallelStream().filter(resource -> {
-                    AntPathRequestMatcher matcher = new AntPathRequestMatcher(resource.getUrl(), resource.getMethod());
-                    return matcher.matches(request);
-                }).collect(Collectors.toList());
-                if (!CollectionUtils.isEmpty(permissions)) {
-                    Set<Long> resourceIds = accountDTO.getResources(jwt.getAppId(), jwt.getCompanyId());
-                    LOGGER.info("permissions: " + permissions);
-                    LOGGER.info("resourceIds: " + resourceIds);
-                    boolean permitted = false;
-                    if (null != resourceIds) {
-                        // 权限匹配
-                        permitted = permissions.stream()
-                                .anyMatch(resource -> resourceIds.contains(resource.getId()));
-                    }
-                    if (!permitted) {
-                        throw new PermissionException(permissions.get(0));
-                    }
-                }
-            }
-        }
-    }
-
-    */
-/**
-     * 是否设置为忽略鉴权的请求
-     *
-     * @param request
-     * @return
-     *//*
-
-    private boolean isIgnore(ServerHttpRequest request) {
-        return authConfig.getIgnores().stream().anyMatch(ignore ->
-                new AntPathRequestMatcher(ignore).matches(request));
-    }
-
     private String getAuthToken(ServerHttpRequest request) {
-        // from header
-        if (!request.getHeaders().containsKey(authConfig.getAuthHeader())) {
-            // from cookie
-            String token = getAuthCookieInfo(request);
-            if (null == token) {
-                throw new BizException(ExceptionCode.JWT_ILLEGAL_ARGUMENT);
-            }
-            return token;
-        }
-
         List<String> headers = request.getHeaders().get(authConfig.getAuthHeader());
         if (headers.isEmpty()) {
             throw new BizException(ExceptionCode.JWT_ILLEGAL_ARGUMENT);
@@ -187,34 +68,8 @@ public class AuthFilter implements GlobalFilter, Ordered {
         return headers.get(0).trim();
     }
 
-    */
-/**
-     * 解析cookie获取身份
-     *
-     * @param request
-     * @return
-     *//*
-
-    private String getAuthCookieInfo(ServerHttpRequest request) {
-        if (request.getCookies().containsKey(cookieConfig.getName())) {
-            String value = request.getCookies().getFirst(cookieConfig.getName()).getValue();
-            CookieInfo info = CookieHelper.geInfoFromToken(value, cookieConfig.getSecretKey());
-            Result<AuthDTO> result = authApi.ssoAuthorize(info);
-            if (result.isSuccess()) {
-                TokenDTO token = result.getData().getToken();
-                // 传递身份信息到后面代理的服务
-                request.getHeaders().add(authConfig.getAuthHeader(), token.getToken());
-                return token.getToken();
-            } else {
-                throw new BizException(result.getCode(), result.getMessage());
-            }
-        }
-        return null;
-    }
-
     @Override
     public int getOrder() {
         return -100;
     }
 }
-*/

+ 1 - 0
base-servers/pom.xml

@@ -17,6 +17,7 @@
         <module>sms</module>
         <module>account</module>
         <module>file</module>
+      <module>auth</module>
     </modules>
 
 

Some files were not shown because too many files changed in this diff