Переглянути джерело

医共体、医疗机构、科室、用户、参数、字典接口

guowei 2 роки тому
коміт
9dcbb68fe4
53 змінених файлів з 948 додано та 0 видалено
  1. 27 0
      .gitignore
  2. 6 0
      .idea/encodings.xml
  3. 6 0
      .idea/vcs.xml
  4. 191 0
      pom.xml
  5. BIN
      src/main/java/com/cbkj/platform/api/PlatformApi.java
  6. BIN
      src/main/java/com/cbkj/platform/api/beans/dic/DicData.java
  7. BIN
      src/main/java/com/cbkj/platform/api/beans/dic/DicNode.java
  8. BIN
      src/main/java/com/cbkj/platform/api/beans/entity/ResEntity.java
  9. BIN
      src/main/java/com/cbkj/platform/api/beans/org/SysApp.java
  10. BIN
      src/main/java/com/cbkj/platform/api/beans/org/SysDepartment.java
  11. BIN
      src/main/java/com/cbkj/platform/api/beans/org/SysInstitution.java
  12. BIN
      src/main/java/com/cbkj/platform/api/beans/param/SysParam.java
  13. BIN
      src/main/java/com/cbkj/platform/api/beans/user/AdminInfo.java
  14. BIN
      src/main/java/com/cbkj/platform/api/beans/user/AdminInfoRule.java
  15. BIN
      src/main/java/com/cbkj/platform/api/beans/user/AdminMenu.java
  16. BIN
      src/main/java/com/cbkj/platform/api/beans/user/AdminRule.java
  17. BIN
      src/main/java/com/cbkj/platform/api/config/multipleDataSource/DynamicDataSource.java
  18. BIN
      src/main/java/com/cbkj/platform/api/config/multipleDataSource/DynamicDataSourceContextHolder.java
  19. BIN
      src/main/java/com/cbkj/platform/api/config/multipleDataSource/DynamicDataSourceRegister.java
  20. BIN
      src/main/java/com/cbkj/platform/api/config/swagger/Swagger2Config.java
  21. BIN
      src/main/java/com/cbkj/platform/api/config/utils/Constant.java
  22. BIN
      src/main/java/com/cbkj/platform/api/config/utils/JasyptUtils.java
  23. BIN
      src/main/java/com/cbkj/platform/api/config/utils/Page.java
  24. BIN
      src/main/java/com/cbkj/platform/api/controller/dic/DicDataController.java
  25. BIN
      src/main/java/com/cbkj/platform/api/controller/org/SysAppController.java
  26. BIN
      src/main/java/com/cbkj/platform/api/controller/org/SysDepartmentController.java
  27. BIN
      src/main/java/com/cbkj/platform/api/controller/org/SysInstitutionController.java
  28. BIN
      src/main/java/com/cbkj/platform/api/controller/param/SysParamController.java
  29. BIN
      src/main/java/com/cbkj/platform/api/controller/user/AdminInfoController.java
  30. BIN
      src/main/java/com/cbkj/platform/api/mapper/dic/DicDataMapper.java
  31. BIN
      src/main/java/com/cbkj/platform/api/mapper/org/SysAppMapper.java
  32. BIN
      src/main/java/com/cbkj/platform/api/mapper/org/SysDepartmentMapper.java
  33. BIN
      src/main/java/com/cbkj/platform/api/mapper/org/SysInstitutionMapper.java
  34. BIN
      src/main/java/com/cbkj/platform/api/mapper/param/SysParamMapper.java
  35. BIN
      src/main/java/com/cbkj/platform/api/mapper/user/AdminInfoMapper.java
  36. BIN
      src/main/java/com/cbkj/platform/api/service/dic/DicDataService.java
  37. BIN
      src/main/java/com/cbkj/platform/api/service/dic/DicFactory.java
  38. BIN
      src/main/java/com/cbkj/platform/api/service/org/SysAppService.java
  39. BIN
      src/main/java/com/cbkj/platform/api/service/org/SysDepartmentService.java
  40. BIN
      src/main/java/com/cbkj/platform/api/service/org/SysInstitutionService.java
  41. BIN
      src/main/java/com/cbkj/platform/api/service/param/SysParamService.java
  42. BIN
      src/main/java/com/cbkj/platform/api/service/user/AdminInfoService.java
  43. 53 0
      src/main/resources/application.properties
  44. 64 0
      src/main/resources/datasource.xml
  45. 67 0
      src/main/resources/mappers/dic/DicDataMapper.xml
  46. 23 0
      src/main/resources/mappers/org/SysAppMapper.xml
  47. 45 0
      src/main/resources/mappers/org/SysDepartmentMapper.xml
  48. 67 0
      src/main/resources/mappers/org/SysInstitutionMapper.xml
  49. 58 0
      src/main/resources/mappers/param/SysParamMapper.xml
  50. 106 0
      src/main/resources/mappers/user/AdminInfoMapper.xml
  51. 14 0
      src/main/resources/mybatis-config.xml
  52. 221 0
      src/main/resources/zlogback.xml
  53. BIN
      src/test/java/ApplicationTests.java

+ 27 - 0
.gitignore

@@ -0,0 +1,27 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/target/
+
+# IDEs and editors
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# IDE
+*.iml
+.idea/*
+!.idea/vcs.xml
+!.idea/jsonSchemas.xml
+!.idea/encodings.xml
+!.idea/dictionaries
+!.idea/codeStyles
+
+# SVN
+.svn/
+
+#project
+

+ 6 - 0
.idea/encodings.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$" charset="UTF-8" />
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 191 - 0
pom.xml

@@ -0,0 +1,191 @@
+<?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.tcm-brain</groupId>
+    <artifactId>tcm-platform-api</artifactId>
+    <version>1.0.0</version>
+    <packaging>jar</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>a distributed single-sign-on framework.</description>
+
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven.test.skip>true</maven.test.skip>
+        <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
+        <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
+        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
+
+        <commons-lang.version>2.4</commons-lang.version>
+        <slf4j-api.version>1.7.30</slf4j-api.version>
+        <javax.servlet-api.version>4.0.1</javax.servlet-api.version>
+        <jedis.version>3.2.0</jedis.version>
+        <spring-boot.version>2.2.6.RELEASE</spring-boot.version>
+        <swagger2.version>2.7.0</swagger2.version>
+        <swagger-ui.version>1.8.5</swagger-ui.version>
+        <druid.version>1.1.0</druid.version>
+        <mybatis.version>1.3.2</mybatis.version>
+        <jasypt.version>2.0.0</jasypt.version>
+        <start-class>com.cbkj.platform.api.PlatformApi</start-class>
+    </properties>
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.6.RELEASE</version>
+        <relativePath/>
+    </parent>
+
+    <!--    <dependencyManagement>-->
+    <!--        <dependencies>-->
+    <!--            <dependency>-->
+    <!--                <groupId>org.springframework.boot</groupId>-->
+    <!--                <artifactId>spring-boot-starter-parent</artifactId>-->
+    <!--                <version>${spring-boot.version}</version>-->
+    <!--                <type>pom</type>-->
+    <!--                <scope>import</scope>-->
+    <!--            </dependency>-->
+    <!--        </dependencies>-->
+    <!--    </dependencyManagement>-->
+
+    <dependencies>
+
+        <dependency>
+            <groupId>commons-net</groupId>
+            <artifactId>commons-net</artifactId>
+            <version>3.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>${commons-lang.version}</version>
+        </dependency>
+
+        <!-- web -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- servlet -->
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>${javax.servlet-api.version}</version>
+        </dependency>
+
+        <!-- slf4j -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>${slf4j-api.version}</version>
+        </dependency>
+
+        <!-- jedis -->
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+            <version>${jedis.version}</version>
+        </dependency>
+
+        <!-- lombok -->
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <!-- swagger2 -->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>${swagger2.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>${swagger2.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>swagger-bootstrap-ui</artifactId>
+            <version>${swagger-ui.version}</version>
+        </dependency>
+
+        <!-- mybatis -->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>${mybatis.version}</version>
+        </dependency>
+
+        <!-- 数据连接池 -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>${druid.version}</version>
+        </dependency>
+
+        <!-- mysql -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!-- jasypt -->
+        <dependency>
+            <groupId>com.github.ulisesbocchio</groupId>
+            <artifactId>jasypt-spring-boot-starter</artifactId>
+            <version>${jasypt.version}</version>
+        </dependency>
+
+        <!--pageHelper-->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>1.2.3</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.32</version>
+        </dependency>
+
+    </dependencies>
+
+    <licenses>
+        <license>
+            <name>GNU General Public License version 3</name>
+            <url>https://opensource.org/licenses/GPL-3.0</url>
+        </license>
+    </licenses>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <fork>true</fork>
+                    <mainClass>${start-class}</mainClass>
+                </configuration>
+            </plugin>
+
+        </plugins>
+    </build>
+
+</project>

BIN
src/main/java/com/cbkj/platform/api/PlatformApi.java


BIN
src/main/java/com/cbkj/platform/api/beans/dic/DicData.java


BIN
src/main/java/com/cbkj/platform/api/beans/dic/DicNode.java


BIN
src/main/java/com/cbkj/platform/api/beans/entity/ResEntity.java


BIN
src/main/java/com/cbkj/platform/api/beans/org/SysApp.java


BIN
src/main/java/com/cbkj/platform/api/beans/org/SysDepartment.java


BIN
src/main/java/com/cbkj/platform/api/beans/org/SysInstitution.java


BIN
src/main/java/com/cbkj/platform/api/beans/param/SysParam.java


BIN
src/main/java/com/cbkj/platform/api/beans/user/AdminInfo.java


BIN
src/main/java/com/cbkj/platform/api/beans/user/AdminInfoRule.java


BIN
src/main/java/com/cbkj/platform/api/beans/user/AdminMenu.java


BIN
src/main/java/com/cbkj/platform/api/beans/user/AdminRule.java


BIN
src/main/java/com/cbkj/platform/api/config/multipleDataSource/DynamicDataSource.java


BIN
src/main/java/com/cbkj/platform/api/config/multipleDataSource/DynamicDataSourceContextHolder.java


BIN
src/main/java/com/cbkj/platform/api/config/multipleDataSource/DynamicDataSourceRegister.java


BIN
src/main/java/com/cbkj/platform/api/config/swagger/Swagger2Config.java


BIN
src/main/java/com/cbkj/platform/api/config/utils/Constant.java


BIN
src/main/java/com/cbkj/platform/api/config/utils/JasyptUtils.java


BIN
src/main/java/com/cbkj/platform/api/config/utils/Page.java


BIN
src/main/java/com/cbkj/platform/api/controller/dic/DicDataController.java


BIN
src/main/java/com/cbkj/platform/api/controller/org/SysAppController.java


BIN
src/main/java/com/cbkj/platform/api/controller/org/SysDepartmentController.java


BIN
src/main/java/com/cbkj/platform/api/controller/org/SysInstitutionController.java


BIN
src/main/java/com/cbkj/platform/api/controller/param/SysParamController.java


BIN
src/main/java/com/cbkj/platform/api/controller/user/AdminInfoController.java


BIN
src/main/java/com/cbkj/platform/api/mapper/dic/DicDataMapper.java


BIN
src/main/java/com/cbkj/platform/api/mapper/org/SysAppMapper.java


BIN
src/main/java/com/cbkj/platform/api/mapper/org/SysDepartmentMapper.java


BIN
src/main/java/com/cbkj/platform/api/mapper/org/SysInstitutionMapper.java


BIN
src/main/java/com/cbkj/platform/api/mapper/param/SysParamMapper.java


BIN
src/main/java/com/cbkj/platform/api/mapper/user/AdminInfoMapper.java


BIN
src/main/java/com/cbkj/platform/api/service/dic/DicDataService.java


BIN
src/main/java/com/cbkj/platform/api/service/dic/DicFactory.java


BIN
src/main/java/com/cbkj/platform/api/service/org/SysAppService.java


BIN
src/main/java/com/cbkj/platform/api/service/org/SysDepartmentService.java


BIN
src/main/java/com/cbkj/platform/api/service/org/SysInstitutionService.java


BIN
src/main/java/com/cbkj/platform/api/service/param/SysParamService.java


BIN
src/main/java/com/cbkj/platform/api/service/user/AdminInfoService.java


+ 53 - 0
src/main/resources/application.properties

@@ -0,0 +1,53 @@
+# web
+server.port=8080
+server.servlet.context-path=/platform/api
+
+# redis
+sso.redis.host = 47.114.47.147
+sso.redis.port = 6379
+sso.redis.password = cbkj123!@#
+# redis expire minute
+sso.redis.expire.minute=1440
+# redis name space
+sso.redis.namespace=SSO
+
+#rsa
+rsa.publicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDaKmCXLWqBIVOVSa/dTY08bgKhWcvi3j6vPksjrV7X3oFZ6dbF3XhaTXuV65x9qqmlQqlNepkqv03miY72QkjWMgbaEt0v5MFnQ+B2AWPIGunvSbaDIBwer/6V9f+ra7imLdgt9jwlkjDYvRjvw7mDHFkXkMvKWl1FFihV0EN8JwIDAQAB
+rsa.privateKey=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANoqYJctaoEhU5VJr91NjTxuAqFZy+LePq8+SyOtXtfegVnp1sXdeFpNe5XrnH2qqaVCqU16mSq/TeaJjvZCSNYyBtoS3S/kwWdD4HYBY8ga6e9JtoMgHB6v/pX1/6truKYt2C32PCWSMNi9GO/DuYMcWReQy8paXUUWKFXQQ3wnAgMBAAECgYBnRa4pgg8rh0oYniQIv0A/Pdgy5t3zy76il/tbrSL7TtGubVoEmfzxykHZSwnuFs5tc2vPSFye9qX6nl01R1VQZ7JM2FVpldRw0Rrqv3paQjyHdKOcIYBJG2mxI7fpg/du8kwlkNCHRl39aJHQXHbY+lLEwE4HBJ7niMvdGoIpGQJBAPb+47h3++8vFFx99GlsrEVS5NAYNr8VyuGRYfxJHD/qNFcOZmosi8NnziFFnyQ/0C0rou5EDJu+jlBJdl1KNHsCQQDiHm2J9zSLDAr70ZyQ4l+vaPbw+26CFByBG4dsh7xeNa95mSbj72JuCZCyuQZaacThf3iWQuzy2N9TUFib+9VFAkEAlamnFJzndGwDm3PayJLH5A2xhgJWEf1DfODaDcPDMVtZsbKRDh7F5Xad6X1FS/K60tQRGuzy8uBJXY7WAPs4xwJAZ1zNadHM/PrGUpJg5YH1h3ON3l6xB1k2JnZ1E1GA8/fKfOVbd7pH3lEVCf22P8I1s3bXoqh5NBGbFLSXrMYTmQJBAJBxs9VEz2+qFfJmWSYiJBugoFD/cBWfL1VHwNeuZtJxFXXpkB3G1CLaII1SaGOWXHFMOycbemfTQzxSEiRFjOE=
+
+#jdbc
+spring.datasource.primary.username = DgUfz0nYLCR7UJ66sgG1ag==
+spring.datasource.primary.password = OPXCNabmBpi/FKayjb2kubBySH5LiQln
+spring.datasource.primary.url=jdbc:mysql://47.111.67.16:3307/cbkj_web_parameter?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+#jdbc common
+spring.datasource.primary.driver-class-name=com.mysql.cj.jdbc.Driver
+spring.datasource.common=yes
+spring.datasource.common.initialSize=0
+spring.datasource.common.minIdle=0
+spring.datasource.common.maxActive=10
+spring.datasource.common.maxWait=60000
+spring.datasource.common.timeBetweenEvictionRunsMillis=60000
+spring.datasource.common.minEvictableIdleTimeMillis=300000
+spring.datasource.common.validationQuery=SELECT 1 FROM DUAL
+spring.datasource.common.testWhileIdle=true
+spring.datasource.common.testOnBorrow=false
+spring.datasource.common.testOnReturn=false
+spring.datasource.common.poolPreparedStatements=true
+spring.datasource.common.filters=stat, wall
+spring.datasource.common.maxPoolPreparedStatementPerConnectionSize=20
+spring.datasource.common.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
+spring.datasource.common.useGlobalDataSourceStat=true
+spring.datasource.common.removeAbandoned=true
+spring.datasource.common.removeAbandonedTimeout=300
+spring.datasource.common.logAbandoned=false
+
+#mybatis
+mybatis.mapper-locations = classpath:mappers/**/*.xml
+mybatis.type-aliases-package=com.cbkj.platform.api.beans
+mybatis.config-location = classpath:/mybatis-config.xml
+
+# ¸ùÃÜÂë
+root.encryptor.password = ::!qb#9467@
+
+#log
+logging.config=classpath:zlogback.xml

+ 64 - 0
src/main/resources/datasource.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+            http://www.springframework.org/schema/beans/spring-beans.xsd    
+            http://www.springframework.org/schema/tx
+            http://www.springframework.org/schema/tx/spring-tx.xsd">
+
+
+    <bean id="defaultDataSource" class="com.alibaba.druid.pool.DruidDataSource"
+          init-method="init" destroy-method="close">
+        <!-- 基本属性 url、user、password -->
+        <property name="driverClassName" value="${jdbc.driver}"/>
+        <property name="url" value="${jdbc.url}"/>
+        <property name="username" value="${jdbc.user}"/>
+        <property name="password" value="${jdbc.password}"/>
+
+        <!-- 配置初始化大小、最小、最大 -->
+        <property name="initialSize" value="1"/>
+        <property name="minIdle" value="1"/>
+        <property name="maxActive" value="500"/>
+
+        <!-- 配置获取连接等待超时的时间 -->
+        <property name="maxWait" value="60000"/>
+
+        <!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
+        <property name="timeBetweenEvictionRunsMillis" value="60000"/>
+
+        <!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
+        <property name="minEvictableIdleTimeMillis" value="300000"/>
+
+        <property name="validationQuery" value="SELECT 1"/>
+        <property name="testWhileIdle" value="true"/>
+        <property name="testOnBorrow" value="true"/>
+        <property name="testOnReturn" value="false"/>
+
+        <!-- 打开PSCache,并且指定每个连接上PSCache的大小 -->
+        <property name="poolPreparedStatements" value="true"/>
+        <property name="maxPoolPreparedStatementPerConnectionSize"
+                  value="20"/>
+        <!-- 配置监控统计拦截的filters,去掉后监控界面sql无法统计 -->
+        <property name="filters" value="stat"/>
+        <property name="removeAbandoned" value="true"/>
+        <property name="removeAbandonedTimeout" value="3600"/>
+    </bean>
+
+    <!-- myBatis文件 -->
+    <bean id="defaultSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="defaultDataSource"/>
+    </bean>
+    <!-- 配置事务管理器 -->
+    <bean id="maiTransactionManager"
+          class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="defaultDataSource"/>
+    </bean>
+
+    <!-- 声明式事务 -->
+    <tx:annotation-driven transaction-manager="maiTransactionManager"
+                          proxy-target-class="true"/>
+    <!-- 声明式事务 -->
+
+
+</beans>

+ 67 - 0
src/main/resources/mappers/dic/DicDataMapper.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.cbkj.platform.api.mapper.dic.DicDataMapper">
+    <resultMap id="BaseResultMap" type="com.cbkj.platform.api.beans.dic.DicNode">
+        <id column="dic_id" jdbcType="VARCHAR" property="dicId"/>
+        <result column="dic_code" jdbcType="VARCHAR" property="dicCode"/>
+        <result column="dic_name" jdbcType="VARCHAR" property="dicName"/>
+        <result column="parent_id" jdbcType="VARCHAR" property="parentId"/>
+        <result column="dic_desc" jdbcType="VARCHAR" property="dicDesc"/>
+        <result column="sort" jdbcType="VARCHAR" property="sort"/>
+        <result column="app_id" jdbcType="VARCHAR" property="appId"/>
+        <result column="ins_code" jdbcType="VARCHAR" property="insCode"/>
+        <result column="dept_id" jdbcType="VARCHAR" property="deptId"/>
+        <result column="pha_id" jdbcType="VARCHAR" property="phaId"/>
+        <result column="stan_id" jdbcType="VARCHAR" property="stanId"/>
+        <result column="stan_code" jdbcType="VARCHAR" property="stanCode"/>
+        <result column="stan_name" jdbcType="VARCHAR" property="stanName"/>
+    </resultMap>
+
+    <select id="getList" parameterType="com.cbkj.platform.api.beans.dic.DicNode" resultMap="BaseResultMap">
+        SELECT dic_id,dic_code,dic_name,parent_id,dic_desc,sort,app_id,ins_code,dept_id,pha_id
+        from t_dic_base
+        where is_enable = '1'
+        <if test=" appId != null and appId!='' ">
+            and app_id = #{appId}
+        </if>
+        <if test=" insCode != null and insCode!='' ">
+            and ins_code = #{insCode}
+        </if>
+        <if test=" deptId != null and deptId!='' ">
+            and dept_id = #{deptId}
+        </if>
+        <if test=" phaId != null and phaId!='' ">
+            and pha_id = #{phaId}
+        </if>
+        <if test=" dicCode != null and dicCode!='' ">
+            and dic_code = #{dicCode}
+        </if>
+        order by sort
+    </select>
+
+    <select id="getMappingList" parameterType="com.cbkj.platform.api.beans.dic.DicNode" resultMap="BaseResultMap">
+        SELECT
+        tdb.dic_id,tdb.dic_code,tdb.dic_name,tdb.parent_id,tdb.dic_desc,tdb.sort,
+        tdb.app_id,tdb.ins_code,tdb.dept_id,tdb.pha_id,
+        tds.stan_id, tds.stan_code, tds.stan_name, tds.stan_type
+        from t_dic_base tdb
+        left join t_dic_mapping tdm on tdm.stan_type = #{stanType} and tdm.dic_id = tdb.dic_id
+        left join t_dic_standard tds on tds.stan_id = tdm.stan_id
+        where tdb.is_enable = '1'
+        <if test=" appId != null and appId!='' ">
+            and tdb.app_id = #{appId}
+        </if>
+        <if test=" insCode != null and insCode!='' ">
+            and tdb.ins_code = #{insCode}
+        </if>
+        <if test=" deptId != null and deptId!='' ">
+            and tdb.dept_id = #{deptId}
+        </if>
+        <if test=" phaId != null and phaId!='' ">
+            and tdb.pha_id = #{phaId}
+        </if>
+        <if test=" dicCode != null and dicCode!='' ">
+            and tdb.dic_code = #{dicCode}
+        </if>
+    </select>
+</mapper>

+ 23 - 0
src/main/resources/mappers/org/SysAppMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.cbkj.platform.api.mapper.org.SysAppMapper">
+
+    <resultMap id="BaseResultMap" type="com.cbkj.platform.api.beans.org.SysApp">
+        <id column="app_id" jdbcType="VARCHAR" property="appId"/>
+        <result column="app_name" jdbcType="VARCHAR" property="appName"/>
+        <result column="app_pwd" jdbcType="VARCHAR" property="appPwd"/>
+        <result column="app_desc" jdbcType="VARCHAR" property="appDesc"/>
+        <result column="status" jdbcType="VARCHAR" property="status"/>
+        <result column="sort" jdbcType="INTEGER" property="sort"/>
+    </resultMap>
+
+    <select id="getList" parameterType="com.cbkj.platform.api.beans.org.SysApp" resultMap="BaseResultMap">
+        SELECT app_id,app_name,app_desc
+        from sys_app
+        where status = '1'
+        <if test="appName != null and appName!='' ">
+            and app_name like CONCAT('%',trim(#{appName}),'%')
+        </if>
+        order by sort
+    </select>
+</mapper>

+ 45 - 0
src/main/resources/mappers/org/SysDepartmentMapper.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.cbkj.platform.api.mapper.org.SysDepartmentMapper">
+
+    <resultMap id="BaseResultMap" type="com.cbkj.platform.api.beans.org.SysDepartment">
+        <id column="DEP_ID" jdbcType="VARCHAR"  property="deptId" />
+        <result column="dept_name" jdbcType="VARCHAR" property="deptName" />
+        <result column="APP_ID" jdbcType="VARCHAR" property="appId" />
+        <result column="INS_CODE" jdbcType="VARCHAR" property="insCode" />
+        <result column="DEP_ORIGIN_ID" jdbcType="VARCHAR" property="depOriginId" />
+        <result column="DEP_PARENT_ID" jdbcType="VARCHAR" property="depParentId" />
+        <result column="DEP_PARENT_NAME" jdbcType="VARCHAR" property="depParentName" />
+        <result column="status" jdbcType="VARCHAR" property="status" />
+        <result column="APP_NAME" jdbcType="VARCHAR" property="appName" />
+        <result column="INS_NAME" jdbcType="VARCHAR" property="insName" />
+        <result column="ins_parent_code" jdbcType="VARCHAR" property="insParentCode" />
+    </resultMap>
+
+
+    <select id="getList" parameterType="com.cbkj.platform.api.beans.org.SysDepartment" resultMap="BaseResultMap">
+        SELECT dep.*,
+        app.app_name,
+        ins.ins_name,
+        ins.ins_parent_code
+        from sys_department dep
+        left join sys_app app on dep.app_id = app.app_id AND app.status = '1' AND app.status = '1'
+        left join sys_institution ins on dep.ins_code = ins.ins_code AND ins.status = '1'
+        where dep.status = '1'
+        <if test="appName != null and appName!='' ">
+           and app.APP_NAME like CONCAT('%',trim(#{appName}),'%')
+        </if>
+        <if test="deptName != null and deptName!='' ">
+           and dep.dept_name like CONCAT('%',trim(#{deptName}),'%')
+        </if>
+        <if test="appId != null and appId!='' ">
+            and dep.APP_ID =#{appId}
+        </if>
+        <if test="insCode != null and insCode!='' ">
+            and dep.INS_CODE =#{insCode}
+        </if>
+        order by dep.app_id, dep.ins_code, dep.dept_origin_id
+    </select>
+
+
+</mapper>

+ 67 - 0
src/main/resources/mappers/org/SysInstitutionMapper.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.cbkj.platform.api.mapper.org.SysInstitutionMapper">
+    <resultMap id="BaseResultMap" type="com.cbkj.platform.api.beans.org.SysInstitution">
+        <id column="INS_ID" jdbcType="VARCHAR" property="insId"/>
+        <result column="APP_ID" jdbcType="VARCHAR" property="appId"/>
+        <result column="APP_NAME" jdbcType="VARCHAR" property="appName"/>
+        <result column="INS_CODE" jdbcType="VARCHAR" property="insCode"/>
+        <result column="INS_NAME" jdbcType="VARCHAR" property="insName"/>
+        <result column="INS_PARENT_CODE" jdbcType="VARCHAR" property="insParentCode"/>
+        <result column="INS_PARENT_NAME" jdbcType="VARCHAR" property="insParentName"/>
+        <result column="INS_CATEGORY" jdbcType="VARCHAR" property="insCategory"/>
+        <result column="province_code" jdbcType="VARCHAR" property="provinceCode"/>
+        <result column="province_name" jdbcType="VARCHAR" property="provinceName"/>
+        <result column="city_code" jdbcType="VARCHAR" property="cityCode"/>
+        <result column="city_name" jdbcType="VARCHAR" property="cityName"/>
+        <result column="area_code" jdbcType="VARCHAR" property="areaCode"/>
+        <result column="area_name" jdbcType="VARCHAR" property="areaName"/>
+        <result column="street_code" jdbcType="VARCHAR" property="streetCode"/>
+        <result column="street_name" jdbcType="VARCHAR" property="streetName"/>
+        <result column="INS_ADDRESS" jdbcType="VARCHAR" property="insAddress"/>
+        <result column="sort" jdbcType="VARCHAR" property="sort"/>
+        <result column="status" jdbcType="VARCHAR" property="status"/>
+        <result column="ins_level" jdbcType="VARCHAR" property="insLevel"/>
+    </resultMap>
+
+    <select id="getList" parameterType="com.cbkj.platform.api.beans.org.SysInstitution" resultMap="BaseResultMap">
+        SELECT
+        ins.ins_id,
+        ins.ins_code,
+        ins.ins_name,
+        ins.app_id,,
+        (SELECT app_name FROM sys_app WHERE app_id = ins.APP_ID LIMIT 1) AS APP_NAME
+        ins.ins_parent_code,
+        (SELECT INS_NAME FROM sys_institution WHERE INS_CODE = ins.ins_parent_code limit 1) as INS_PARENT_NAME
+        from sys_institution ins
+        where status='1'
+        <if test="appId != null and appId!='' ">
+            and APP_ID = #{appId}
+        </if>
+        <if test="insCode != null and insCode!='' ">
+            and ( INS_CODE = #{insCode}
+            <if test="lower != null and lower ">
+                or ins_parent_code = #{insCode}
+            </if>
+            )
+        </if>
+        order by ins.SORT, ins.INS_CODE
+    </select>
+
+    <select id="getDetail" parameterType="com.cbkj.platform.api.beans.org.SysInstitution" resultMap="BaseResultMap">
+        SELECT ins.*,
+        (SELECT INS_NAME FROM sys_institution WHERE INS_CODE = ins.ins_parent_code limit 1) as INS_PARENT_NAME,
+        (SELECT app_name FROM sys_app WHERE app_id = ins.APP_ID LIMIT 1) AS APP_NAME
+        from sys_institution ins
+        where status='1'
+        <if test="insId != null and insId!='' ">
+            and INS_ID = #{insId}
+        </if>
+        <if test="appId != null and appId!='' ">
+            and APP_ID = #{appId}
+        </if>
+        <if test="insCode != null and insCode!='' ">
+            and INS_CODE = #{insCode}
+        </if>
+    </select>
+</mapper>

+ 58 - 0
src/main/resources/mappers/param/SysParamMapper.xml

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.cbkj.platform.api.mapper.param.SysParamMapper">
+    <resultMap id="BaseResultMap" type="com.cbkj.platform.api.beans.param.SysParam">
+        <result column="APP_ID" jdbcType="VARCHAR" property="appId"/>
+        <result column="INS_CODE" jdbcType="VARCHAR" property="insCode"/>
+        <result column="DEPT_ID" jdbcType="VARCHAR" property="deptId"/>
+        <result column="PAR_CODE" jdbcType="VARCHAR" property="parCode"/>
+        <result column="PAR_NAME" jdbcType="VARCHAR" property="parName"/>
+        <result column="PAR_VALUES" jdbcType="VARCHAR" property="parValues"/>
+        <result column="param_desc" jdbcType="VARCHAR" property="paramDesc"/>
+        <result column="par_number" jdbcType="VARCHAR" property="parNumber"/>
+    </resultMap>
+
+    <select id="getList" resultMap="BaseResultMap" parameterType="com.cbkj.platform.api.beans.param.SysParam">
+        select APP_ID, INS_CODE, DEPT_ID, PAR_CODE, PAR_NAME, PAR_VALUES
+        from t_sys_param
+        where status = '1'
+        <if test="appId != null and appId != ''">
+            and APP_ID = #{ appId }
+        </if>
+        <if test="insCode != null and insCode != ''">
+            and INS_CODE = #{ insCode }
+        </if>
+        <if test="deptId != null and deptId != ''">
+            and DEPT_ID = #{deptId}
+        </if>
+        <if test="parCode != null and parCode != ''">
+            and PAR_CODE = #{ parCode }
+        </if>
+        <if test="parNumber != null and parNumber != ''">
+            and PAR_NUMBER = #{ parNumber }
+        </if>
+        order by PAR_NUMBER
+    </select>
+
+    <select id="getDetail" resultMap="BaseResultMap" parameterType="com.cbkj.platform.api.beans.param.SysParam">
+        select PAR_CODE, PAR_NAME, PAR_VALUES
+        from t_sys_param
+        where status = '1'
+        <if test="appId != null and appId != ''">
+            and APP_ID = #{ appId }
+        </if>
+        <if test="insCode != null and insCode != ''">
+            and INS_CODE = #{ insCode }
+        </if>
+        <if test="deptId != null and deptId != ''">
+            and DEPT_ID = #{deptId}
+        </if>
+        <if test="parCode != null and parCode != ''">
+            and PAR_CODE = #{ parCode }
+        </if>
+        <if test="parNumber != null and parNumber != ''">
+            and PAR_NUMBER = #{ parNumber }
+        </if>
+        limit 1
+    </select>
+</mapper>

+ 106 - 0
src/main/resources/mappers/user/AdminInfoMapper.xml

@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.cbkj.platform.api.mapper.user.AdminInfoMapper">
+    <resultMap id="BaseResultMap" type="com.cbkj.platform.api.beans.user.AdminInfo">
+        <id column="user_id" jdbcType="VARCHAR" property="userId"/>
+        <result column="user_name" jdbcType="VARCHAR" property="userName"/>
+        <result column="password" jdbcType="VARCHAR" property="password"/>
+        <result column="sex" jdbcType="VARCHAR" property="sex"/>
+        <result column="status" jdbcType="VARCHAR" property="status"/>
+        <result column="last_ip" jdbcType="VARCHAR" property="lastIp"/>
+        <result column="phone" jdbcType="VARCHAR" property="phone"/>
+        <result column="address" jdbcType="VARCHAR" property="address"/>
+        <result column="name_zh" jdbcType="VARCHAR" property="nameZh"/>
+        <result column="user_heand" jdbcType="VARCHAR" property="userHeand"/>
+        <result column="email" jdbcType="VARCHAR" property="email"/>
+        <result column="APP_ID" jdbcType="VARCHAR" property="appId"/>
+        <result column="APP_NAME" jdbcType="VARCHAR" property="appName"/>
+        <result column="INS_CODE" jdbcType="VARCHAR" property="insCode"/>
+        <result column="INS_NAME" jdbcType="VARCHAR" property="insName"/>
+        <result column="dept_id" jdbcType="VARCHAR" property="deptId"/>
+        <result column="dept_name" jdbcType="VARCHAR" property="deptName"/>
+        <result column="EXPIRE_DATE" jdbcType="TIMESTAMP" property="expireDate"/>
+        <result column="is_qualifier" jdbcType="INTEGER" property="isQualifier"/>
+        <result column="dept_id_his" jdbcType="VARCHAR" property="deptIdHis"/>
+        <result column="dept_name_his" jdbcType="VARCHAR" property="deptNameHis"/>
+        <result column="employee_id" jdbcType="VARCHAR" property="employeeId"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="com.cbkj.platform.api.beans.user.AdminInfo" resultMap="BaseResultMap">
+        select ai.user_id, ai.user_name, ai.name_zh, ai.app_id, ai.ins_code, ai.dept_id, ai.dept_name
+        from sys_admin_info ai
+        <where>
+            ai.status = '1'
+            <if test="appId != null and appId != ''">
+                and ai.app_id = #{appId}
+            </if>
+            <if test="insCode != null and insCode != ''">
+                and ai.ins_code = #{insCode}
+            </if>
+            <if test="deptId != null and deptId != ''">
+                and ai.dept_id = #{deptId}
+            </if>
+            <if test="userName != null and userName != ''">
+                and ai.user_name like concat('%', #{userName}, '%')
+            </if>
+            <if test="nameZh != null and nameZh != ''">
+                and ai.name_zh like concat('%', #{nameZh}, '%')
+            </if>
+        </where>
+    </select>
+
+
+    <select id="getDetail" parameterType="com.cbkj.platform.api.beans.user.AdminInfo" resultMap="BaseResultMap">
+        select ai.*
+        from sys_admin_info ai
+        <where>
+            ai.status = '1'
+            <if test="appId != null and appId != ''">
+                and ai.app_id = #{appId}
+            </if>
+            <if test="insCode != null and insCode != ''">
+                and ai.ins_code = #{insCode}
+            </if>
+            <if test="deptId != null and deptId != ''">
+                and ai.dept_id = #{deptId}
+            </if>
+            <if test="employee_id != null and employee_id != ''">
+                and ai.employee_id = #{employee_id}
+            </if>
+            <if test="userId != null and userId != ''">
+                and ai.user_id = #{userId}
+            </if>
+        </where>
+    </select>
+
+    <select id="getListByMultipoint" parameterType="com.cbkj.platform.api.beans.user.AdminInfo" resultMap="BaseResultMap">
+        select e.*
+        ,(select app.app_name from sys_app app where app.app_id = e.APP_ID) APP_NAME
+        ,(select ins.INS_NAME from sys_institution ins where ins.ins_code = e.INS_CODE and ins.app_id = e.APP_ID) INS_NAME
+        from
+        (
+            select ai.user_id, ai.user_name, ai.name_zh
+            , IFNULL(dm.app_id, IFNULL(ai.app_id, '000000')) app_id
+            , IFNULL(dm.ins_code, IFNULL(ai.ins_code, '000000')) ins_code
+            , IFNULL(dm.dept_id, IFNULL(ai.dept_id, '000000')) dept_id
+            , IFNULL(dm.dept_name, IFNULL(ai.dept_name, '000000')) dept_name
+            from sys_admin_info ai
+            left join sys_doctor_multipoint dm on dm.user_id = ai.user_id
+            where ai.status = '1'
+            <if test="appId != null and appId != ''">
+                and dm.app_id = #{appId}
+            </if>
+            <if test="insCode != null and insCode != ''">
+                and dm.ins_code = #{insCode}
+            </if>
+            <if test="deptId != null and deptId != ''">
+                and dm.dept_id = #{deptId}
+            </if>
+            <if test="deptIdHis != null and deptIdHis != ''">
+                and dm.dept_id_his = #{deptIdHis}
+            </if>
+            order by app_id, ins_code, dept_id
+        ) e
+    </select>
+</mapper>

+ 14 - 0
src/main/resources/mybatis-config.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <settings>
+        <setting name="cacheEnabled" value="true" /><!-- 全局映射器启用缓存 -->
+        <setting name="useGeneratedKeys" value="true" />
+        <setting name="defaultExecutorType" value="REUSE" />
+        <!-- 调试打印SQL-->
+        <!--<setting name="logImpl" value="STDOUT_LOGGING" /> -->
+        <!--日志打印SQL -->
+        <setting name="logImpl" value="SLF4J" />
+    </settings>
+
+</configuration>

+ 221 - 0
src/main/resources/zlogback.xml

@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration debug="false" scan="true" scanPeriod="1 seconds">
+
+    <contextName>cbkj</contextName>
+    <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
+    <property name="LOG_PATH" value="/app/logs"/>
+    <!--设置系统日志目录-->
+    <property name="APPDIR" value="systemLogs"/>
+    <!--设置日期格式 -->
+    <timestamp key="bySecond" datePattern="yyyyMMdd'T'HHmmss"/>
+    <!-- %m输出的信息,%p日志级别,%t线程名,%d日期,%c类的全名,,,, -->
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <!--<pattern>%d %p (%file:%line\)- %m%n</pattern>-->
+            <!--格式化输出:%d:表示日期    %thread:表示线程名     %-5level:级别从左显示5个字符宽度  %msg:日志消息    %n:是换行符-->
+            <pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger - %msg%n</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+    </appender>
+    <!--
+          说明:
+          1、日志级别及文件
+              日志记录采用分级记录,级别与日志文件名相对应,不同级别的日志信息记录到不同的日志文件中
+              例如:error级别记录到log_error_xxx.log或log_error.log(该文件为当前记录的日志文件),而log_error_xxx.log为归档日志,
+              日志文件按日期记录,同一天内,若日志文件大小等于或大于2M,则按0、1、2...顺序分别命名
+              例如log-level-2013-12-21.0.log
+              其它级别的日志也是如此。
+          2、文件路径
+              若开发、测试用,在Eclipse中运行项目,则到Eclipse的安装路径查找logs文件夹,以相对路径../logs。
+              若部署到Tomcat下,则在Tomcat下的logs文件中
+          3、Appender
+              FILEERROR对应error级别,文件名以log-error-xxx.log形式命名
+              FILEWARN对应warn级别,文件名以log-warn-xxx.log形式命名
+              FILEINFO对应info级别,文件名以log-info-xxx.log形式命名
+              FILEDEBUG对应debug级别,文件名以log-debug-xxx.log形式命名
+              CONSOLE将日志信息输出到控制上,为方便开发测试使用
+       -->
+    <!-- 日志记录器,日期滚动记录 -->
+    <appender name="FILEERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/${APPDIR}/${bySecond}_error.log</file>
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 归档的日志文件的路径,例如今天是2013-12-21日志,当前写的日志文件路径为file节点指定,可以将此文件与file指定文件路径设置为不同路径,从而将当前日志文件或归档日志文件置不同的目录。
+            而2013-12-21的日志文件在由fileNamePattern指定。%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/${APPDIR}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志文件保留天数-->
+            <MaxHistory>30</MaxHistory>
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,命名日志文件,例如log-error-2013-12-21.0.log -->
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>20MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+        </rollingPolicy>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger Line:%-3L - %msg%n</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+        <!-- 此日志文件只记录error级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>error</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!-- 日志记录器,日期滚动记录 -->
+    <appender name="FILEWARN" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${LOG_PATH}/${APPDIR}/${bySecond}_warn.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${LOG_PATH}/${APPDIR}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <MaxHistory>10</MaxHistory>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>20MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+        </rollingPolicy>
+        <append>true</append>
+
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger Line:%-3L - %msg%n</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>warn</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!-- 日志记录器,日期滚动记录 -->
+    <appender name="FILEINFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${LOG_PATH}/${APPDIR}/${bySecond}_info.log</file>
+        <append>true</append>
+
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${LOG_PATH}/${APPDIR}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <MaxHistory>10</MaxHistory>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>20MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+        </rollingPolicy>
+
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger Line:%-3L - %msg%n</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>info</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!-- 日志记录器,日期滚动记录 -->
+    <appender name="FILEDEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${LOG_PATH}/${APPDIR}/${bySecond}_debug.log</file>
+        <append>true</append>
+
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${LOG_PATH}/${APPDIR}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <MaxHistory>10</MaxHistory>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>20MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+        </rollingPolicy>
+
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger Line:%-3L - %msg%n</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>DEBUG</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+
+    <!--日志异步到数据库  -->
+    <!--<appender name="DBAPPENDER" class="ch.qos.logback.classic.db.DBAppender">-->
+    <!--<connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">-->
+    <!--<TargetDataSource class="com.zaxxer.hikari.HikariDataSource">-->
+    <!--<driverClassName>com.mysql.jdbc.Driver</driverClassName>-->
+    <!--<jdbcUrl>jdbc:mysql://localhost:3306/albedo-new?useUnicode=true&amp;characterEncoding=utf8&amp;useSSL=false</jdbcUrl>-->
+    <!--<username>root</username>-->
+    <!--<password>123456</password>-->
+    <!--<poolName>HikariPool-logback</poolName>-->
+    <!--</TargetDataSource>-->
+    <!--</connectionSource>-->
+    <!--&lt;!&ndash; 此日志文件只记录info级别的 &ndash;&gt;-->
+    <!--<filter class="ch.qos.logback.classic.filter.LevelFilter">-->
+    <!--<level>warn</level>-->
+    <!--<onMatch>ACCEPT</onMatch>-->
+    <!--<onMismatch>DENY</onMismatch>-->
+    <!--</filter>-->
+    <!--&lt;!&ndash; 此日志文件只记录info级别的 &ndash;&gt;-->
+    <!--<filter class="ch.qos.logback.classic.filter.LevelFilter">-->
+    <!--<level>error</level>-->
+    <!--<onMatch>ACCEPT</onMatch>-->
+    <!--<onMismatch>DENY</onMismatch>-->
+    <!--</filter>-->
+    <!--</appender>-->
+
+
+    <logger name="org.springframework.data.mybatis" level="DEBUG"/>
+    <logger name="org.springframework.aop.aspectj" level="DEBUG"/>
+    <logger name="org.apache.xerces" level="INFO"/>
+    <logger name="javax.activation" level="WARN"/>
+    <logger name="javax.mail" level="WARN"/>
+    <logger name="javax.xml.bind" level="WARN"/>
+    <logger name="ch.qos.logback" level="INFO"/>
+    <logger name="com.codahale.metrics" level="WARN"/>
+    <logger name="com.ryantenney" level="WARN"/>
+    <logger name="com.sun" level="WARN"/>
+    <logger name="com.zaxxer" level="WARN"/>
+    <logger name="io.undertow" level="WARN"/>
+    <logger name="net.sf.ehcache" level="WARN"/>
+    <logger name="org.apache" level="WARN"/>
+    <logger name="org.apache.catalina.startup.DigesterFactory" level="OFF"/>
+    <logger name="org.bson" level="WARN"/>
+    <logger name="org.hibernate.validator" level="WARN"/>
+    <logger name="org.hibernate" level="WARN"/>
+    <logger name="org.hibernate.ejb.HibernatePersistence" level="OFF"/>
+    <logger name="org.springframework.web" level="INFO"/>
+    <logger name="org.springframework.security" level="WARN"/>
+    <logger name="org.springframework.cache" level="WARN"/>
+    <logger name="org.thymeleaf" level="WARN"/>
+    <logger name="sun.rmi" level="WARN"/>
+    <logger name="sun.rmi.transport" level="WARN"/>
+    <logger name="org.springframework.core" level="ERROR"/>
+    <logger name="jdbc.connection" level="ERROR"/>
+    <logger name="jdbc.resultset" level="ERROR"/>
+    <logger name="jdbc.resultsettable" level="INFO"/>
+    <logger name="jdbc.audit" level="ERROR"/>
+    <!--<logger name="jdbc.sqltiming" level="ERROR"/>
+    <logger name="jdbc.sqlonly" level="INFO"/>-->
+    <!--生产环境使用注释内的配置-->
+    <logger name="jdbc.sqltiming" level="INFO"/>
+    <logger name="jdbc.sqlonly" level="OFF"/>
+    <logger name="com.cbkj.platform.api.mapper" level="INFO"/>
+
+    <!-- 日志级别变更穿透 -->
+    <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
+        <resetJUL>true</resetJUL>
+    </contextListener>
+
+
+    <root level="INFO">
+        <appender-ref ref="STDOUT"/>
+        <appender-ref ref="FILEINFO"/>
+        <appender-ref ref="FILEERROR"/>
+        <appender-ref ref="FILEWARN"/>
+    </root>
+
+</configuration>

BIN
src/test/java/ApplicationTests.java