Browse Source

Merge branch 'dev/icss' into debug

gaodm 6 years ago
parent
commit
1e7e3efe65
100 changed files with 4792 additions and 25 deletions
  1. 1 1
      admin-service/src/main/resources/logback-spring.xml
  2. 1 1
      bi-service/src/main/resources/logback-spring.xml
  3. 4 2
      common/src/main/java/com/diagbot/enums/SysTypeEnum.java
  4. 1 1
      config-server/src/main/resources/logback-spring.xml
  5. 18 3
      config-server/src/main/resources/shared/gateway-service-dev.yml
  6. 17 3
      config-server/src/main/resources/shared/gateway-service-local.yml
  7. 17 2
      config-server/src/main/resources/shared/gateway-service-pro.yml
  8. 18 3
      config-server/src/main/resources/shared/gateway-service-test.yml
  9. 94 0
      config-server/src/main/resources/shared/icss-service-dev.yml
  10. 94 0
      config-server/src/main/resources/shared/icss-service-local.yml
  11. 94 0
      config-server/src/main/resources/shared/icss-service-pro.yml
  12. 94 0
      config-server/src/main/resources/shared/icss-service-test.yml
  13. 94 0
      config-server/src/main/resources/shared/icssman-service-dev.yml
  14. 94 0
      config-server/src/main/resources/shared/icssman-service-local.yml
  15. 94 0
      config-server/src/main/resources/shared/icssman-service-pro.yml
  16. 94 0
      config-server/src/main/resources/shared/icssman-service-test.yml
  17. 1 1
      diagbotman-service/src/main/java/com/diagbot/aop/SysLoggerExprotAspect.java
  18. 1 1
      diagbotman-service/src/main/resources/logback-spring.xml
  19. 24 0
      docker-compose.yml
  20. 7 4
      docs/003.20181024初始化脚本/init_diagbotcloud.sql
  21. 1 1
      eureka-server/src/main/resources/logback-spring.xml
  22. 1 1
      feedback-service/src/main/resources/logback-spring.xml
  23. 1 1
      gateway-service/src/main/resources/logback-spring.xml
  24. 25 0
      icss-service/.gitignore
  25. 184 0
      icss-service/pom.xml
  26. 34 0
      icss-service/src/main/java/com/diagbot/IcssServiceApplication.java
  27. 76 0
      icss-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java
  28. 25 0
      icss-service/src/main/java/com/diagbot/client/UserServiceClient.java
  29. 23 0
      icss-service/src/main/java/com/diagbot/client/hystrix/UserServiceHystrix.java
  30. 19 0
      icss-service/src/main/java/com/diagbot/config/CustomAccessTokenConverter.java
  31. 15 0
      icss-service/src/main/java/com/diagbot/config/GlobalMethodSecurityConfigurer.java
  32. 48 0
      icss-service/src/main/java/com/diagbot/config/JwtConfigurer.java
  33. 29 0
      icss-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  34. 42 0
      icss-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  35. 69 0
      icss-service/src/main/java/com/diagbot/config/SwaggerConfigurer.java
  36. 79 0
      icss-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  37. 29 0
      icss-service/src/main/java/com/diagbot/config/security/UrlConfigAttribute.java
  38. 79 0
      icss-service/src/main/java/com/diagbot/config/security/UrlFilterSecurityInterceptor.java
  39. 40 0
      icss-service/src/main/java/com/diagbot/config/security/UrlMetadataSourceService.java
  40. 19 0
      icss-service/src/main/java/com/diagbot/dto/IntroduceDTO.java
  41. 39 0
      icss-service/src/main/java/com/diagbot/dto/QuestionDTO.java
  42. 146 0
      icss-service/src/main/java/com/diagbot/entity/DeptVital.java
  43. 172 0
      icss-service/src/main/java/com/diagbot/entity/IntroduceDetail.java
  44. 133 0
      icss-service/src/main/java/com/diagbot/entity/IntroduceInfo.java
  45. 157 0
      icss-service/src/main/java/com/diagbot/entity/IntroduceMap.java
  46. 68 0
      icss-service/src/main/java/com/diagbot/entity/ModuleInfo.java
  47. 94 0
      icss-service/src/main/java/com/diagbot/entity/ModuleQuestion.java
  48. 60 0
      icss-service/src/main/java/com/diagbot/entity/QuestionDetail.java
  49. 125 0
      icss-service/src/main/java/com/diagbot/entity/QuestionInfo.java
  50. 84 0
      icss-service/src/main/java/com/diagbot/entity/QuestionMapping.java
  51. 78 0
      icss-service/src/main/java/com/diagbot/entity/QuestionRelation.java
  52. 170 0
      icss-service/src/main/java/com/diagbot/entity/QuestionUsual.java
  53. 147 0
      icss-service/src/main/java/com/diagbot/entity/Retrieval.java
  54. 160 0
      icss-service/src/main/java/com/diagbot/entity/RetrievalMapping.java
  55. 196 0
      icss-service/src/main/java/com/diagbot/entity/SysLog.java
  56. 142 0
      icss-service/src/main/java/com/diagbot/entity/User.java
  57. 133 0
      icss-service/src/main/java/com/diagbot/entity/VitalOrder.java
  58. 49 0
      icss-service/src/main/java/com/diagbot/enums/ControlTypeEnum.java
  59. 81 0
      icss-service/src/main/java/com/diagbot/exception/CommonExceptionHandler.java
  60. 14 0
      icss-service/src/main/java/com/diagbot/facade/IntroduceDetailFacade.java
  61. 75 0
      icss-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java
  62. 13 0
      icss-service/src/main/java/com/diagbot/facade/IntroduceMapFacade.java
  63. 39 0
      icss-service/src/main/java/com/diagbot/facade/QuestionDetailFacade.java
  64. 72 0
      icss-service/src/main/java/com/diagbot/facade/QuestionFacade.java
  65. 16 0
      icss-service/src/main/java/com/diagbot/mapper/DeptVitalMapper.java
  66. 16 0
      icss-service/src/main/java/com/diagbot/mapper/IntroduceDetailMapper.java
  67. 16 0
      icss-service/src/main/java/com/diagbot/mapper/IntroduceInfoMapper.java
  68. 16 0
      icss-service/src/main/java/com/diagbot/mapper/IntroduceMapMapper.java
  69. 16 0
      icss-service/src/main/java/com/diagbot/mapper/ModuleInfoMapper.java
  70. 16 0
      icss-service/src/main/java/com/diagbot/mapper/ModuleQuestionMapper.java
  71. 16 0
      icss-service/src/main/java/com/diagbot/mapper/QuestionDetailMapper.java
  72. 42 0
      icss-service/src/main/java/com/diagbot/mapper/QuestionInfoMapper.java
  73. 16 0
      icss-service/src/main/java/com/diagbot/mapper/QuestionMappingMapper.java
  74. 16 0
      icss-service/src/main/java/com/diagbot/mapper/QuestionRelationMapper.java
  75. 16 0
      icss-service/src/main/java/com/diagbot/mapper/QuestionUsualMapper.java
  76. 16 0
      icss-service/src/main/java/com/diagbot/mapper/RetrievalMapper.java
  77. 16 0
      icss-service/src/main/java/com/diagbot/mapper/RetrievalMappingMapper.java
  78. 16 0
      icss-service/src/main/java/com/diagbot/mapper/SysLogMapper.java
  79. 16 0
      icss-service/src/main/java/com/diagbot/mapper/VitalOrderMapper.java
  80. 23 0
      icss-service/src/main/java/com/diagbot/rabbit/MyProcessor.java
  81. 27 0
      icss-service/src/main/java/com/diagbot/rabbit/MySender.java
  82. 16 0
      icss-service/src/main/java/com/diagbot/service/DeptVitalService.java
  83. 16 0
      icss-service/src/main/java/com/diagbot/service/IntroduceDetailService.java
  84. 16 0
      icss-service/src/main/java/com/diagbot/service/IntroduceInfoService.java
  85. 16 0
      icss-service/src/main/java/com/diagbot/service/IntroduceMapService.java
  86. 16 0
      icss-service/src/main/java/com/diagbot/service/ModuleInfoService.java
  87. 16 0
      icss-service/src/main/java/com/diagbot/service/ModuleQuestionService.java
  88. 16 0
      icss-service/src/main/java/com/diagbot/service/QuestionDetailService.java
  89. 41 0
      icss-service/src/main/java/com/diagbot/service/QuestionInfoService.java
  90. 16 0
      icss-service/src/main/java/com/diagbot/service/QuestionMappingService.java
  91. 16 0
      icss-service/src/main/java/com/diagbot/service/QuestionRelationService.java
  92. 16 0
      icss-service/src/main/java/com/diagbot/service/QuestionUsualService.java
  93. 16 0
      icss-service/src/main/java/com/diagbot/service/RetrievalMappingService.java
  94. 16 0
      icss-service/src/main/java/com/diagbot/service/RetrievalService.java
  95. 16 0
      icss-service/src/main/java/com/diagbot/service/VitalOrderService.java
  96. 20 0
      icss-service/src/main/java/com/diagbot/service/impl/DeptVitalServiceImpl.java
  97. 20 0
      icss-service/src/main/java/com/diagbot/service/impl/IntroduceDetailServiceImpl.java
  98. 20 0
      icss-service/src/main/java/com/diagbot/service/impl/IntroduceInfoServiceImpl.java
  99. 20 0
      icss-service/src/main/java/com/diagbot/service/impl/IntroduceMapServiceImpl.java
  100. 0 0
      icss-service/src/main/java/com/diagbot/service/impl/ModuleInfoServiceImpl.java

+ 1 - 1
admin-service/src/main/resources/logback-spring.xml

@@ -268,7 +268,7 @@
     </springProfile>
 
     <!-- 生产环境下的日志配置 -->
-    <springProfile name="prod">
+    <springProfile name="pro">
         <root level="INFO">
             <appender-ref ref="ERROR"/>
             <appender-ref ref="WARN"/>

+ 1 - 1
bi-service/src/main/resources/logback-spring.xml

@@ -268,7 +268,7 @@
     </springProfile>
 
     <!-- 生产环境下的日志配置 -->
-    <springProfile name="prod">
+    <springProfile name="pro">
         <root level="INFO">
             <appender-ref ref="ERROR"/>
             <appender-ref ref="WARN"/>

+ 4 - 2
common/src/main/java/com/diagbot/enums/SysTypeEnum.java

@@ -18,9 +18,11 @@ public enum SysTypeEnum implements KeyedNamed {
     BI_SERVICE(5, "bi-service"),
     KNOWLEDGE_SERVICE(6, "knowledge-service"),
     FEEDBACK_SERVICE(7, "feedback-service"),
-    ICSS_WEB(8, "icss-service"),
+    ICSS_OLD(8, "icss-old-service"),
     TRIAGE_SERVICE(9, "triage-service"),
-    APPKEY(10, "appkey");
+    APPKEY(10, "appkey"),
+    ICSS_SERVICE(11, "icss-service"),
+    ICSSMAN_SERVICE(12, "icssman-service");
 
     @Setter
     private int key;

+ 1 - 1
config-server/src/main/resources/logback-spring.xml

@@ -278,7 +278,7 @@
     </springProfile>
 
     <!-- 生产环境下的日志配置 -->
-    <springProfile name="prod">
+    <springProfile name="pro">
         <root level="INFO">
             <appender-ref ref="ERROR"/>
             <appender-ref ref="WARN"/>

+ 18 - 3
config-server/src/main/resources/shared/gateway-service-dev.yml

@@ -70,10 +70,10 @@ spring:
         filters:
         - SwaggerHeaderFilter
         - StripPrefix=2
-      - id: icss
+      - id: icssold
         uri: http://192.168.2.165:8080
         predicates:
-        - Path=/api/icss/**
+        - Path=/api/icssold/**
         filters:
         - StripPrefix=2
       - id: triage-service
@@ -83,10 +83,25 @@ spring:
         filters:
         - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: icss-service
+        uri: lb://icss-service
+        predicates:
+        - Path=/api/icss/**
+        filters:
+        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: icssman-service
+        uri: lb://icssman-service
+        predicates:
+        - Path=/api/icssman/**
+        filters:
+        - SwaggerHeaderFilter
+        - StripPrefix=2
+
 
 server:
   port: 5050
 
 lantone:
-  product: triage,143;icss,2
+  product: triage,143;icsstt,2
 

+ 17 - 3
config-server/src/main/resources/shared/gateway-service-local.yml

@@ -70,10 +70,10 @@ spring:
         filters:
         - SwaggerHeaderFilter
         - StripPrefix=2
-      - id: icss
+      - id: icssold
         uri: http://192.168.2.165:8080
         predicates:
-        - Path=/api/icss/**
+        - Path=/api/icssold/**
         filters:
         - StripPrefix=2
       - id: triage-service
@@ -83,10 +83,24 @@ spring:
         filters:
         - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: icss-service
+        uri: lb://icss-service
+        predicates:
+        - Path=/api/icss/**
+        filters:
+        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: icssman-service
+        uri: lb://icssman-service
+        predicates:
+        - Path=/api/icssman/**
+        filters:
+        - SwaggerHeaderFilter
+        - StripPrefix=2
 
 server:
   port: 5050
 
 lantone:
-  product: triage,1;icss,2
+  product: triage33,1;icsstt,2
 

+ 17 - 2
config-server/src/main/resources/shared/gateway-service-pro.yml

@@ -70,10 +70,10 @@ spring:
         filters:
         - SwaggerHeaderFilter
         - StripPrefix=2
-      - id: icss
+      - id: icssold
         uri: http://192.168.2.165:8080
         predicates:
-        - Path=/api/icss/**
+        - Path=/api/icssold/**
         filters:
         - StripPrefix=2
       - id: triage-service
@@ -83,6 +83,21 @@ spring:
         filters:
         - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: icss-service
+        uri: lb://icss-service
+        predicates:
+        - Path=/api/icss/**
+        filters:
+        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: icssman-service
+        uri: lb://icssman-service
+        predicates:
+        - Path=/api/icssman/**
+        filters:
+        - SwaggerHeaderFilter
+        - StripPrefix=2
+
 
 server:
   port: 5050

+ 18 - 3
config-server/src/main/resources/shared/gateway-service-test.yml

@@ -70,10 +70,10 @@ spring:
         filters:
         - SwaggerHeaderFilter
         - StripPrefix=2
-      - id: icss
+      - id: icssold
         uri: http://192.168.2.164:8080
         predicates:
-        - Path=/api/icss/**
+        - Path=/api/icssold/**
         filters:
         - StripPrefix=2
       - id: triage-service
@@ -83,10 +83,25 @@ spring:
         filters:
         - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: icss-service
+        uri: lb://icss-service
+        predicates:
+        - Path=/api/icss/**
+        filters:
+        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: icssman-service
+        uri: lb://icssman-service
+        predicates:
+        - Path=/api/icssman/**
+        filters:
+        - SwaggerHeaderFilter
+        - StripPrefix=2
+
 
 server:
   port: 5050
 
 lantone:
-  product: triage33,1;icss,2
+  product: triage33,1;icsstt,2
 

+ 94 - 0
config-server/src/main/resources/shared/icss-service-dev.yml

@@ -0,0 +1,94 @@
+server:
+  port: 8843
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driverClassName: com.mysql.jdbc.Driver
+      driver-class-name: com.mysql.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.236:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: root
+      password: lantone
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters.commons-log.connection-logger-name: stat,wall,log4j
+      filter.stat.log-slow-sql: true
+      filter.stat.slow-sql-millis: 2000
+      #监控配置
+      web-stat-filter:
+        enabled: true
+        url-pattern: /*
+        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.236
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+

+ 94 - 0
config-server/src/main/resources/shared/icss-service-local.yml

@@ -0,0 +1,94 @@
+server:
+  port: 8843
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driverClassName: com.mysql.jdbc.Driver
+      driver-class-name: com.mysql.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.236:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: root
+      password: lantone
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters.commons-log.connection-logger-name: stat,wall,log4j
+      filter.stat.log-slow-sql: true
+      filter.stat.slow-sql-millis: 2000
+      #监控配置
+      web-stat-filter:
+        enabled: true
+        url-pattern: /*
+        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: localhost
+    port: 5672
+    username: guest
+    password: guest
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+

+ 94 - 0
config-server/src/main/resources/shared/icss-service-pro.yml

@@ -0,0 +1,94 @@
+server:
+  port: 8843
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driverClassName: com.mysql.jdbc.Driver
+      driver-class-name: com.mysql.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.236:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: root
+      password: lantone
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters.commons-log.connection-logger-name: stat,wall,log4j
+      filter.stat.log-slow-sql: true
+      filter.stat.slow-sql-millis: 2000
+      #监控配置
+      web-stat-filter:
+        enabled: true
+        url-pattern: /*
+        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.236
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+

+ 94 - 0
config-server/src/main/resources/shared/icss-service-test.yml

@@ -0,0 +1,94 @@
+server:
+  port: 8843
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driverClassName: com.mysql.jdbc.Driver
+      driver-class-name: com.mysql.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.241:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: root
+      password: lantone
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters.commons-log.connection-logger-name: stat,wall,log4j
+      filter.stat.log-slow-sql: true
+      filter.stat.slow-sql-millis: 2000
+      #监控配置
+      web-stat-filter:
+        enabled: true
+        url-pattern: /*
+        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.241
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+

+ 94 - 0
config-server/src/main/resources/shared/icssman-service-dev.yml

@@ -0,0 +1,94 @@
+server:
+  port: 8844
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driverClassName: com.mysql.jdbc.Driver
+      driver-class-name: com.mysql.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.236:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: root
+      password: lantone
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters.commons-log.connection-logger-name: stat,wall,log4j
+      filter.stat.log-slow-sql: true
+      filter.stat.slow-sql-millis: 2000
+      #监控配置
+      web-stat-filter:
+        enabled: true
+        url-pattern: /*
+        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.236
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+

+ 94 - 0
config-server/src/main/resources/shared/icssman-service-local.yml

@@ -0,0 +1,94 @@
+server:
+  port: 8844
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driverClassName: com.mysql.jdbc.Driver
+      driver-class-name: com.mysql.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.236:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: root
+      password: lantone
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters.commons-log.connection-logger-name: stat,wall,log4j
+      filter.stat.log-slow-sql: true
+      filter.stat.slow-sql-millis: 2000
+      #监控配置
+      web-stat-filter:
+        enabled: true
+        url-pattern: /*
+        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: localhost
+    port: 5672
+    username: guest
+    password: guest
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+

+ 94 - 0
config-server/src/main/resources/shared/icssman-service-pro.yml

@@ -0,0 +1,94 @@
+server:
+  port: 8844
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driverClassName: com.mysql.jdbc.Driver
+      driver-class-name: com.mysql.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.236:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: root
+      password: lantone
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters.commons-log.connection-logger-name: stat,wall,log4j
+      filter.stat.log-slow-sql: true
+      filter.stat.slow-sql-millis: 2000
+      #监控配置
+      web-stat-filter:
+        enabled: true
+        url-pattern: /*
+        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.236
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+

+ 94 - 0
config-server/src/main/resources/shared/icssman-service-test.yml

@@ -0,0 +1,94 @@
+server:
+  port: 8844
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driverClassName: com.mysql.jdbc.Driver
+      driver-class-name: com.mysql.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.241:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: root
+      password: lantone
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters.commons-log.connection-logger-name: stat,wall,log4j
+      filter.stat.log-slow-sql: true
+      filter.stat.slow-sql-millis: 2000
+      #监控配置
+      web-stat-filter:
+        enabled: true
+        url-pattern: /*
+        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.241
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+

+ 1 - 1
diagbotman-service/src/main/java/com/diagbot/aop/SysLoggerExprotAspect.java

@@ -68,7 +68,7 @@ public class SysLoggerExprotAspect {
             sysLog.setUsername(username);
         }
         sysLog.setGmtCreate(new Date());
-        sysLog.setSysType(SysTypeEnum.USER_SERVICE.getKey());
+        sysLog.setSysType(SysTypeEnum.DIAGBOTMAN_SERVICE.getKey());
         //保存系统日志
         mySender.outputLogSend(sysLog);
     }

+ 1 - 1
diagbotman-service/src/main/resources/logback-spring.xml

@@ -268,7 +268,7 @@
     </springProfile>
 
     <!-- 生产环境下的日志配置 -->
-    <springProfile name="prod">
+    <springProfile name="pro">
         <root level="INFO">
             <appender-ref ref="ERROR"/>
             <appender-ref ref="WARN"/>

+ 24 - 0
docker-compose.yml

@@ -131,4 +131,28 @@ services:
     environment:
     - spring.profiles.active=dev
     - myuri=eureka1
+    restart: always
+  icss-service:
+    image: 192.168.2.236:5000/diagbotcloud/icss-service:0.0.1-SNAPSHOT
+    depends_on:
+    #      - config1
+    - eureka1
+    volumes:
+    - "/etc/localtime:/etc/localtime:ro"
+    #      - "data/diagbotcloud/logs:/logs"
+    environment:
+    - spring.profiles.active=dev
+    - myuri=eureka1
+    restart: always
+  icssman-service:
+    image: 192.168.2.236:5000/diagbotcloud/icssman-service:0.0.1-SNAPSHOT
+    depends_on:
+    #      - config1
+    - eureka1
+    volumes:
+    - "/etc/localtime:/etc/localtime:ro"
+    #      - "data/diagbotcloud/logs:/logs"
+    environment:
+    - spring.profiles.active=dev
+    - myuri=eureka1
     restart: always

+ 7 - 4
docs/003.20181024初始化脚本/init_diagbotcloud.sql

@@ -25,7 +25,7 @@ SET FOREIGN_KEY_CHECKS=0;
 -- ----------------------------
 DROP TABLE IF EXISTS `diag_lantone_product`;
 CREATE TABLE `diag_lantone_product` (
-  `id` bigint(12) NOT NULL AUTO_INCREMENT COMMENT '产品id',
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '产品id',
   `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除 N:未删除,Y:删除',
   `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
   `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
@@ -168,7 +168,7 @@ CREATE TABLE `diag_service_token` (
 -- ----------------------------
 DROP TABLE IF EXISTS `diag_user_renewals`;
 CREATE TABLE `diag_user_renewals` (
-  `id` bigint(12) NOT NULL AUTO_INCREMENT COMMENT '续费id',
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '续费id',
   `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除 N:未删除,Y:删除',
   `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00'  COMMENT '记录创建时间,默认(1970-01-01 12:00:00)',
   `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00'  COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
@@ -462,7 +462,7 @@ CREATE TABLE `sys_permission` (
   `descritpion` varchar(255) NOT NULL DEFAULT '' COMMENT '资源描述',
   `remark` varchar(255) DEFAULT NULL COMMENT '备注',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=85 DEFAULT CHARSET=utf8 COMMENT='系统资源表';
+) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8 COMMENT='系统资源表';
 
 -- ----------------------------
 -- Records of sys_permission
@@ -540,6 +540,8 @@ INSERT INTO `sys_permission` VALUES ('81', 'N', '1970-01-01 12:00:00', '1970-01-
 INSERT INTO `sys_permission` VALUES ('82', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '续费管理-取消续费', '/userRenewals/cancelRenewalsInfos', 'ALL', '续费管理-取消续费', null);
 INSERT INTO `sys_permission` VALUES ('83', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '客户中心-认证用户信息和机构信息不通过接口(新)', '/userInfo/auditUserInfoAllNopass', 'ALL', '客户中心-认证用户信息和机构信息不通过接口(新)', null);
 INSERT INTO `sys_permission` VALUES ('84', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '客户中心-认证用户信息和机构信息通过接口(新)', '/userInfo/auditUserInfoAllPass', 'ALL', '客户中心-认证用户信息和机构信息通过接口(新)', null);
+INSERT INTO `sys_permission` VALUES ('85', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '客户中心-已开通产品状态校验', '/productOrder/openProductCheck', 'ALL', '客户中心-已开通产品状态校验', NULL);
+
 
 
 /*
@@ -675,7 +677,7 @@ CREATE TABLE `sys_role_permission` (
   `permission_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '资源id',
   `remark` varchar(255) DEFAULT NULL COMMENT '备注',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=103 DEFAULT CHARSET=utf8 COMMENT='角色和资源的映射表';
+) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=utf8 COMMENT='角色和资源的映射表';
 
 -- ----------------------------
 -- Records of sys_role_permission
@@ -754,6 +756,7 @@ INSERT INTO `sys_role_permission` VALUES ('99', 'N', '1970-01-01 12:00:00', '197
 INSERT INTO `sys_role_permission` VALUES ('100', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '82', '续费管理-取消续费');
 INSERT INTO `sys_role_permission` VALUES ('101', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '83', '客户中心-认证用户信息和机构信息不通过接口(新)');
 INSERT INTO `sys_role_permission` VALUES ('102', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '84', '客户中心-认证用户信息和机构信息通过接口(新)');
+INSERT INTO `sys_role_permission` VALUES ('103', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '85', '客户中心-已开通产品状态校验');
 
 
 /*

+ 1 - 1
eureka-server/src/main/resources/logback-spring.xml

@@ -268,7 +268,7 @@
     </springProfile>
 
     <!-- 生产环境下的日志配置 -->
-    <springProfile name="prod">
+    <springProfile name="pro">
         <root level="INFO">
             <appender-ref ref="ERROR"/>
             <appender-ref ref="WARN"/>

+ 1 - 1
feedback-service/src/main/resources/logback-spring.xml

@@ -268,7 +268,7 @@
     </springProfile>
 
     <!-- 生产环境下的日志配置 -->
-    <springProfile name="prod">
+    <springProfile name="pro">
         <root level="INFO">
             <appender-ref ref="ERROR"/>
             <appender-ref ref="WARN"/>

+ 1 - 1
gateway-service/src/main/resources/logback-spring.xml

@@ -251,7 +251,7 @@
     </springProfile>
 
     <!-- 生产环境下的日志配置 -->
-    <springProfile name="prod">
+    <springProfile name="pro">
         <root level="INFO">
             <appender-ref ref="ERROR" />
             <appender-ref ref="WARN" />

+ 25 - 0
icss-service/.gitignore

@@ -0,0 +1,25 @@
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/build/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/

+ 184 - 0
icss-service/pom.xml

@@ -0,0 +1,184 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.diagbot</groupId>
+    <artifactId>icss-service</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <name>icss-service</name>
+    <description>ICSS Service for Spring Boot</description>
+
+    <parent>
+        <groupId>com.diagbot</groupId>
+        <artifactId>diagbotcloud</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.diagbot</groupId>
+            <artifactId>common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+        </dependency>
+
+        <!-- 配置-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-config</artifactId>
+        </dependency>
+
+        <!-- 开启web-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-undertow</artifactId>
+        </dependency>
+
+        <!-- 开启feign-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+
+        <!-- dashboard -->
+        <!-- actuator-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <!--hystrix-dashboard-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
+        </dependency>
+        <!--hystrix -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
+        </dependency>
+
+        <!-- zipkin-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-zipkin</artifactId>
+        </dependency>
+
+        <!--swagger-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+        </dependency>
+        <!--database-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!--security-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-oauth2</artifactId>
+        </dependency>
+
+        <!-- mq -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-amqp</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>net.logstash.logback</groupId>
+            <artifactId>logstash-logback-encoder</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bus-amqp</artifactId>
+        </dependency>
+
+        <!-- mybatis-plus begin -->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
+        <!-- mybatis-plus end -->
+
+        <!-- 阿里巴巴druid数据库连接池 -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+        </dependency>
+
+        <!-- springboot整合mybatis(核心就这一个) -->
+        <!-- 注意顺序,这个一定要放在最下面 -->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <!-- 添加docker-maven插件 -->
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <configuration>
+                    <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
+                    <forceTags>true</forceTags>
+                    <!--镜像的FROM,使用压缩的小镜像-->
+                    <baseImage>frolvlad/alpine-oraclejdk8:slim</baseImage>
+                    <entryPoint>["java", "-jar", "-Xms256m", "-Xmx1024m", "-Duser.timezone=GMT+8", "/${project.build.finalName}.jar"]</entryPoint>
+                    <resources>
+                        <resource>
+                            <targetPath>/</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${project.build.finalName}.jar</include>
+                        </resource>
+                    </resources>
+                    <serverId>docker-registry</serverId>
+                    <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 34 - 0
icss-service/src/main/java/com/diagbot/IcssServiceApplication.java

@@ -0,0 +1,34 @@
+package com.diagbot;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
+import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
+import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
+import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.cloud.netflix.hystrix.EnableHystrix;
+import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+
+/**
+ * @Description: BI服务启动文件
+ * @author: gaodm
+ * @time: 2018/8/7 9:24
+ */
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
+        JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class })
+@EnableEurekaClient
+@EnableFeignClients({ "com.diagbot.client" })
+@EnableHystrixDashboard
+@EnableHystrix
+@EnableCircuitBreaker
+@RefreshScope
+public class IcssServiceApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(IcssServiceApplication.class, args);
+    }
+}

+ 76 - 0
icss-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -0,0 +1,76 @@
+package com.diagbot.aop;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.entity.SysLog;
+import com.diagbot.enums.SysTypeEnum;
+import com.diagbot.rabbit.MySender;
+import com.diagbot.util.GsonUtil;
+import com.diagbot.util.HttpUtils;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Method;
+import java.util.Date;
+
+/**
+ * @Description: 日志拦截切面
+ * @author: gaodm
+ * @time: 2018/8/2 13:36
+ */
+@Aspect
+@Component
+public class SysLoggerAspect {
+    @Autowired
+    private MySender mySender;
+
+    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
+    public void loggerPointCut() {
+
+    }
+
+    @Before("loggerPointCut()")
+    public void saveSysLog(JoinPoint joinPoint) {
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        Method method = signature.getMethod();
+
+        SysLog sysLog = new SysLog();
+        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
+        if (sysLogger != null) {
+            //注解上的描述
+            sysLog.setOperation(sysLogger.value());
+        }
+        //请求的方法名
+        String className = joinPoint.getTarget().getClass().getName();
+        String methodName = signature.getName();
+        sysLog.setMethod(className + "." + methodName + "()");
+        //请求的参数
+        Object[] args = joinPoint.getArgs();
+        String params = "";
+        for (Object o : args) {
+            params += GsonUtil.toJson(o);
+        }
+        if (!StringUtil.isEmpty(params)) {
+            sysLog.setParams(params);
+        }
+        //设置IP地址
+        sysLog.setIp(HttpUtils.getIpAddress());
+        //用户名
+        String username = UserUtils.getCurrentPrinciple();
+        if (!StringUtil.isEmpty(username)) {
+            sysLog.setUsername(username);
+        }
+        sysLog.setGmtCreate(new Date());
+        sysLog.setSysType(SysTypeEnum.ICSS_SERVICE.getKey());
+        //保存系统日志
+        mySender.outputLogSend(sysLog);
+    }
+
+}
+

+ 25 - 0
icss-service/src/main/java/com/diagbot/client/UserServiceClient.java

@@ -0,0 +1,25 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.UserServiceHystrix;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.User;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestHeader;
+
+
+/**
+ * @Description: 调用用户服务
+ * @author: gaodm
+ * @time: 2018/8/6 9:52
+ */
+@FeignClient(value = "user-service", fallback = UserServiceHystrix.class)
+public interface UserServiceClient {
+
+    @PostMapping(value = "/user/{username}")
+    RespDTO<User> getUser(@RequestHeader(value = "Authorization") String token, @PathVariable("username") String username);
+}
+
+
+

+ 23 - 0
icss-service/src/main/java/com/diagbot/client/hystrix/UserServiceHystrix.java

@@ -0,0 +1,23 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.client.UserServiceClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.User;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * @Description: 调用用户服务
+ * @author: gaodm
+ * @time: 2018/8/6 9:52
+ */
+@Component
+public class UserServiceHystrix implements UserServiceClient {
+
+    @Override
+    public RespDTO<User> getUser(String token, String username) {
+        System.out.println(token);
+        System.out.println(username);
+        return null;
+    }
+}

+ 19 - 0
icss-service/src/main/java/com/diagbot/config/CustomAccessTokenConverter.java

@@ -0,0 +1,19 @@
+package com.diagbot.config;
+
+import org.springframework.security.oauth2.provider.OAuth2Authentication;
+import org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Component
+public class CustomAccessTokenConverter extends DefaultAccessTokenConverter {
+
+    @Override
+    public OAuth2Authentication extractAuthentication(Map<String, ?> claims) {
+        OAuth2Authentication authentication = super.extractAuthentication(claims);
+        authentication.setDetails(claims);
+        return authentication;
+    }
+
+}

+ 15 - 0
icss-service/src/main/java/com/diagbot/config/GlobalMethodSecurityConfigurer.java

@@ -0,0 +1,15 @@
+package com.diagbot.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+
+/**
+ * @Description: 安全配置类
+ * @author: gaodm
+ * @time: 2018/8/2 13:38
+ */
+@Configuration
+@EnableGlobalMethodSecurity(prePostEnabled = true)
+public class GlobalMethodSecurityConfigurer {
+
+}

+ 48 - 0
icss-service/src/main/java/com/diagbot/config/JwtConfigurer.java

@@ -0,0 +1,48 @@
+package com.diagbot.config;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.security.oauth2.provider.token.TokenStore;
+import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
+import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
+import org.springframework.util.FileCopyUtils;
+
+import java.io.IOException;
+
+/**
+ * @Description: JWT配置类
+ * @author: gaodm
+ * @time: 2018/8/2 13:38
+ */
+@Configuration
+public class JwtConfigurer {
+    @Autowired
+    private CustomAccessTokenConverter customAccessTokenConverter;
+
+    @Bean
+    @Qualifier("tokenStore")
+    public TokenStore tokenStore() {
+
+        System.out.println("Created JwtTokenStore");
+        return new JwtTokenStore(jwtTokenEnhancer());
+    }
+
+    @Bean
+    protected JwtAccessTokenConverter jwtTokenEnhancer() {
+        JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
+        Resource resource = new ClassPathResource("public.cert");
+        String publicKey;
+        try {
+            publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream()));
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        converter.setVerifierKey(publicKey);
+        converter.setAccessTokenConverter(customAccessTokenConverter);
+        return converter;
+    }
+}

+ 29 - 0
icss-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -0,0 +1,29 @@
+package com.diagbot.config;
+
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * @Description: MybatisPlus配置类
+ * @author: gaodm
+ * @time: 2018/8/2 13:39
+ */
+@EnableTransactionManagement
+@Configuration
+@MapperScan("com.diagbot.mapper*")//这个注解,作用相当于下面的@Bean MapperScannerConfigurer,2者配置1份即可
+public class MybatisPlusConfigurer {
+
+    /**
+     * mybatis-plus分页插件<br>
+     * 文档:http://mp.baomidou.com<br>
+     */
+    @Bean
+    public PaginationInterceptor paginationInterceptor() {
+        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
+        return paginationInterceptor;
+    }
+
+}

+ 42 - 0
icss-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -0,0 +1,42 @@
+package com.diagbot.config;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
+import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
+import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer;
+import org.springframework.security.oauth2.provider.token.TokenStore;
+
+/**
+ * @Description: 权限资源配置类
+ * @author: gaodm
+ * @time: 2018/8/2 14:21
+ */
+@Configuration
+@EnableResourceServer
+public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
+    Logger log = LoggerFactory.getLogger(ResourceServerConfigurer.class);
+
+    @Override
+    public void configure(HttpSecurity http) throws Exception {
+        http
+                .csrf().disable()
+                .authorizeRequests()
+//                .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
+//                .antMatchers("/**").authenticated();
+                .antMatchers("/**").permitAll();
+    }
+
+
+    @Override
+    public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
+        log.info("Configuring ResourceServerSecurityConfigurer ");
+        resources.resourceId("user-service").tokenStore(tokenStore);
+    }
+
+    @Autowired
+    TokenStore tokenStore;
+}

+ 69 - 0
icss-service/src/main/java/com/diagbot/config/SwaggerConfigurer.java

@@ -0,0 +1,69 @@
+package com.diagbot.config;
+
+
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.ParameterBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.schema.ModelRef;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Parameter;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * @Description: Swagger配置类
+ * @author: gaodm
+ * @time: 2018/8/2 14:21
+ */
+@Configuration
+@ConditionalOnProperty(prefix = "swagger", value = { "enable" }, havingValue = "true")
+@EnableSwagger2
+public class SwaggerConfigurer {
+    /**
+     * 全局参数
+     *
+     * @return
+     */
+    private List<Parameter> parameter() {
+        List<Parameter> params = new ArrayList<>();
+        params.add(new ParameterBuilder().name("Authorization")
+                .description("Authorization Bearer token")
+                .modelRef(new ModelRef("string"))
+                .parameterType("header")
+                .required(false).build());
+        return params;
+    }
+
+
+    @Bean
+    public Docket sysApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .apiInfo(apiInfo())
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.diagbot.web"))
+                .paths(PathSelectors.any())
+                .build().globalOperationParameters(parameter());
+        //.securitySchemes(newArrayList(oauth()))
+        // .securityContexts(newArrayList(securityContext()));
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder()
+                .title(" icss-service api ")
+                .description("icss-service 微服务")
+                .termsOfServiceUrl("")
+                .contact("diagbot")
+                .version("1.0")
+                .build();
+    }
+
+}

+ 79 - 0
icss-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -0,0 +1,79 @@
+package com.diagbot.config.security;
+
+import org.springframework.security.access.AccessDecisionManager;
+import org.springframework.security.access.AccessDeniedException;
+import org.springframework.security.access.ConfigAttribute;
+import org.springframework.security.authentication.InsufficientAuthenticationException;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Collection;
+
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:46
+ */
+@Service
+public class UrlAccessDecisionManager implements AccessDecisionManager {
+    @Override
+    public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> configAttributes) throws AccessDeniedException, InsufficientAuthenticationException {
+//        HttpServletRequest request = ((FilterInvocation) object).getHttpRequest();
+//        String url, method;
+//        if (matchPermitAllUrl(request)) {
+//            return;
+//        }
+//        if ("anonymousUser".equals(authentication.getPrincipal())) {
+//            throw new AccessDeniedException("no right");
+//        } else {
+//            for (GrantedAuthority ga : authentication.getAuthorities()) {
+//                String[] authority = ga.getAuthority().split(";");
+//                url = authority[0];
+//                method = authority[1];
+//                if (matchers(url, request)) {
+//                    if (method.equals(request.getMethod()) || "ALL".equals(method)) {
+//                        return;
+//                    }
+//                }
+//            }
+//        }
+//        throw new AccessDeniedException("no right");
+    }
+
+
+    @Override
+    public boolean supports(ConfigAttribute attribute) {
+        return true;
+    }
+
+    @Override
+    public boolean supports(Class<?> clazz) {
+        return true;
+    }
+
+    private Boolean matchPermitAllUrl(HttpServletRequest request){
+        if (matchers("/swagger/**", request)
+                || matchers("/v2/**", request)
+                || matchers("/swagger-ui.html/**", request)
+                || matchers("/swagger-resources/**", request)
+                || matchers("/webjars/**", request)
+                || matchers("/druid/**", request)
+                || matchers("/actuator/**", request)
+                || matchers("/hystrix/**", request)
+                || matchers("/", request)) {
+            return true;
+        }
+        return false;
+    }
+
+    private boolean matchers(String url, HttpServletRequest request) {
+        AntPathRequestMatcher matcher = new AntPathRequestMatcher(url);
+        if (matcher.matches(request)) {
+            return true;
+        }
+        return false;
+    }
+}

+ 29 - 0
icss-service/src/main/java/com/diagbot/config/security/UrlConfigAttribute.java

@@ -0,0 +1,29 @@
+package com.diagbot.config.security;
+
+import org.springframework.security.access.ConfigAttribute;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:47
+ */
+public class UrlConfigAttribute implements ConfigAttribute {
+
+    private final HttpServletRequest httpServletRequest;
+
+    public UrlConfigAttribute(HttpServletRequest httpServletRequest) {
+        this.httpServletRequest = httpServletRequest;
+    }
+
+
+    @Override
+    public String getAttribute() {
+        return null;
+    }
+
+    public HttpServletRequest getHttpServletRequest() {
+        return httpServletRequest;
+    }
+}

+ 79 - 0
icss-service/src/main/java/com/diagbot/config/security/UrlFilterSecurityInterceptor.java

@@ -0,0 +1,79 @@
+package com.diagbot.config.security;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.SecurityMetadataSource;
+import org.springframework.security.access.intercept.AbstractSecurityInterceptor;
+import org.springframework.security.access.intercept.InterceptorStatusToken;
+import org.springframework.security.web.FilterInvocation;
+import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import java.io.IOException;
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:47
+ */
+@Service
+public class UrlFilterSecurityInterceptor extends AbstractSecurityInterceptor implements Filter {
+
+
+    @Autowired
+    private FilterInvocationSecurityMetadataSource securityMetadataSource;
+
+    @Autowired
+    public void setUrlAccessDecisionManager(UrlAccessDecisionManager urlAccessDecisionManager) {
+        super.setAccessDecisionManager(urlAccessDecisionManager);
+    }
+
+
+    @Override
+    public void init(FilterConfig filterConfig) throws ServletException {
+
+    }
+
+    @Override
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+
+        FilterInvocation fi = new FilterInvocation(request, response, chain);
+        invoke(fi);
+    }
+
+
+    public void invoke(FilterInvocation fi) throws IOException, ServletException {
+        //fi里面有一个被拦截的url
+        //里面调用UrlMetadataSource的getAttributes(Object object)这个方法获取fi对应的所有权限
+        //再调用UrlAccessDecisionManager的decide方法来校验用户的权限是否足够
+        InterceptorStatusToken token = super.beforeInvocation(fi);
+        try {
+            //执行下一个拦截器
+            fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
+        } finally {
+            super.afterInvocation(token, null);
+        }
+    }
+
+
+    @Override
+    public void destroy() {
+
+    }
+
+    @Override
+    public Class<?> getSecureObjectClass() {
+        return FilterInvocation.class;
+
+    }
+
+    @Override
+    public SecurityMetadataSource obtainSecurityMetadataSource() {
+        return this.securityMetadataSource;
+    }
+}

+ 40 - 0
icss-service/src/main/java/com/diagbot/config/security/UrlMetadataSourceService.java

@@ -0,0 +1,40 @@
+package com.diagbot.config.security;
+
+import org.springframework.security.access.ConfigAttribute;
+import org.springframework.security.web.FilterInvocation;
+import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:47
+ */
+@Service
+public class UrlMetadataSourceService implements
+        FilterInvocationSecurityMetadataSource {
+
+    @Override
+    public Collection<ConfigAttribute> getAttributes(Object object) throws IllegalArgumentException {
+        final HttpServletRequest request = ((FilterInvocation) object).getRequest();
+        Set<ConfigAttribute> allAttributes = new HashSet<>();
+        ConfigAttribute configAttribute = new UrlConfigAttribute(request);
+        allAttributes.add(configAttribute);
+        return allAttributes;
+    }
+
+    @Override
+    public Collection<ConfigAttribute> getAllConfigAttributes() {
+        return null;
+    }
+
+    @Override
+    public boolean supports(Class<?> clazz) {
+        return true;
+    }
+}

+ 19 - 0
icss-service/src/main/java/com/diagbot/dto/IntroduceDTO.java

@@ -0,0 +1,19 @@
+package com.diagbot.dto;
+
+import com.diagbot.entity.IntroduceDetail;
+import com.diagbot.entity.IntroduceInfo;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 10:32
+ */
+@Getter
+@Setter
+public class IntroduceDTO extends IntroduceInfo {
+    private List<IntroduceDetail> introduceDetailList;
+}

+ 39 - 0
icss-service/src/main/java/com/diagbot/dto/QuestionDTO.java

@@ -0,0 +1,39 @@
+package com.diagbot.dto;
+
+import com.diagbot.entity.QuestionDetail;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description: 返回标签内容
+ * @Author: ztg
+ * @Date: 2018/10/24 16:11
+ */
+@Getter
+@Setter
+public class QuestionDTO {
+
+    private Long id;// id
+    private String name;//内容
+    private String tagName;//标签名称
+    private Integer type;//类型(1:主诉 2:现病史 3:其他史 4:查体,5:化验 6:辅检 7:诊断)
+    private Integer controlType; //控件类型
+    private Integer subType; //子类型
+    private String isGroup; //组合项标识(0:单项  1:组合项)
+    private String addLine; //添加换行符(0:不换行,1:换行)
+    private String labelPrefix; //前置内容
+    private String labelSuffix; //后置内容
+    private BigDecimal minValue; //最小值
+    private BigDecimal maxValue; //最大值
+    private String judgeType; //判断类型(0:本身异常;1:本身正常;2:数字范围;3:计算公式;9:无需判断)
+    private String tagQuestions; //标签关联questions
+    private String copyType;//是否显示 + (0:不显示 1 :显示)
+    private List<QuestionDetail> questionDetailList = new ArrayList<>(); //标签明细表
+    private List<QuestionDTO> questionMapping = new ArrayList<>();     //下级标签
+//    private List<QuestionDTO> questionRelationList = new ArrayList<>(); //同级标签
+    private String remark;//备注
+}

+ 146 - 0
icss-service/src/main/java/com/diagbot/entity/DeptVital.java

@@ -0,0 +1,146 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 科室查体对应表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+@TableName("icss_dept_vital")
+public class DeptVital implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 科室id
+     */
+    private Long deptId;
+
+    /**
+     * 查体id(question_id)
+     */
+    private Long vitalId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+    public Long getVitalId() {
+        return vitalId;
+    }
+
+    public void setVitalId(Long vitalId) {
+        this.vitalId = vitalId;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "DeptVital{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", deptId=" + deptId +
+        ", vitalId=" + vitalId +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 172 - 0
icss-service/src/main/java/com/diagbot/entity/IntroduceDetail.java

@@ -0,0 +1,172 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 提示信息明细
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+@TableName("icss_introduce_detail")
+public class IntroduceDetail implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 提示信息id
+     */
+    private Long introduceId;
+
+    /**
+     * 提示明细标题
+     */
+    private String title;
+
+    /**
+     * 提示明细内容
+     */
+    private String content;
+
+    /**
+     * 提示明细序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 显示位置:1-右侧显示,0-都显示
+     */
+    private Integer position;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getIntroduceId() {
+        return introduceId;
+    }
+
+    public void setIntroduceId(Long introduceId) {
+        this.introduceId = introduceId;
+    }
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public Integer getPosition() {
+        return position;
+    }
+
+    public void setPosition(Integer position) {
+        this.position = position;
+    }
+
+    @Override
+    public String toString() {
+        return "IntroduceDetail{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", introduceId=" + introduceId +
+        ", title=" + title +
+        ", content=" + content +
+        ", orderNo=" + orderNo +
+        ", position=" + position +
+        "}";
+    }
+}

+ 133 - 0
icss-service/src/main/java/com/diagbot/entity/IntroduceInfo.java

@@ -0,0 +1,133 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 提示信息
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+@TableName("icss_introduce_info")
+public class IntroduceInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "IntroduceInfo{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", name=" + name +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 157 - 0
icss-service/src/main/java/com/diagbot/entity/IntroduceMap.java

@@ -0,0 +1,157 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 标签与提示信息映射表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+@TableName("icss_introduce_map")
+public class IntroduceMap implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 标签id
+     */
+    private Long questionId;
+
+    /**
+     * 提示信息id
+     */
+    private Long introduceId;
+
+    /**
+     * 类型(参照icss_question_info)
+     */
+    private Integer type;
+
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getQuestionId() {
+        return questionId;
+    }
+
+    public void setQuestionId(Long questionId) {
+        this.questionId = questionId;
+    }
+    public Long getIntroduceId() {
+        return introduceId;
+    }
+
+    public void setIntroduceId(Long introduceId) {
+        this.introduceId = introduceId;
+    }
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "IntroduceMap{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", questionId=" + questionId +
+        ", introduceId=" + introduceId +
+        ", type=" + type +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 68 - 0
icss-service/src/main/java/com/diagbot/entity/ModuleInfo.java

@@ -0,0 +1,68 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 模型表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+@Getter
+@Setter
+@TableName("icss_module_info")
+public class ModuleInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 94 - 0
icss-service/src/main/java/com/diagbot/entity/ModuleQuestion.java

@@ -0,0 +1,94 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 模型标签映射表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+@Getter
+@Setter
+@TableName("icss_module_question")
+public class ModuleQuestion implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 模型id
+     */
+    private Long moduleId;
+
+    /**
+     * question_id
+     */
+    private Long questionId;
+
+    /**
+     * 显示内容
+     */
+    private String name;
+
+    /**
+     * 前置内容
+     */
+    private String prefix;
+
+    /**
+     * 后置内容
+     */
+    private String suffix;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+}

+ 60 - 0
icss-service/src/main/java/com/diagbot/entity/QuestionDetail.java

@@ -0,0 +1,60 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 标签明细表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+@Getter
+@Setter
+@TableName("icss_question_detail")
+public class QuestionDetail implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * question_id
+     */
+    private Long questionId;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 是否默认被选中(0:不选中,1:选中)
+     */
+    private String defaultSelect;
+
+    /**
+     * 换行符(0:不换行, 1: 换行符)
+     */
+    private String addLine;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+}

+ 125 - 0
icss-service/src/main/java/com/diagbot/entity/QuestionInfo.java

@@ -0,0 +1,125 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 标签基础表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+@Getter
+@Setter
+@TableName("icss_question_info")
+public class QuestionInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 内容
+     */
+    private String name;
+
+    /**
+     * 标签名
+     */
+    private String tagName;
+
+    /**
+     * 性别(1:男 2:女 3:通用)
+     */
+    private Integer sexType;
+
+    /**
+     * 最小年龄
+     */
+    private Integer ageBegin;
+
+    /**
+     * 最大年龄
+     */
+    private Integer ageEnd;
+
+    /**
+     * 类型(1:主诉 2:现病史 3:其他史 4:查体,5:化验 6:辅检 7:诊断)
+     */
+    private Integer type;
+
+    /**
+     * 控件类型(0:标签 1:下拉单选 2:下拉多选 3:联合下拉单选 4:联合下拉多选 5:占位标签)
+     */
+    private Integer controlType;
+
+    /**
+     * 输入框的格式
+     */
+    private Integer inputFormat;
+
+    /**
+     * 子类型,(31:既往史 32:家族史 33:个人史 34:月经史 35:婚育史)
+     */
+    private Integer subType;
+
+    /**
+     * 组合项标识(0:单项  1:组合项)
+     */
+    private String isGroup;
+
+    /**
+     * 添加换行符(0:不换行,1:换行)
+     */
+    private String addLine;
+
+    /**
+     * 前置内容
+     */
+    private String labelPrefix;
+
+    /**
+     * 后置内容
+     */
+    private String labelSuffix;
+
+    /**
+     * 最小值
+     */
+    private BigDecimal minValue;
+
+    /**
+     * 最大值
+     */
+    private BigDecimal maxValue;
+
+    /**
+     * 判断类型(0:本身异常;1:本身正常;2:数字范围;3:计算公式;9:无需判断)
+     */
+    private String judgeType;
+
+    /**
+     * 标签关联questions
+     */
+    private String tagQuestions;
+
+    /**
+     * 是否显示 + (0:不显示 1 :显示)
+     */
+    private String copyType;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 84 - 0
icss-service/src/main/java/com/diagbot/entity/QuestionMapping.java

@@ -0,0 +1,84 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 标签映射表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+@TableName("icss_question_mapping")
+public class QuestionMapping implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 上级question
+     */
+    private Long parentQuestion;
+
+    /**
+     * 下级question
+     */
+    private Long sonQuestion;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 显示位置(0:在标签后,1:在标签前)
+     */
+    private Integer position;
+
+    /**
+     * 主症状和伴随症状对应的question类型(0:症状公用 1:主症状特有 2:伴随症状特有 )
+     */
+    private Integer type;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 78 - 0
icss-service/src/main/java/com/diagbot/entity/QuestionRelation.java

@@ -0,0 +1,78 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 标签关联表(同级关联)
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+@Getter
+@Setter
+@TableName("icss_question_relation")
+public class QuestionRelation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 当前question
+     */
+    private Long curentQuestion;
+
+    /**
+     * 同级question
+     */
+    private Long siblingQuestion;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 170 - 0
icss-service/src/main/java/com/diagbot/entity/QuestionUsual.java

@@ -0,0 +1,170 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 常用标签表
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+@TableName("icss_question_usual")
+public class QuestionUsual implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 标签id
+     */
+    private Long questionId;
+
+    /**
+     * 科室id
+     */
+    private Long deptId;
+
+    /**
+     * 1:常见,0:不常见
+     */
+    private String usual;
+
+    private String type;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getQuestionId() {
+        return questionId;
+    }
+
+    public void setQuestionId(Long questionId) {
+        this.questionId = questionId;
+    }
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+    public String getUsual() {
+        return usual;
+    }
+
+    public void setUsual(String usual) {
+        this.usual = usual;
+    }
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionUsual{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", questionId=" + questionId +
+        ", deptId=" + deptId +
+        ", usual=" + usual +
+        ", type=" + type +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 147 - 0
icss-service/src/main/java/com/diagbot/entity/Retrieval.java

@@ -0,0 +1,147 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 检索表
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+@TableName("icss_retrieval")
+public class Retrieval implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 拼音
+     */
+    private String spell;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getSpell() {
+        return spell;
+    }
+
+    public void setSpell(String spell) {
+        this.spell = spell;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "Retrieval{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", name=" + name +
+        ", spell=" + spell +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 160 - 0
icss-service/src/main/java/com/diagbot/entity/RetrievalMapping.java

@@ -0,0 +1,160 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 检索映射表
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+@TableName("icss_retrieval_mapping")
+public class RetrievalMapping implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 检索id
+     */
+    private Long retrievalId;
+
+    /**
+     * 症状id
+     */
+    private Long questionId;
+
+    /**
+     * 显示类型(1:本体,2:同义词3:组合项目(生命体征-脉搏))
+     */
+    private Integer showType;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getRetrievalId() {
+        return retrievalId;
+    }
+
+    public void setRetrievalId(Long retrievalId) {
+        this.retrievalId = retrievalId;
+    }
+    public Long getQuestionId() {
+        return questionId;
+    }
+
+    public void setQuestionId(Long questionId) {
+        this.questionId = questionId;
+    }
+    public Integer getShowType() {
+        return showType;
+    }
+
+    public void setShowType(Integer showType) {
+        this.showType = showType;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "RetrievalMapping{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", retrievalId=" + retrievalId +
+        ", questionId=" + questionId +
+        ", showType=" + showType +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 196 - 0
icss-service/src/main/java/com/diagbot/entity/SysLog.java

@@ -0,0 +1,196 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 系统操作日志表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-14
+ */
+public class SysLog implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 日志ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 访问者的IP
+     */
+    private String ip;
+
+    /**
+     * 访问的系统类型 1:user-service,2:diagbotman-service,3:uaa-service,4:log-service,5:bi-service,6:knowledge-service,7:feedback-service,8:icss-web
+     */
+    private Integer sysType;
+
+    /**
+     * 方法
+     */
+    private String method;
+
+    /**
+     * 操作名
+     */
+    private String operation;
+
+    /**
+     * 参数
+     */
+    private String params;
+
+    /**
+     * 用户名
+     */
+    private String username;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public String getIp() {
+        return ip;
+    }
+
+    public void setIp(String ip) {
+        this.ip = ip;
+    }
+
+    public Integer getSysType() {
+        return sysType;
+    }
+
+    public void setSysType(Integer sysType) {
+        this.sysType = sysType;
+    }
+
+    public String getMethod() {
+        return method;
+    }
+
+    public void setMethod(String method) {
+        this.method = method;
+    }
+
+    public String getOperation() {
+        return operation;
+    }
+
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
+
+    public String getParams() {
+        return params;
+    }
+
+    public void setParams(String params) {
+        this.params = params;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    @Override
+    public String toString() {
+        return "SysLog{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", ip=" + ip +
+                ", sysType=" + sysType +
+                ", method=" + method +
+                ", operation=" + operation +
+                ", params=" + params +
+                ", username=" + username +
+                "}";
+    }
+}

+ 142 - 0
icss-service/src/main/java/com/diagbot/entity/User.java

@@ -0,0 +1,142 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 系统用户表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-08-30
+ */
+@TableName("sys_user")
+public class User implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 用户ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 用户密码
+     */
+    private String password;
+
+    /**
+     * 用户名
+     */
+    private String username;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    @Override
+    public String toString() {
+        return "User{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", password=" + password +
+                ", username=" + username +
+                "}";
+    }
+}

+ 133 - 0
icss-service/src/main/java/com/diagbot/entity/VitalOrder.java

@@ -0,0 +1,133 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 查体全局排序
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+@TableName("icss_vital_order")
+public class VitalOrder implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 查体id
+     */
+    private Long questionId;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getQuestionId() {
+        return questionId;
+    }
+
+    public void setQuestionId(Long questionId) {
+        this.questionId = questionId;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    @Override
+    public String toString() {
+        return "VitalOrder{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", questionId=" + questionId +
+        ", orderNo=" + orderNo +
+        "}";
+    }
+}

+ 49 - 0
icss-service/src/main/java/com/diagbot/enums/ControlTypeEnum.java

@@ -0,0 +1,49 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:检索显示类型枚举类
+ * @author: zhoutg
+ * @Date: 2018/10/26 10:35
+ */
+public enum ControlTypeEnum implements KeyedNamed {
+
+    EMPTY_TAG(0, "空标签");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    ControlTypeEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static ControlTypeEnum getEnum(Integer key) {
+        for (ControlTypeEnum item : ControlTypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        ControlTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 81 - 0
icss-service/src/main/java/com/diagbot/exception/CommonExceptionHandler.java

@@ -0,0 +1,81 @@
+package com.diagbot.exception;
+
+import com.diagbot.dto.RespDTO;
+import com.diagbot.util.GsonUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.BindException;
+import org.springframework.validation.FieldError;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.MissingServletRequestParameterException;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * @Description: 错误通用处理
+ * @author: gaodm
+ * @time: 2018/8/2 14:22
+ */
+@ControllerAdvice
+@ResponseBody
+@Slf4j
+public class CommonExceptionHandler {
+
+    @ExceptionHandler(Exception.class)
+    public ResponseEntity<RespDTO> handleException(Exception e) {
+        RespDTO resp = new RespDTO();
+        if (e instanceof BindException) {
+            BindException ex = (BindException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            for (FieldError fieldError : ex.getBindingResult().getFieldErrors()) {
+                stringMap.put(fieldError.getField(), fieldError.getDefaultMessage());
+            }
+            String msg = GsonUtil.toJson(stringMap);
+            log.warn("【参数异常】:{}", msg);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return new ResponseEntity(resp, HttpStatus.OK);
+        }
+        if (e instanceof MethodArgumentNotValidException) {
+            MethodArgumentNotValidException ex = (MethodArgumentNotValidException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            for (FieldError fieldError : ex.getBindingResult().getFieldErrors()) {
+                stringMap.put(fieldError.getField(), fieldError.getDefaultMessage());
+            }
+            String msg = GsonUtil.toJson(stringMap);
+            log.warn("【参数异常】:{}", msg);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return new ResponseEntity(resp, HttpStatus.OK);
+        }
+        if (e instanceof MissingServletRequestParameterException) {
+            MissingServletRequestParameterException ex = (MissingServletRequestParameterException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            stringMap.put(ex.getParameterName(), "不能为null");
+            String msg = GsonUtil.toJson(stringMap);
+            log.warn("【参数异常】:{}", msg);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return new ResponseEntity(resp, HttpStatus.OK);
+        }
+        if (e instanceof CommonException) {
+            CommonException taiChiException = (CommonException) e;
+            resp.code = taiChiException.getCode();
+            resp.msg = e.getMessage();
+            log.error("【业务异常】:{}", e.getMessage());
+            return new ResponseEntity(resp, HttpStatus.OK);
+        }
+        resp.code = CommonErrorCode.FAIL.getCode();
+        resp.msg = e.getMessage();
+        log.error("【系统异常】:{}", e.getMessage());
+        e.printStackTrace();
+        return new ResponseEntity(resp, HttpStatus.OK);
+    }
+
+}

+ 14 - 0
icss-service/src/main/java/com/diagbot/facade/IntroduceDetailFacade.java

@@ -0,0 +1,14 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.IntroduceDetailServiceImpl;
+import com.diagbot.web.IntroduceDetailController;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 9:28
+ */
+@Component
+public class IntroduceDetailFacade extends IntroduceDetailServiceImpl {
+}

+ 75 - 0
icss-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java

@@ -0,0 +1,75 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.IntroduceDTO;
+import com.diagbot.entity.IntroduceDetail;
+import com.diagbot.entity.IntroduceInfo;
+import com.diagbot.entity.IntroduceMap;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.IntroduceInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.vo.IntroduceByQuestionVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 9:27
+ */
+@Component
+public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
+    @Autowired
+    IntroduceMapFacade introduceMapFacade;
+    @Autowired
+    IntroduceDetailFacade introduceDetailFacade;
+
+    /**
+     * 根据标签获取提示信息
+     *
+     * @param introduceByQuestionVO
+     * @return
+     */
+    public IntroduceDTO getByQuestion(IntroduceByQuestionVO introduceByQuestionVO) {
+
+        QueryWrapper<IntroduceMap> introduceMapQueryWrapper = new QueryWrapper<>();
+        introduceMapQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                eq("question_id", introduceByQuestionVO.getQuestionId()).
+                eq("type", introduceByQuestionVO.getType());
+        IntroduceMap introduceMap = introduceMapFacade.getOne(introduceMapQueryWrapper);
+        if (introduceMap == null) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "提示信息未维护");
+        }
+
+        IntroduceDTO introduceDTO = this.getRecordById(introduceMap.getIntroduceId());
+        return introduceDTO;
+    }
+
+    /**
+     * 根据id获取提示信息
+     *
+     * @param id
+     * @return
+     */
+    public IntroduceDTO getRecordById(Long id) {
+        IntroduceDTO introduceDTO = new IntroduceDTO();
+        IntroduceInfo introduceInfo = this.getById(id);
+        if (introduceInfo == null) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "提示信息未维护");
+        } else if (introduceInfo.getIsDeleted().equals(IsDeleteEnum.Y.getKey())) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "提示信息已删除");
+        }
+        BeanUtil.copyProperties(introduceInfo, introduceDTO);
+
+        QueryWrapper<IntroduceDetail> introduceDetailQueryWrapper = new QueryWrapper<>();
+        introduceDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                eq("introduce_id", introduceInfo.getId());
+        List<IntroduceDetail> introduceDetailList = introduceDetailFacade.list(introduceDetailQueryWrapper);
+        introduceDTO.setIntroduceDetailList(introduceDetailList);
+        return introduceDTO;
+    }
+}

+ 13 - 0
icss-service/src/main/java/com/diagbot/facade/IntroduceMapFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.IntroduceMapServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 9:28
+ */
+@Component
+public class IntroduceMapFacade extends IntroduceMapServiceImpl {
+}

+ 39 - 0
icss-service/src/main/java/com/diagbot/facade/QuestionDetailFacade.java

@@ -0,0 +1,39 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.entity.QuestionDetail;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.impl.QuestionDetailServiceImpl;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description: 标签业务层
+ * @author: zhoutg
+ * @time: 2018/8/6 9:11
+ */
+@Component
+public class QuestionDetailFacade extends QuestionDetailServiceImpl {
+
+
+    /**
+     * 根据id获取标签明细
+     *
+     * @param questionId 标签id
+     * @return 标签内容
+     */
+    public List<QuestionDetail> getByQuestionId(Long questionId) {
+        List<QuestionDetail> questionDetailList = new ArrayList<>();
+        if(questionId == null) {
+            return questionDetailList;
+        }
+        QueryWrapper queryWrapper = new QueryWrapper();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
+        queryWrapper.eq("question_id", questionId);
+        queryWrapper.orderByAsc("order_no");
+        questionDetailList = this.list(queryWrapper);
+        return questionDetailList;
+    }
+}

+ 72 - 0
icss-service/src/main/java/com/diagbot/facade/QuestionFacade.java

@@ -0,0 +1,72 @@
+package com.diagbot.facade;
+
+import com.diagbot.dto.QuestionDTO;
+import com.diagbot.entity.QuestionDetail;
+import com.diagbot.entity.QuestionInfo;
+import com.diagbot.enums.ControlTypeEnum;
+import com.diagbot.service.impl.QuestionInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.vo.QuestionVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 标签业务层
+ * @author: zhoutg
+ * @time: 2018/8/6 9:11
+ */
+@Component
+public class QuestionFacade extends QuestionInfoServiceImpl {
+
+    @Autowired
+    QuestionDetailFacade questionDetailFacade;
+
+    /**
+     * 根据参数返回标签内容
+     *
+     * @param questionVO 获取标签内容参数
+     * @return 标签内容
+     */
+    public QuestionDTO getById(QuestionVO questionVO) {
+        Map paramMap = new HashMap<>();
+        paramMap.put("sexType", questionVO.getSexType());
+        paramMap.put("age", questionVO.getAge());
+        paramMap.put("id", questionVO.getId());
+        QuestionInfo questionInfo = this.getByParam(paramMap);
+        if(questionInfo == null) { //无数据直接返回,不通过报错的形式返回
+            return null;
+        }
+        QuestionDTO res = new QuestionDTO();
+        BeanUtil.copyProperties(questionInfo, res);
+
+        //获取明细项
+        if(ControlTypeEnum.EMPTY_TAG.getKey() != res.getControlType()) { //不为空标签
+            List<QuestionDetail> questionDetailList = questionDetailFacade.getByQuestionId(questionVO.getId());
+            res.setQuestionDetailList(questionDetailList);
+        }
+
+        //获取同级标签
+//        List<QuestionInfo> questionRelation = this.getByQuestionRelation(paramMap);
+//        List<QuestionDTO> questionRelationDTO = BeanUtil.listCopyTo(questionRelation, QuestionDTO.class);
+//        res.setQuestionRelationList(questionRelationDTO);
+
+        //获取子标签
+        List<QuestionInfo> questionMapping = this.getByQuestionMapping(paramMap);
+        List<QuestionDTO> sonQuestionList = BeanUtil.listCopyTo(questionMapping, QuestionDTO.class);
+        res.setQuestionMapping(sonQuestionList);
+        //获取子标签的明细项
+        if(ListUtil.isNotEmpty(sonQuestionList)) {
+            for(QuestionDTO bean : sonQuestionList) {
+                List<QuestionDetail> questionDetailList = questionDetailFacade.getByQuestionId(bean.getId());
+                bean.setQuestionDetailList(questionDetailList);
+            }
+        }
+        return res;
+    }
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/DeptVitalMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.DeptVital;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 科室查体对应表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+public interface DeptVitalMapper extends BaseMapper<DeptVital> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/IntroduceDetailMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.IntroduceDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 提示信息明细 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+public interface IntroduceDetailMapper extends BaseMapper<IntroduceDetail> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/IntroduceInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.IntroduceInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 提示信息 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+public interface IntroduceInfoMapper extends BaseMapper<IntroduceInfo> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/IntroduceMapMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.IntroduceMap;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 标签与提示信息映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+public interface IntroduceMapMapper extends BaseMapper<IntroduceMap> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/ModuleInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.ModuleInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 模型表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface ModuleInfoMapper extends BaseMapper<ModuleInfo> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/ModuleQuestionMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.ModuleQuestion;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 模型标签映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface ModuleQuestionMapper extends BaseMapper<ModuleQuestion> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/QuestionDetailMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QuestionDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 标签明细表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface QuestionDetailMapper extends BaseMapper<QuestionDetail> {
+
+}

+ 42 - 0
icss-service/src/main/java/com/diagbot/mapper/QuestionInfoMapper.java

@@ -0,0 +1,42 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.QuestionInfo;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 标签基础表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface QuestionInfoMapper extends BaseMapper<QuestionInfo> {
+
+
+    /**
+     *  根据参数获取标签信息
+     * @param map 参数
+     * @return
+     */
+    public QuestionInfo getByParam(Map map);
+
+
+    /**
+     *  根据questionMapping获取标签信息
+     * @param map 参数
+     * @return
+     */
+    public List<QuestionInfo> getByQuestionMapping(Map map);
+
+    /**
+     *  根据questionRelation获取标签信息
+     * @param map 参数
+     * @return
+     */
+    public List<QuestionInfo> getByQuestionRelation(Map map);
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/QuestionMappingMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QuestionMapping;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 标签映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface QuestionMappingMapper extends BaseMapper<QuestionMapping> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/QuestionRelationMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QuestionRelation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 标签关联表(同级关联) Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface QuestionRelationMapper extends BaseMapper<QuestionRelation> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/QuestionUsualMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QuestionUsual;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 常用标签表 Mapper 接口
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+public interface QuestionUsualMapper extends BaseMapper<QuestionUsual> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/RetrievalMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.Retrieval;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 检索表 Mapper 接口
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+public interface RetrievalMapper extends BaseMapper<Retrieval> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/RetrievalMappingMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.RetrievalMapping;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 检索映射表 Mapper 接口
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+public interface RetrievalMappingMapper extends BaseMapper<RetrievalMapping> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/SysLogMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.SysLog;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-08-02
+ */
+public interface SysLogMapper extends BaseMapper<SysLog> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/VitalOrderMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.VitalOrder;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 查体全局排序 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+public interface VitalOrderMapper extends BaseMapper<VitalOrder> {
+
+}

+ 23 - 0
icss-service/src/main/java/com/diagbot/rabbit/MyProcessor.java

@@ -0,0 +1,23 @@
+package com.diagbot.rabbit;
+
+import org.springframework.cloud.stream.annotation.Input;
+import org.springframework.cloud.stream.annotation.Output;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.messaging.SubscribableChannel;
+
+/**
+ * @Description: 自定义Stream发布和消费对象
+ * @author: gaodm
+ * @time: 2018/8/29 13:39
+ */
+public interface MyProcessor {
+
+    String INPUT_LOG = "inputLog";
+    String OUTPUT_LOG = "outputLog";
+
+    @Input(INPUT_LOG)
+    SubscribableChannel inputLog();
+
+    @Output(OUTPUT_LOG)
+    MessageChannel outputLog();
+}

+ 27 - 0
icss-service/src/main/java/com/diagbot/rabbit/MySender.java

@@ -0,0 +1,27 @@
+package com.diagbot.rabbit;
+
+import com.diagbot.entity.SysLog;
+import com.diagbot.util.GsonUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.cloud.stream.annotation.EnableBinding;
+import org.springframework.integration.support.MessageBuilder;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 发布者
+ * @author: gaodm
+ * @time: 2018/8/29 13:41
+ */
+@Component
+@EnableBinding({ MyProcessor.class })
+public class MySender {
+    @Autowired
+    @Qualifier("outputLog")
+    MessageChannel outputLog;
+
+    public void outputLogSend(SysLog sysLog) {
+        outputLog.send(MessageBuilder.withPayload(GsonUtil.toJson(sysLog)).build());
+    }
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/DeptVitalService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.DeptVital;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 科室查体对应表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+public interface DeptVitalService extends IService<DeptVital> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/IntroduceDetailService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.IntroduceDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 提示信息明细 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+public interface IntroduceDetailService extends IService<IntroduceDetail> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/IntroduceInfoService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.IntroduceInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 提示信息 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+public interface IntroduceInfoService extends IService<IntroduceInfo> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/IntroduceMapService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.IntroduceMap;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 标签与提示信息映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+public interface IntroduceMapService extends IService<IntroduceMap> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/ModuleInfoService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.ModuleInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 模型表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface ModuleInfoService extends IService<ModuleInfo> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/ModuleQuestionService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.ModuleQuestion;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 模型标签映射表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface ModuleQuestionService extends IService<ModuleQuestion> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/QuestionDetailService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QuestionDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 标签明细表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface QuestionDetailService extends IService<QuestionDetail> {
+
+}

+ 41 - 0
icss-service/src/main/java/com/diagbot/service/QuestionInfoService.java

@@ -0,0 +1,41 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.QuestionInfo;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 标签基础表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface QuestionInfoService extends IService<QuestionInfo> {
+
+    /**
+     *  根据参数获取标签信息
+     * @param map 参数
+     * @return
+     */
+    public QuestionInfo getByParam(Map map);
+
+
+    /**
+     *  根据questionMapping获取标签信息
+     * @param map 参数
+     * @return
+     */
+    public List<QuestionInfo> getByQuestionMapping(Map map);
+
+
+    /**
+     *  根据questionRelation获取标签信息
+     * @param map 参数
+     * @return
+     */
+    public List<QuestionInfo> getByQuestionRelation(Map map);
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/QuestionMappingService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QuestionMapping;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 标签映射表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface QuestionMappingService extends IService<QuestionMapping> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/QuestionRelationService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QuestionRelation;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 标签关联表(同级关联) 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+public interface QuestionRelationService extends IService<QuestionRelation> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/QuestionUsualService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QuestionUsual;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 常用标签表 服务类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+public interface QuestionUsualService extends IService<QuestionUsual> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/RetrievalMappingService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.RetrievalMapping;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 检索映射表 服务类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+public interface RetrievalMappingService extends IService<RetrievalMapping> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/RetrievalService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.Retrieval;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 检索表 服务类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+public interface RetrievalService extends IService<Retrieval> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/VitalOrderService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.VitalOrder;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 查体全局排序 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+public interface VitalOrderService extends IService<VitalOrder> {
+
+}

+ 20 - 0
icss-service/src/main/java/com/diagbot/service/impl/DeptVitalServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.DeptVital;
+import com.diagbot.mapper.DeptVitalMapper;
+import com.diagbot.service.DeptVitalService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 科室查体对应表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+@Service
+public class DeptVitalServiceImpl extends ServiceImpl<DeptVitalMapper, DeptVital> implements DeptVitalService {
+
+}

+ 20 - 0
icss-service/src/main/java/com/diagbot/service/impl/IntroduceDetailServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.IntroduceDetail;
+import com.diagbot.mapper.IntroduceDetailMapper;
+import com.diagbot.service.IntroduceDetailService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 提示信息明细 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+@Service
+public class IntroduceDetailServiceImpl extends ServiceImpl<IntroduceDetailMapper, IntroduceDetail> implements IntroduceDetailService {
+
+}

+ 20 - 0
icss-service/src/main/java/com/diagbot/service/impl/IntroduceInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.IntroduceInfo;
+import com.diagbot.mapper.IntroduceInfoMapper;
+import com.diagbot.service.IntroduceInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 提示信息 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+@Service
+public class IntroduceInfoServiceImpl extends ServiceImpl<IntroduceInfoMapper, IntroduceInfo> implements IntroduceInfoService {
+
+}

+ 20 - 0
icss-service/src/main/java/com/diagbot/service/impl/IntroduceMapServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.IntroduceMap;
+import com.diagbot.mapper.IntroduceMapMapper;
+import com.diagbot.service.IntroduceMapService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 标签与提示信息映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-15
+ */
+@Service
+public class IntroduceMapServiceImpl extends ServiceImpl<IntroduceMapMapper, IntroduceMap> implements IntroduceMapService {
+
+}

+ 0 - 0
icss-service/src/main/java/com/diagbot/service/impl/ModuleInfoServiceImpl.java


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