瀏覽代碼

first commit

Drew 7 年之前
當前提交
cf7c959e0e
共有 100 個文件被更改,包括 10939 次插入0 次删除
  1. 6 0
      .gitignore
  2. 6 0
      README.md
  3. 30 0
      log.txt
  4. 984 0
      pom.xml
  5. 10 0
      runConfigurations/Install_Dependencies.xml
  6. 75 0
      runConfigurations/Tomcat.xml
  7. 12 0
      runConfigurations/Vue_Build.xml
  8. 12 0
      runConfigurations/Vue_Server.xml
  9. 70 0
      src/main/java/com/izouma/awesomeadmin/activiti/CustomAuthenticationProvider.java
  10. 31 0
      src/main/java/com/izouma/awesomeadmin/activiti/CustomGroupEntityManager.java
  11. 24 0
      src/main/java/com/izouma/awesomeadmin/activiti/CustomGroupEntityManagerFactory.java
  12. 48 0
      src/main/java/com/izouma/awesomeadmin/activiti/CustomUserEntityManager.java
  13. 23 0
      src/main/java/com/izouma/awesomeadmin/activiti/CustomUserEntityManagerFactory.java
  14. 45 0
      src/main/java/com/izouma/awesomeadmin/activiti/RestFilter.java
  15. 153 0
      src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java
  16. 36 0
      src/main/java/com/izouma/awesomeadmin/constant/RongConstant.java
  17. 17 0
      src/main/java/com/izouma/awesomeadmin/container/DateConverter.java
  18. 26 0
      src/main/java/com/izouma/awesomeadmin/container/Lifecycle.java
  19. 70 0
      src/main/java/com/izouma/awesomeadmin/container/StartupListener.java
  20. 29 0
      src/main/java/com/izouma/awesomeadmin/dao/AccessTokenMapper.java
  21. 21 0
      src/main/java/com/izouma/awesomeadmin/dao/AccessTokenMapper.xml
  22. 27 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQueryMapper.java
  23. 189 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQueryMapper.xml
  24. 27 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQuerySqlServerMapper.java
  25. 182 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQuerySqlServerMapper.xml
  26. 31 0
      src/main/java/com/izouma/awesomeadmin/dao/DataMapper.java
  27. 35 0
      src/main/java/com/izouma/awesomeadmin/dao/DataMapper.xml
  28. 36 0
      src/main/java/com/izouma/awesomeadmin/dao/DataSourceInfoMapper.java
  29. 327 0
      src/main/java/com/izouma/awesomeadmin/dao/DataSourceInfoMapper.xml
  30. 51 0
      src/main/java/com/izouma/awesomeadmin/dao/DepartInfoMapper.java
  31. 341 0
      src/main/java/com/izouma/awesomeadmin/dao/DepartInfoMapper.xml
  32. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/GenCodeMapper.java
  33. 265 0
      src/main/java/com/izouma/awesomeadmin/dao/GenCodeMapper.xml
  34. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/GenTestTableMapper.java
  35. 209 0
      src/main/java/com/izouma/awesomeadmin/dao/GenTestTableMapper.xml
  36. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/PowerInfoMapper.java
  37. 224 0
      src/main/java/com/izouma/awesomeadmin/dao/PowerInfoMapper.xml
  38. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/QueryConfigMapper.java
  39. 363 0
      src/main/java/com/izouma/awesomeadmin/dao/QueryConfigMapper.xml
  40. 26 0
      src/main/java/com/izouma/awesomeadmin/dao/RongYunTokenMapper.java
  41. 88 0
      src/main/java/com/izouma/awesomeadmin/dao/RongYunTokenMapper.xml
  42. 51 0
      src/main/java/com/izouma/awesomeadmin/dao/SuperUserMapper.java
  43. 88 0
      src/main/java/com/izouma/awesomeadmin/dao/SuperUserMapper.xml
  44. 14 0
      src/main/java/com/izouma/awesomeadmin/dao/SysAppTokenMapper.java
  45. 18 0
      src/main/java/com/izouma/awesomeadmin/dao/SysAppTokenMapper.xml
  46. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/SysDataruleMapper.java
  47. 153 0
      src/main/java/com/izouma/awesomeadmin/dao/SysDataruleMapper.xml
  48. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/SysMenuMapper.java
  49. 386 0
      src/main/java/com/izouma/awesomeadmin/dao/SysMenuMapper.xml
  50. 47 0
      src/main/java/com/izouma/awesomeadmin/dao/SysRoleMapper.java
  51. 372 0
      src/main/java/com/izouma/awesomeadmin/dao/SysRoleMapper.xml
  52. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/TableFieldMapper.java
  53. 494 0
      src/main/java/com/izouma/awesomeadmin/dao/TableFieldMapper.xml
  54. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/TableShouyiYaopinxinxiMapper.java
  55. 376 0
      src/main/java/com/izouma/awesomeadmin/dao/TableShouyiYaopinxinxiMapper.xml
  56. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/TestAaaMapper.java
  57. 331 0
      src/main/java/com/izouma/awesomeadmin/dao/TestAaaMapper.xml
  58. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/TestBbbCopyMapper.java
  59. 237 0
      src/main/java/com/izouma/awesomeadmin/dao/TestBbbCopyMapper.xml
  60. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/TestBbbMapper.java
  61. 281 0
      src/main/java/com/izouma/awesomeadmin/dao/TestBbbMapper.xml
  62. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/TestDeployMapper.java
  63. 212 0
      src/main/java/com/izouma/awesomeadmin/dao/TestDeployMapper.xml
  64. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/TestSqlserverAaaMapper.java
  65. 228 0
      src/main/java/com/izouma/awesomeadmin/dao/TestSqlserverAaaMapper.xml
  66. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/TestaaaoneMapper.java
  67. 235 0
      src/main/java/com/izouma/awesomeadmin/dao/TestaaaoneMapper.xml
  68. 39 0
      src/main/java/com/izouma/awesomeadmin/dao/UserInfoMapper.java
  69. 433 0
      src/main/java/com/izouma/awesomeadmin/dao/UserInfoMapper.xml
  70. 23 0
      src/main/java/com/izouma/awesomeadmin/datasource/DataService.java
  71. 44 0
      src/main/java/com/izouma/awesomeadmin/datasource/DataServiceImpl.java
  72. 14 0
      src/main/java/com/izouma/awesomeadmin/datasource/DataSource.java
  73. 67 0
      src/main/java/com/izouma/awesomeadmin/datasource/DataSourceAspect.java
  74. 79 0
      src/main/java/com/izouma/awesomeadmin/datasource/DynamicDataSource.java
  75. 20 0
      src/main/java/com/izouma/awesomeadmin/datasource/DynamicDataSourceHolder.java
  76. 144 0
      src/main/java/com/izouma/awesomeadmin/dto/Page.java
  77. 70 0
      src/main/java/com/izouma/awesomeadmin/dto/Result.java
  78. 87 0
      src/main/java/com/izouma/awesomeadmin/dto/TreeNode.java
  79. 32 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/AccessToken.java
  80. 69 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/BaseMessage.java
  81. 54 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/CustomServiceMessage.java
  82. 18 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/Image.java
  83. 18 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/ImageMessage.java
  84. 74 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/Music.java
  85. 18 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/MusicMessage.java
  86. 58 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/News.java
  87. 25 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/NewsMessage.java
  88. 24 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/TemplateData.java
  89. 47 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/TemplateMessage.java
  90. 37 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/TextMessage.java
  91. 39 0
      src/main/java/com/izouma/awesomeadmin/interceptor/GlobalInterceptor.java
  92. 143 0
      src/main/java/com/izouma/awesomeadmin/interceptor/PageInterceptor.java
  93. 38 0
      src/main/java/com/izouma/awesomeadmin/model/AccessToken.java
  94. 100 0
      src/main/java/com/izouma/awesomeadmin/model/CommonQuery.java
  95. 115 0
      src/main/java/com/izouma/awesomeadmin/model/DataSourceInfo.java
  96. 186 0
      src/main/java/com/izouma/awesomeadmin/model/DepartInfo.java
  97. 295 0
      src/main/java/com/izouma/awesomeadmin/model/GenCode.java
  98. 121 0
      src/main/java/com/izouma/awesomeadmin/model/GenTestTable.java
  99. 106 0
      src/main/java/com/izouma/awesomeadmin/model/PowerInfo.java
  100. 163 0
      src/main/java/com/izouma/awesomeadmin/model/QueryConfig.java

+ 6 - 0
.gitignore

@@ -0,0 +1,6 @@
+.vscode
+.DS_Store
+.idea
+node_modules/
+/target
+*.iml

+ 6 - 0
README.md

@@ -0,0 +1,6 @@
+# 后台项目模版
+* IDEA 直接打开项目
+* 复制 runConfigurations 文件夹至 .idea 文件夹下
+* 运行 Install Dependencies
+* 同时运行 Tomcat 和 Vue Server
+* 访问 [http://localhost:8081](http://localhost:8081)

+ 30 - 0
log.txt

@@ -0,0 +1,30 @@
+[2018-07-31 18:41:11] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-07-31 18:48:18] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-07-31 18:49:35] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-07-31 18:50:31] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:25:51] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:41:52] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:51:56] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:58:08] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:58:30] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:58:55] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:00:32] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:10:38] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:12:06] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:13:31] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:14:54] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:15:45] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:22:01] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:23:51] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:25:15] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:25:30] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:26:59] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:29:33] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:36:11] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:39:47] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:41:23] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-08 19:00:42] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-08 19:02:19] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-08 19:03:57] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-08 19:04:18] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-08 19:08:49] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.

+ 984 - 0
pom.xml

@@ -0,0 +1,984 @@
+<?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.izouma</groupId>
+    <artifactId>awesome-admin</artifactId>
+    <version>1.0.0</version>
+    <packaging>war</packaging>
+
+    <name>awesome-admin</name>
+    <url>http://www.izouma.com</url>
+
+    <!-- 项目属性 -->
+    <properties>
+        <!-- other libs -->
+        <lib.path>${basedir}/src/main/webapp/WEB-INF/lib</lib.path>
+        <!-- main version setting -->
+        <spring.version>4.3.5.RELEASE</spring.version>
+        <validator.version>5.4.0.Final</validator.version>
+        <mybatis.version>3.3.1</mybatis.version>
+        <mybatis-spring.version>1.2.2</mybatis-spring.version>
+        <druid.version>1.0.31</druid.version>
+        <ehcache.version>2.6.11</ehcache.version>
+        <ehcache-web.version>2.0.4</ehcache-web.version>
+        <shiro.version>1.4.0</shiro.version>
+        <sitemesh.version>2.4.2</sitemesh.version>
+        <activiti.version>5.22.0</activiti.version>
+
+        <!-- tools version setting -->
+        <slf4j.version>1.7.25</slf4j.version>
+        <log4j.version>1.2.17</log4j.version>
+        <commons-io.version>2.4</commons-io.version>
+        <commons-codec.version>1.9</commons-codec.version>
+        <commons-fileupload.version>1.3.1</commons-fileupload.version>
+        <commons-beanutils.version>1.9.1</commons-beanutils.version>
+        <jackson.version>2.8.6</jackson.version>
+        <fastjson.version>1.1.40</fastjson.version>
+        <xstream.version>1.4.9</xstream.version>
+        <dozer.version>5.5.1</dozer.version>
+        <poi.version>3.9</poi.version>
+        <freemarker.version>2.3.25-incubating</freemarker.version>
+        <quartz.version>2.2.3</quartz.version>
+        <ckfinder.version>2.3</ckfinder.version>
+
+        <guava.version>20.0</guava.version>
+        <commons-lang3.version>3.5</commons-lang3.version>
+        <commons-text.version>1.3</commons-text.version>
+        <commons-collections.version>4.1</commons-collections.version>
+
+        <!-- jdbc driver setting -->
+        <mysql.driver.version>5.1.30</mysql.driver.version>
+        <sqlserver.driver.version>4.0.0</sqlserver.driver.version>
+        <oracle.driver.version>10.2.0.4.0</oracle.driver.version>
+        <mssql.driver.version>1.3.1</mssql.driver.version>
+
+        <!-- environment setting -->
+        <jdk.version>1.8</jdk.version>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <downloadSources>true</downloadSources>
+
+    </properties>
+    <!-- 设定仓库 -->
+    <!--<repositories>-->
+    <!--<repository>-->
+    <!--<id>central-repos</id>-->
+    <!--<name>Central Repository</name>-->
+    <!--<url>http://maven.aliyun.com/nexus/content/groups/public/</url>-->
+    <!--<releases>-->
+    <!--<enabled>true</enabled>-->
+    <!--</releases>-->
+    <!--<snapshots>-->
+    <!--<enabled>false</enabled>-->
+    <!--</snapshots>-->
+    <!--</repository>-->
+
+    <!--<repository>-->
+    <!--<id>central-repos2</id>-->
+    <!--<name>Central Repository 2</name>-->
+    <!--<url>http://mvnrepo.code.taobao.org/nexus/content/repositories/snapshots/</url>-->
+    <!--<releases>-->
+    <!--<enabled>true</enabled>-->
+    <!--</releases>-->
+    <!--<snapshots>-->
+    <!--<enabled>false</enabled>-->
+    <!--</snapshots>-->
+    <!--</repository>-->
+
+    <!--<repository>-->
+    <!--<id>springsource-repos</id>-->
+    <!--<name>SpringSource Repository</name>-->
+    <!--<url>http://mvnrepo.code.taobao.org/nexus/content/repositories/releases/</url>-->
+    <!--<releases>-->
+    <!--<enabled>true</enabled>-->
+    <!--</releases>-->
+    <!--<snapshots>-->
+    <!--<enabled>false</enabled>-->
+    <!--</snapshots>-->
+    <!--</repository>-->
+    <!---->
+    <!--<repository>-->
+    <!--<id>bitwalker.user-agent-utils.mvn.repo</id>-->
+    <!--<url>https://nexus.jackpinetech.com/nexus/content/groups/public</url>-->
+    <!--&lt;!&ndash; use snapshot version &ndash;&gt;-->
+    <!--<snapshots>-->
+    <!--<updatePolicy>always</updatePolicy>-->
+    <!--</snapshots>-->
+    <!--</repository>-->
+    <!--</repositories>-->
+    <build>
+        <finalName>awesome-admin</finalName>
+        <resources>
+            <resource>
+                <directory>src/main/java</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/*.xml</include>
+                    <include>**/*.properties</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+        </resources>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${jdk.version}</source>
+                    <target>${jdk.version}</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.10</version>
+                <configuration>
+                    <skip>true</skip>
+                    <testFailureIgnore>true</testFailureIgnore>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <!-- 依赖项定义 -->
+    <dependencies>
+        <!-- SPRING begin -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
+            <version>${spring.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-aop</artifactId>
+            <version>${spring.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-tx</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-expression</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+
+        <!-- spring orm -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-orm</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-jdbc</artifactId>
+            <version>${spring.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>c3p0</groupId>
+                    <artifactId>c3p0</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- spring websocket-->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-websocket</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-messaging</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+
+        <!-- bean validate -->
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <version>${validator.version}</version>
+        </dependency>
+        <!-- SPRING end -->
+
+        <!-- AOP begin -->
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjrt</artifactId>
+            <version>1.7.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjweaver</artifactId>
+            <version>1.7.4</version>
+        </dependency>
+        <dependency>
+            <groupId>cglib</groupId>
+            <artifactId>cglib</artifactId>
+            <version>3.1</version>
+        </dependency>
+        <!-- AOP end -->
+
+        <!-- PERSISTENCE begin -->
+
+        <!-- MyBatis -->
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis</artifactId>
+            <version>${mybatis.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis-spring</artifactId>
+            <version>${mybatis-spring.version}</version>
+        </dependency>
+
+        <!-- connection pool -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>${druid.version}</version>
+        </dependency>
+
+        <!-- jdbc driver -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>${mysql.driver.version}</version>
+        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>com.microsoft.sqlserver</groupId>-->
+            <!--<artifactId>sqljdbc4</artifactId>-->
+            <!--<version>${sqlserver.driver.version}</version>-->
+        <!--</dependency>-->
+        <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/sqljdbc4 -->
+        <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
+        <dependency>
+            <groupId>com.microsoft.sqlserver</groupId>
+            <artifactId>mssql-jdbc</artifactId>
+            <version>6.4.0.jre8</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.mchange</groupId>
+            <artifactId>c3p0</artifactId>
+            <version>0.9.5.2</version>
+        </dependency>
+
+        <!-- WEB begin -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-webmvc</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-oxm</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>opensymphony</groupId>
+            <artifactId>sitemesh</artifactId>
+            <version>${sitemesh.version}</version>
+        </dependency>
+        <!--<dependency>-->
+        <!--<groupId>taglibs</groupId>-->
+        <!--<artifactId>standard</artifactId>-->
+        <!--<version>1.1.2</version>-->
+        <!--<type>jar</type>-->
+        <!--</dependency>-->
+
+
+        <dependency>
+            <groupId>javax</groupId>
+            <artifactId>javaee-api</artifactId>
+            <version>7.0</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>jstl</artifactId>
+            <version>1.2</version>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet.jsp</groupId>
+            <artifactId>jsp-api</artifactId>
+            <version>2.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <!--  <dependency>
+             <groupId>javax.servlet</groupId>
+             <artifactId>javax.servlet-api</artifactId>
+             <version>3.0.1</version>
+             <scope>provided</scope>
+         </dependency>
+         <dependency>
+             <groupId>javax.servlet.jsp</groupId>
+             <artifactId>jsp-api</artifactId>
+             <version>2.2</version>
+             <scope>provided</scope>
+         </dependency>-->
+
+        <dependency>
+            <groupId>net.sf.ehcache</groupId>
+            <artifactId>ehcache-core</artifactId>
+            <version>${ehcache.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jgroups</groupId>
+            <artifactId>jgroups</artifactId>
+            <version>3.6.6.Final</version>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+            <version>2.8.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+            <version>2.4.2</version>
+        </dependency>
+        <dependency>
+            <groupId>de.ruedigermoeller</groupId>
+            <artifactId>fst</artifactId>
+            <version>2.42</version>
+        </dependency>
+        <dependency>
+            <groupId>com.esotericsoftware</groupId>
+            <artifactId>kryo-shaded</artifactId>
+            <version>3.0.0</version>
+        </dependency>
+        <!-- CACHE end -->
+
+        <!-- SECURITY begin -->
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-core</artifactId>
+            <version>${shiro.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-spring</artifactId>
+            <version>${shiro.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-cas</artifactId>
+            <version>${shiro.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-web</artifactId>
+            <version>${shiro.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-ehcache</artifactId>
+            <version>${shiro.version}</version>
+        </dependency>
+        <!-- SECURITY end -->
+
+        <!-- Activiti -->
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-engine</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-spring</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-explorer</artifactId>
+            <version>${activiti.version}</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>vaadin</artifactId>
+                    <groupId>com.vaadin</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>dcharts-widget</artifactId>
+                    <groupId>org.vaadin.addons</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>activiti-simple-workflow</artifactId>
+                    <groupId>org.activiti</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-modeler</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-rest</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-diagram-rest</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-json-converter</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-cxf</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.11.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-api</artifactId>
+            <version>2.7.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>2.7.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http-jetty</artifactId>
+            <version>2.7.6</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>2.7.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+            <version>2.2.11</version>
+        </dependency>
+
+
+        <!-- LOGGING begin -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+        <!-- common-logging 实际调用slf4j -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+        <!-- java.util.logging 实际调用slf4j -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jul-to-slf4j</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>${log4j.version}</version>
+        </dependency>
+        <!-- LOGGING end -->
+
+        <!-- GENERAL UTILS begin -->
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${commons-io.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>${commons-codec.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>${commons-fileupload.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <version>${commons-beanutils.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-text</artifactId>
+            <version>${commons-text.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-collections4</artifactId>
+            <version>${commons-collections.version}</version>
+        </dependency>
+
+
+        <!-- jackson json -->
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.module</groupId>
+            <artifactId>jackson-module-jaxb-annotations</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+
+        <!-- fastjson json-->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>${fastjson.version}</version>
+        </dependency>
+
+        <!-- xstream xml -->
+        <dependency>
+            <groupId>com.thoughtworks.xstream</groupId>
+            <artifactId>xstream</artifactId>
+            <version>${xstream.version}</version>
+        </dependency>
+
+        <!-- pojo copy -->
+        <dependency>
+            <groupId>net.sf.dozer</groupId>
+            <artifactId>dozer</artifactId>
+            <version>${dozer.version}</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/com.belerweb/pinyin4j -->
+        <dependency>
+            <groupId>com.belerweb</groupId>
+            <artifactId>pinyin4j</artifactId>
+            <version>2.5.1</version>
+        </dependency>
+
+
+        <!-- template engine -->
+        <dependency>
+            <groupId>org.freemarker</groupId>
+            <artifactId>freemarker</artifactId>
+            <version>${freemarker.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.ibeetl</groupId>
+            <artifactId>beetl</artifactId>
+            <version>2.7.5</version>
+        </dependency>
+
+        <!-- email -->
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>mail</artifactId>
+            <version>1.4.7</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>activation</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+
+        <!-- poi office -->
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml-schemas</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+
+        <!-- image util -->
+        <dependency>
+            <groupId>com.drewnoakes</groupId>
+            <artifactId>metadata-extractor</artifactId>
+            <version>2.10.1</version>
+        </dependency>
+
+        <!-- 条形码、二维码生成  -->
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>core</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>batik</groupId>
+            <artifactId>batik-util</artifactId>
+            <version>1.6-1</version>
+        </dependency>
+
+        <!-- quartz -->
+        <dependency>
+            <groupId>org.quartz-scheduler</groupId>
+            <artifactId>quartz</artifactId>
+            <version>${quartz.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>c3p0</groupId>
+                    <artifactId>c3p0</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.quartz-scheduler</groupId>
+            <artifactId>quartz-jobs</artifactId>
+            <version>${quartz.version}</version>
+        </dependency>
+
+        <!--&lt;!&ndash; 中文分词 &ndash;&gt;-->
+        <!--<dependency>-->
+        <!--<groupId>org.wltea</groupId>-->
+        <!--<artifactId>analyzer</artifactId>-->
+        <!--<version>2012_u6</version>-->
+        <!--</dependency>-->
+        <!-- GENERAL UTILS end -->
+
+        <!-- sigar -->
+        <!-- https://mvnrepository.com/artifact/org.fusesource/sigar -->
+        <dependency>
+            <groupId>org.fusesource</groupId>
+            <artifactId>sigar</artifactId>
+            <version>1.6.4</version>
+        </dependency>
+        <!-- CKFinder begin -->
+        <dependency>
+            <groupId>net.coobird</groupId>
+            <artifactId>thumbnailator</artifactId>
+            <version>0.4.8</version>
+        </dependency>
+        <!--<dependency>-->
+        <!--<groupId>com.ckfinder</groupId>-->
+        <!--<artifactId>apache-ant-zip</artifactId>-->
+        <!--<version>${ckfinder.version}</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+        <!--<groupId>com.ckfinder</groupId>-->
+        <!--<artifactId>ckfinder</artifactId>-->
+        <!--<version>${ckfinder.version}</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+        <!--<groupId>com.ckfinder</groupId>-->
+        <!--<artifactId>ckfinderplugin-fileeditor</artifactId>-->
+        <!--<version>${ckfinder.version}</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+        <!--<groupId>com.ckfinder</groupId>-->
+        <!--<artifactId>ckfinderplugin-imageresize</artifactId>-->
+        <!--<version>${ckfinder.version}</version>-->
+        <!--</dependency>-->
+        <!-- CKFinder end -->
+
+        <!-- Echarts图表依赖包开始 -->
+        <!-- https://mvnrepository.com/artifact/com.github.abel533/ECharts -->
+        <dependency>
+            <groupId>com.github.abel533</groupId>
+            <artifactId>ECharts</artifactId>
+            <version>3.0.0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.6.2</version>
+        </dependency>
+        <!-- Echarts图表依赖包结束 -->
+
+        <!-- TEST begin -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <!-- TEST end -->
+        <dependency>
+            <groupId>eu.bitwalker</groupId>
+            <artifactId>UserAgentUtils</artifactId>
+            <version>1.20</version>
+        </dependency>
+
+        <!--httpcore -->
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>4.4.4</version>
+        </dependency>
+
+
+        <!-- swagger-springmvc -->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>2.7.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>2.7.0</version>
+        </dependency>
+        <!-- swagger-springmvc -->
+
+        <!--httpclient -->
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.2</version>
+        </dependency>
+
+        <!-- UTILS begin -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>${guava.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>${commons-lang3.version}</version>
+        </dependency>
+        <!-- UTILS end -->
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+            <version>3.2.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-vod</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>2.0.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>aopalliance</groupId>
+            <artifactId>aopalliance</artifactId>
+            <version>1.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>dom4j</groupId>
+            <artifactId>dom4j</artifactId>
+            <version>1.6.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>net.sf.ezmorph</groupId>
+            <artifactId>ezmorph</artifactId>
+            <version>1.0.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.logging</groupId>
+            <artifactId>jboss-logging</artifactId>
+            <version>3.3.0.Final</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-vfs</artifactId>
+            <version>3.2.12.Final</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jdom</groupId>
+            <artifactId>jdom</artifactId>
+            <version>1.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.jettison</groupId>
+            <artifactId>jettison</artifactId>
+            <version>1.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>net.sf.json-lib</groupId>
+            <artifactId>json-lib</artifactId>
+            <classifier>jdk15</classifier>
+            <version>2.4</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+            <version>20160810</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.drewnoakes</groupId>
+            <artifactId>metadata-extractor</artifactId>
+            <version>2.10.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>net.coobird</groupId>
+            <artifactId>thumbnailator</artifactId>
+            <version>0.4.8</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.adobe.xmp</groupId>
+            <artifactId>xmpcore</artifactId>
+            <version>5.1.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>xpp3</groupId>
+            <artifactId>xpp3_min</artifactId>
+            <version>1.1.4c</version>
+        </dependency>
+
+        <!--<dependency>-->
+            <!--<groupId>org.apache.velocity</groupId>-->
+            <!--<artifactId>velocity-engine-core</artifactId>-->
+            <!--<version>2.0</version>-->
+        <!--</dependency>-->
+        <!-- https://mvnrepository.com/artifact/org.apache.velocity/velocity -->
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity</artifactId>
+            <version>1.7</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-tools</artifactId>
+            <version>2.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.uuid</groupId>
+            <artifactId>java-uuid-generator</artifactId>
+            <version>3.1.3</version>
+        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>com.baidu</groupId>-->
+            <!--<artifactId>ueditor</artifactId>-->
+            <!--<version>1.1.2</version>-->
+            <!--<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/ueditor-1.1.2.jar</systemPath>-->
+        <!--</dependency>-->
+
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-api</artifactId>
+            <version>0.10.1</version>
+        </dependency>
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-impl</artifactId>
+            <version>0.10.1</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-jackson</artifactId>
+            <version>0.10.1</version>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+
+</project>

+ 10 - 0
runConfigurations/Install_Dependencies.xml

@@ -0,0 +1,10 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="Install Dependencies" type="js.build_tools.npm" factoryName="npm">
+    <package-json value="$PROJECT_DIR$/src/main/vue/package.json" />
+    <command value="install" />
+    <arguments value="-verbose" />
+    <node-interpreter value="project" />
+    <envs />
+    <method />
+  </configuration>
+</component>

+ 75 - 0
runConfigurations/Tomcat.xml

@@ -0,0 +1,75 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="Tomcat" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat 8.5.30" ALTERNATIVE_JRE_ENABLED="false">
+    <option name="OPEN_IN_BROWSER" value="false" />
+    <option name="UPDATE_ON_FRAME_DEACTIVATION" value="true" />
+    <option name="UPDATING_POLICY" value="redeploy-artifacts" />
+    <deployment>
+      <artifact name="awesome-admin:war exploded">
+        <settings>
+          <option name="CONTEXT_PATH" value="/" />
+        </settings>
+      </artifact>
+    </deployment>
+    <server-settings>
+      <option name="BASE_DIRECTORY_NAME" value="Unnamed_awesome-admin" />
+    </server-settings>
+    <predefined_log_file id="Tomcat" enabled="true" />
+    <predefined_log_file id="Tomcat Catalina" enabled="true" />
+    <predefined_log_file id="Tomcat Manager" enabled="false" />
+    <predefined_log_file id="Tomcat Host Manager" enabled="false" />
+    <predefined_log_file id="Tomcat Localhost Access" enabled="false" />
+    <RunnerSettings RunnerId="Debug">
+      <option name="DEBUG_PORT" value="51593" />
+    </RunnerSettings>
+    <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover">
+      <option name="USE_ENV_VARIABLES" value="true" />
+      <STARTUP>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </STARTUP>
+      <SHUTDOWN>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </SHUTDOWN>
+    </ConfigurationWrapper>
+    <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug">
+      <option name="USE_ENV_VARIABLES" value="true" />
+      <STARTUP>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </STARTUP>
+      <SHUTDOWN>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </SHUTDOWN>
+    </ConfigurationWrapper>
+    <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run">
+      <option name="USE_ENV_VARIABLES" value="true" />
+      <STARTUP>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </STARTUP>
+      <SHUTDOWN>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </SHUTDOWN>
+    </ConfigurationWrapper>
+    <method>
+      <option name="BuildArtifacts" enabled="true">
+        <artifact name="awesome-admin:war exploded" />
+      </option>
+    </method>
+  </configuration>
+</component>

+ 12 - 0
runConfigurations/Vue_Build.xml

@@ -0,0 +1,12 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="Vue Build" type="js.build_tools.npm" factoryName="npm">
+    <package-json value="$PROJECT_DIR$/src/main/vue/package.json" />
+    <command value="run" />
+    <scripts>
+      <script value="build" />
+    </scripts>
+    <node-interpreter value="project" />
+    <envs />
+    <method />
+  </configuration>
+</component>

+ 12 - 0
runConfigurations/Vue_Server.xml

@@ -0,0 +1,12 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="Vue Server" type="js.build_tools.npm" factoryName="npm">
+    <package-json value="$PROJECT_DIR$/src/main/vue/package.json" />
+    <command value="run" />
+    <scripts>
+      <script value="dev" />
+    </scripts>
+    <node-interpreter value="project" />
+    <envs />
+    <method />
+  </configuration>
+</component>

+ 70 - 0
src/main/java/com/izouma/awesomeadmin/activiti/CustomAuthenticationProvider.java

@@ -0,0 +1,70 @@
+package com.izouma.awesomeadmin.activiti;
+
+import com.izouma.awesomeadmin.model.UserInfo;
+import org.activiti.engine.IdentityService;
+import org.activiti.engine.identity.Group;
+import org.apache.shiro.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authentication.AuthenticationProvider;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+public class CustomAuthenticationProvider implements AuthenticationProvider {
+    @Autowired
+    private IdentityService identityService;
+
+    public CustomAuthenticationProvider() {
+    }
+
+    public Authentication authenticate(Authentication authentication) throws AuthenticationException {
+        String name = authentication.getName();
+        String password = authentication.getCredentials().toString();
+        boolean authenticated = this.identityService.checkPassword(name, password);
+
+        UserInfo userInfo = null;
+        try {
+            userInfo = (UserInfo) SecurityUtils.getSubject().getPrincipal();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (userInfo == null) {
+
+        }
+
+        if (userInfo == null) {
+            throw new BadCredentialsException("Authentication failed for this username and password");
+        } else {
+            this.identityService.setAuthenticatedUserId(userInfo.getId().toString());
+        }
+
+
+        if (!authenticated) {
+            throw new BadCredentialsException("Authentication failed for this username and password");
+        } else {
+            List<Group> groups = this.identityService.createGroupQuery().groupMember(name).list();
+            Collection<GrantedAuthority> grantedAuthorities = new ArrayList();
+            Iterator var7 = groups.iterator();
+
+            while (var7.hasNext()) {
+                Group group = (Group) var7.next();
+                grantedAuthorities.add(new SimpleGrantedAuthority(group.getId()));
+            }
+
+            this.identityService.setAuthenticatedUserId(name);
+            return new UsernamePasswordAuthenticationToken(name, password, grantedAuthorities);
+        }
+    }
+
+    public boolean supports(Class<?> authentication) {
+        return authentication.equals(UsernamePasswordAuthenticationToken.class);
+    }
+}

+ 31 - 0
src/main/java/com/izouma/awesomeadmin/activiti/CustomGroupEntityManager.java

@@ -0,0 +1,31 @@
+package com.izouma.awesomeadmin.activiti;
+
+import com.izouma.awesomeadmin.model.SysRole;
+import com.izouma.awesomeadmin.model.UserInfo;
+import com.izouma.awesomeadmin.service.SysRoleService;
+import com.izouma.awesomeadmin.service.UserInfoService;
+import org.activiti.engine.identity.Group;
+import org.activiti.engine.impl.persistence.entity.GroupEntity;
+import org.activiti.engine.impl.persistence.entity.GroupEntityManager;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CustomGroupEntityManager extends GroupEntityManager {
+    @Autowired
+    private SysRoleService  sysRoleService;
+
+    @Override
+    public List<Group> findGroupsByUser(String userId) {
+        List<Group> groupList = new ArrayList<>();
+        for (SysRole sysRole : sysRoleService.getUserRoles(Integer.valueOf(userId))) {
+            Group group = new GroupEntity();
+            group.setId(sysRole.getId().toString());
+            group.setName(sysRole.getName());
+            group.setType("assignment");
+            groupList.add(group);
+        }
+        return groupList;
+    }
+}

+ 24 - 0
src/main/java/com/izouma/awesomeadmin/activiti/CustomGroupEntityManagerFactory.java

@@ -0,0 +1,24 @@
+package com.izouma.awesomeadmin.activiti;
+
+import org.activiti.engine.impl.interceptor.Session;
+import org.activiti.engine.impl.interceptor.SessionFactory;
+import org.activiti.engine.impl.persistence.entity.GroupIdentityManager;
+
+public class CustomGroupEntityManagerFactory implements SessionFactory {
+
+    private CustomGroupEntityManager customGroupEntityManager;
+
+    @Override
+    public Class<?> getSessionType() {
+        return GroupIdentityManager.class;
+    }
+
+    @Override
+    public Session openSession() {
+        return customGroupEntityManager;
+    }
+
+    public void setCustomGroupEntityManager(CustomGroupEntityManager customGroupEntityManager) {
+        this.customGroupEntityManager = customGroupEntityManager;
+    }
+}

+ 48 - 0
src/main/java/com/izouma/awesomeadmin/activiti/CustomUserEntityManager.java

@@ -0,0 +1,48 @@
+package com.izouma.awesomeadmin.activiti;
+
+import com.izouma.awesomeadmin.model.SysRole;
+import com.izouma.awesomeadmin.model.UserInfo;
+import com.izouma.awesomeadmin.service.SysRoleService;
+import com.izouma.awesomeadmin.service.UserInfoService;
+import org.activiti.engine.identity.Group;
+import org.activiti.engine.identity.User;
+import org.activiti.engine.impl.persistence.entity.GroupEntity;
+import org.activiti.engine.impl.persistence.entity.UserEntity;
+import org.activiti.engine.impl.persistence.entity.UserEntityManager;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CustomUserEntityManager extends UserEntityManager {
+
+    @Autowired
+    private UserInfoService userInfoService;
+    @Autowired
+    private SysRoleService sysRoleService;
+
+    @Override
+    public User findUserById(String userId) {
+        UserInfo userInfo = userInfoService.getUserInfoById(userId);
+        if (userInfo != null) {
+            User user = new UserEntity();
+            user.setId(userInfo.getId().toString());
+            user.setFirstName(userInfo.getUsername());
+            user.setLastName(userInfo.getNickname());
+        }
+        return null;
+    }
+
+    @Override
+    public List<Group> findGroupsByUser(String userId) {
+        List<Group> groupList = new ArrayList<>();
+        for (SysRole sysRole : sysRoleService.getUserRoles(Integer.valueOf(userId))) {
+            Group group = new GroupEntity();
+            group.setId(sysRole.getId().toString());
+            group.setName(sysRole.getName());
+            group.setType("assignment");
+            groupList.add(group);
+        }
+        return groupList;
+    }
+}

+ 23 - 0
src/main/java/com/izouma/awesomeadmin/activiti/CustomUserEntityManagerFactory.java

@@ -0,0 +1,23 @@
+package com.izouma.awesomeadmin.activiti;
+
+import org.activiti.engine.impl.interceptor.Session;
+import org.activiti.engine.impl.interceptor.SessionFactory;
+import org.activiti.engine.impl.persistence.entity.UserIdentityManager;
+
+public class CustomUserEntityManagerFactory implements SessionFactory {
+    private CustomUserEntityManager customUserEntityManager;
+
+    @Override
+    public Class<?> getSessionType() {
+        return UserIdentityManager.class;
+    }
+
+    @Override
+    public Session openSession() {
+        return customUserEntityManager;
+    }
+
+    public void setCustomUserEntityManager(CustomUserEntityManager customUserEntityManager) {
+        this.customUserEntityManager = customUserEntityManager;
+    }
+}

+ 45 - 0
src/main/java/com/izouma/awesomeadmin/activiti/RestFilter.java

@@ -0,0 +1,45 @@
+package com.izouma.awesomeadmin.activiti;
+
+import com.izouma.awesomeadmin.model.UserInfo;
+import org.activiti.engine.IdentityService;
+import org.apache.shiro.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContext;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+import org.springframework.web.filter.GenericFilterBean;
+
+import javax.servlet.*;
+import javax.servlet.annotation.WebFilter;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@WebFilter
+public class RestFilter extends GenericFilterBean {
+
+    @Override
+    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
+        try {
+            UserInfo userInfo = (UserInfo) SecurityUtils.getSubject().getPrincipal();
+            ServletContext context = servletRequest.getServletContext();
+            ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context);
+            IdentityService identityService = ctx.getBean(IdentityService.class);
+            identityService.setAuthenticatedUserId(userInfo.getId().toString());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        try {
+            HttpServletRequest request = (HttpServletRequest) servletRequest;
+            HttpServletResponse response = (HttpServletResponse) servletResponse;
+            response.addHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
+            response.addHeader("Access-Control-Allow-Methods", "*");
+            response.addHeader("Access-Control-Max-Age", "100");
+            response.addHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
+            response.addHeader("Access-Control-Allow-Credentials", "true");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        filterChain.doFilter(servletRequest, servletResponse);
+    }
+}

+ 153 - 0
src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java

@@ -0,0 +1,153 @@
+package com.izouma.awesomeadmin.constant;
+
+/**
+ * 
+ * <p>
+ * app常量
+ * </p>
+ */
+public interface AppConstant {
+
+
+
+    /**
+     * 商户号
+     */
+    String MCH_ID              = "1379284802";
+
+    /**
+     * 子商户号
+     */
+    String SUB_MCH_ID          = "";
+
+    /**
+     * 商户密钥
+     */
+    String MCH_SECRET          = "R4q0yoo5GXh9A3CDiKJ6v7hgiE0aT0rM";
+
+    /**
+     * 货币类型
+     */
+    String FEE_TYPE            = "CNY";
+
+    /**
+     *交易类型 
+     */
+    String TRADE_TYPE          = "JSAPI";
+
+    /**
+     * 设备号 PC网页或公众号内支付请传"WEB"
+     */
+    String DEVICE_INFO         = "WEB";
+
+    /**
+     * 标题
+     */
+    String BODY                = "工蜂家服产品";
+
+    /**
+     * 标题
+     */
+    String BODY_RECHARGE       = "工蜂家服充值";
+
+    /**
+     * 通知地址
+     */
+    String NOTIFY_URL          = "http://www.gfjiafu.com/wxpay/notify";
+
+    /**
+     * 通知地址
+     */
+    String GXNOTIFY_URL        = "http://www.gfjiafu.com/GXwxpay/notify";
+
+    /**
+     * 通知地址
+     */
+    String NOTIFY_URL_RECHARGE = "http://www.gfjiafu.com/wxpay/notifyRecharge";
+
+    /**
+     * 商户名称
+     */
+    String SEND_NAME           = "工蜂家服";
+
+    String PAGE                = "page";
+
+    public interface InergralUpdateType {
+
+        /**
+         * 产品抵扣
+         */
+        Integer DISCOUNT = 0;
+
+        /**
+         * 任务
+         */
+        Integer TASK     = 1;
+
+        /**
+         * 充值
+         */
+        Integer RECHARGE = 2;
+    }
+
+    public interface OrderStatus {
+
+        /**
+         * 待付款
+         */
+        Integer NO_PAY  = 0;
+
+        /**
+         * 待平台确认
+         */
+        Integer PYY     = 1;
+
+        /**
+         * 预约成功
+         */
+        Integer CONFIRM = 2;
+
+        /**
+         * 人员派送中
+         */
+        Integer ASSIGN  = 3;
+
+        /**
+         * 已完成
+         */
+        Integer FINISH  = 4;
+
+        /**
+         * 退款中
+         */
+        Integer REFUND  = 5;
+
+        /**
+         * 已经取消
+         */
+        Integer CANCEL  = 6;
+
+    }
+
+    public interface template {
+
+        /**
+         * 咨询回复消息提醒 
+         */
+        String reply        = "B7pRn_aPMKJT41Q498Okw5ZPsFtjE5NW_vNO6l6K2hw";
+
+        /**
+         * 用户咨询提醒 
+         */
+        String consultation = "SOLot-tJ5XMziyrM8xrXwS4q1meGI8z7SL8_OklnigE";
+
+        /**
+         * 入驻
+         */
+        String settled      = "HJtFE3VjxVaP0vw0-k4rtn7LdN7xcPbwygLgvZbH6R8";
+    }
+
+    String weixinurl                = "http://i.izouma.cn/wx/auth";
+
+    String weixinurlRedirectUriFlag = "_redirectUri_";
+}

+ 36 - 0
src/main/java/com/izouma/awesomeadmin/constant/RongConstant.java

@@ -0,0 +1,36 @@
+package com.izouma.awesomeadmin.constant;
+
+/**
+ * 
+ * <p>
+ * 融云常量
+ * </p>
+ */
+public interface RongConstant {
+
+    /**
+     * 验证码模板
+     */
+    String VERIFY_TEMPLATEID = "fMsDXJ0Y4pCbrtN4a66JGx";
+
+    /**
+     * 通知模板
+     */
+    String NOTIFY_TEMPLATEID = "a6ZrRkr3AKqaDMizqPhFEi";
+
+    /**
+     * 提交订单
+     */
+    String TI_JIAO_DIN_DAN   = "0Q3R5Enjk_58Ycq-XEqAQt";
+
+    /**
+     * 派送订单
+     */
+    String PAI_SONG_DIN_DAN  = "e5daKayLkqi8WJnckJguke";
+
+    /**
+     * 通用
+     */
+    String COMMON_TEMPLATEID = "e8kzeKB5Ahx9Vnm7tPESn3";
+
+}

+ 17 - 0
src/main/java/com/izouma/awesomeadmin/container/DateConverter.java

@@ -0,0 +1,17 @@
+package com.izouma.awesomeadmin.container;
+
+import org.springframework.core.convert.converter.Converter;
+
+import java.util.Date;
+
+public class DateConverter implements Converter<String, Date> {
+    @Override
+    public Date convert(String source) {
+        try {
+            return new Date(Long.valueOf(source));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+}

+ 26 - 0
src/main/java/com/izouma/awesomeadmin/container/Lifecycle.java

@@ -0,0 +1,26 @@
+package com.izouma.awesomeadmin.container;
+
+/**
+ * 启动项,可在容器启动时加载
+ * @author Administrator
+ *
+ */
+public interface Lifecycle {
+	/**
+	 * 启动初始化
+	 * @return
+	 */
+	boolean init();
+	
+	/**
+	 * 启动项信息
+	 * @return
+	 */
+	String getItemInfo();
+	
+	/**
+	 * 关闭
+	 * @return
+	 */
+	boolean close();	
+}

+ 70 - 0
src/main/java/com/izouma/awesomeadmin/container/StartupListener.java

@@ -0,0 +1,70 @@
+package com.izouma.awesomeadmin.container;
+
+import com.izouma.awesomeadmin.util.Const;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 启动监听方法
+ *
+ * @author OnceMad
+ */
+public class StartupListener implements ServletContextListener {
+
+    private static List<Lifecycle> startups = new LinkedList<Lifecycle>();
+
+    static {
+        //startups.add(new PhotoCheckWorker());
+    }
+
+
+    @Override
+    public void contextInitialized(ServletContextEvent sce) {
+
+        System.out.println("==================context Initialized=====================");
+
+        for (Lifecycle lifecycle : startups) {
+            System.out.print(lifecycle.getItemInfo() + " is start ");
+            if (lifecycle.init()) {
+                System.out.println(" successfully.");
+            } else {
+                System.out.println(" fail.");
+            }
+        }
+
+        initConst();
+
+
+        System.out.println("============context Initialized successfully===============");
+    }
+
+
+    @Override
+    public void contextDestroyed(ServletContextEvent sce) {
+
+        System.out.println("==================context Destroyed=====================");
+
+        for (Lifecycle lifecycle : startups) {
+            System.out.print(lifecycle.getItemInfo() + " is close ");
+            if (lifecycle.close()) {
+                System.out.println(" successfully.");
+            } else {
+                System.out.println(" fail.");
+            }
+        }
+
+    }
+
+
+    private void initConst() {
+
+        Const con = new Const();
+        con.initData();
+        System.out.println("============init const successfully===============");
+    }
+
+
+}

+ 29 - 0
src/main/java/com/izouma/awesomeadmin/dao/AccessTokenMapper.java

@@ -0,0 +1,29 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.Map;
+
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.AccessToken;
+
+@Repository("com.izouma.awesomeadmin.dao.AccessTokenMapper")
+public interface AccessTokenMapper {
+
+    /**
+     * 
+     * <p>获取最新的accessToken。</p>
+     *
+     * @return
+     */
+    AccessToken getAccessToken();
+
+
+    /**
+     * 
+     * <p>插入新的accessToken。</p>
+     *
+     * @param parameter
+     * @return
+     */
+    int updateAccessToken(Map <String, Object> parameter);
+}

+ 21 - 0
src/main/java/com/izouma/awesomeadmin/dao/AccessTokenMapper.xml

@@ -0,0 +1,21 @@
+<?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.izouma.awesomeadmin.dao.AccessTokenMapper">
+	<!-- 目的:为 Dao接口方法提供sql语句配置 -->
+	<select id="getAccessToken" resultType="com.izouma.awesomeadmin.model.AccessToken" >
+		SELECT
+			*
+		FROM
+			sys_access_token
+		ORDER BY
+			time_stamp DESC
+		LIMIT 1
+	</select>
+	
+	<insert id="updateAccessToken" parameterType="map">
+	    INSERT INTO sys_access_token (access_token, time_stamp)
+		VALUES (#{accessToken}, #{timeStamp})
+  	</insert>
+
+</mapper>

+ 27 - 0
src/main/java/com/izouma/awesomeadmin/dao/CommonQueryMapper.java

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.datasource.DataSource;
+import com.izouma.awesomeadmin.model.CommonQuery;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+@DataSource("dataSource")
+@Repository("com.izouma.awesomeadmin.dao.CommonQueryMapper")
+public interface CommonQueryMapper {
+
+
+    List<Map> getTableListByPage(Map<String, Object> parameter);
+
+    List<Map> getTableListAll(CommonQuery record);
+
+    Map selectByPrimaryKey(CommonQuery record);
+
+
+    int insertSelective(Map<String, Object> parameter);
+
+    int updateByPrimaryKeySelective(Map<String, Object> parameter);
+
+    int delete(CommonQuery record);
+}

+ 189 - 0
src/main/java/com/izouma/awesomeadmin/dao/CommonQueryMapper.xml

@@ -0,0 +1,189 @@
+<?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.izouma.awesomeadmin.dao.CommonQueryMapper">
+
+
+    <select id="getTableListByPage" resultType="java.util.Map">
+
+        SELECT * FROM ${record.tableName}
+        <where>
+            and (del_flag = 'N' or del_flag = '0')
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <foreach item="item" index="index" collection="record.searchColumn.split('_,')">
+                        OR ${item} LIKE concat('%',#{record.searchKey},'%')
+                    </foreach>
+                </trim>
+            </if>
+
+
+        </where>
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+            order by
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+
+        </if>
+
+    </select>
+
+    <select id="getTableListAll" resultType="java.util.Map">
+
+        SELECT * FROM ${tableName}
+        <where>
+            and (del_flag = 'N' or del_flag = '0')
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <foreach item="item" index="index" collection="searchColumn.split('_,')">
+                        OR ${item} LIKE concat('%',#{searchKey},'%')
+                    </foreach>
+                </trim>
+            </if>
+
+        </where>
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+            order by
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+
+        </if>
+
+    </select>
+
+
+    <select id="selectByPrimaryKey" resultType="java.util.Map" parameterType="java.util.Map">
+        select
+        *
+        from ${tableName}
+        where id = #{primaryKey,jdbcType=INTEGER}
+    </select>
+
+    <insert id="insertSelective" parameterType="java.util.Map" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into ${tableName}
+
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    ${item},
+                </if>
+            </foreach>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    #{formData[${item}]},
+                </if>
+            </foreach>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="java.util.Map">
+        update ${tableName}
+        <set>
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    ${item} = #{formData[${item}]},
+                </if>
+            </foreach>
+
+        </set>
+        where id = #{primaryKey,jdbcType=INTEGER}
+    </update>
+
+    <update id="delete">
+        UPDATE ${tableName} SET del_flag = 'Y'
+        <where>
+            AND id = #{primaryKey}
+        </where>
+    </update>
+</mapper>

+ 27 - 0
src/main/java/com/izouma/awesomeadmin/dao/CommonQuerySqlServerMapper.java

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.datasource.DataSource;
+import com.izouma.awesomeadmin.model.CommonQuery;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+@DataSource("dataSource")
+@Repository("com.izouma.awesomeadmin.dao.CommonQuerySqlServerMapper")
+public interface CommonQuerySqlServerMapper {
+
+    List<Map> getTableListByPage(Map<String, Object> parameter);
+
+    List<Map> getTableListAll(CommonQuery record);
+
+    Map selectByPrimaryKey(CommonQuery record);
+
+
+    int insertSelective(Map<String, Object> parameter);
+
+    int updateByPrimaryKeySelective(Map<String, Object> parameter);
+
+
+    int delete(CommonQuery record);
+}

+ 182 - 0
src/main/java/com/izouma/awesomeadmin/dao/CommonQuerySqlServerMapper.xml

@@ -0,0 +1,182 @@
+<?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.izouma.awesomeadmin.dao.CommonQuerySqlServerMapper">
+
+
+    <select id="getTableListByPage" resultType="java.util.Map">
+
+        SELECT * FROM ${record.tableName}
+        <where>
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <foreach item="item" index="index" collection="record.searchColumn.split('_,')">
+                        OR ${item} LIKE concat('%',#{record.searchKey},'%')
+                    </foreach>
+                </trim>
+            </if>
+
+        </where>
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+            order by
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+
+        </if>
+
+    </select>
+
+    <select id="getTableListAll" resultType="java.util.Map">
+
+        SELECT * FROM ${tableName}
+        <where>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <foreach item="item" index="index" collection="searchColumn.split('_,')">
+                        OR ${item} LIKE concat('%',#{searchKey},'%')
+                    </foreach>
+                </trim>
+            </if>
+
+        </where>
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+            order by
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+
+        </if>
+
+    </select>
+
+    <select id="selectByPrimaryKey" resultType="java.util.Map" parameterType="java.util.Map">
+        select
+        *
+        from ${tableName}
+        where id = #{primaryKey,jdbcType=INTEGER}
+    </select>
+
+    <insert id="insertSelective" parameterType="java.util.Map" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into ${tableName}
+
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    ${item},
+                </if>
+            </foreach>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    #{formData[${item}]},
+                </if>
+            </foreach>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="java.util.Map">
+        update ${tableName}
+        <set>
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    ${item} = #{formData[${item}]},
+                </if>
+            </foreach>
+
+        </set>
+        where id = #{primaryKey,jdbcType=INTEGER}
+    </update>
+
+    <delete id="delete">
+        delete from ${tableName}
+        where id = #{primaryKey,jdbcType=INTEGER}
+    </delete>
+</mapper>

+ 31 - 0
src/main/java/com/izouma/awesomeadmin/dao/DataMapper.java

@@ -0,0 +1,31 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.datasource.DataSource;
+import com.izouma.awesomeadmin.model.SqlServerTest;
+import com.izouma.awesomeadmin.model.SuperUser;
+import com.izouma.awesomeadmin.model.Zouma;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+@DataSource("dataSource")
+@Repository("com.izouma.awesomeadmin.dao.DataMapper")
+public interface DataMapper {
+
+    /**
+     * <p>获取用户列表。</p>
+     *
+     * @return TblUser list
+     */
+    // 不指定,则默认使用数据源1
+    List<SuperUser> queryAllUsers();
+
+    // 覆盖类上指定的,使用数据源2
+    @DataSource("dataSourceSlaver")
+    List<Zouma> queryZouma();
+
+    // 覆盖类上指定的,使用数据源2
+    @DataSource("dataSourceSqlserver")
+    List<SqlServerTest> getSqlServerTestByPage(Map<String, Object> parameter);
+}

+ 35 - 0
src/main/java/com/izouma/awesomeadmin/dao/DataMapper.xml

@@ -0,0 +1,35 @@
+<?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.izouma.awesomeadmin.dao.DataMapper">
+    <sql id="columns">
+        user_id, power, password, user_name, profile, del_flag
+  	</sql>
+
+    <select id="queryAllUsers" resultType="com.izouma.awesomeadmin.model.SuperUser">
+        SELECT
+        <include refid="columns"/>
+        FROM super_user
+        where del_flag = 'N'
+        order by user_id
+        <!-- 为了测试只取100个 -->
+        <!-- LIMIT 100  -->
+    </select>
+
+
+    <select id="queryZouma" resultType="com.izouma.awesomeadmin.model.Zouma">
+        SELECT
+        *
+        FROM zouma
+        where del_flag = 0
+        order by id
+        <!-- 为了测试只取100个 -->
+        <!-- LIMIT 100  -->
+    </select>
+
+    <select id="getSqlServerTestByPage" resultType="com.izouma.awesomeadmin.model.SqlServerTest">
+        SELECT * FROM T_SYS_Depts where  id > 2  ORDER BY id
+
+    </select>
+
+</mapper>

+ 36 - 0
src/main/java/com/izouma/awesomeadmin/dao/DataSourceInfoMapper.java

@@ -0,0 +1,36 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.DataSourceInfo;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Dao接口
+ */
+@Component
+@Repository("com.zoumaframe.dao.DataSourceInfoMapper")
+public interface DataSourceInfoMapper {
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(DataSourceInfo record);
+
+    DataSourceInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(DataSourceInfo record);
+
+    List<DataSourceInfo> queryAllDataSourceInfo(DataSourceInfo record);
+
+    List<DataSourceInfo> queryDataSourceInfoByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    DataSourceInfo queryDataSourceInfo(DataSourceInfo record);
+
+    List<DataSourceInfo> query(DataSourceInfo record);
+}
+

+ 327 - 0
src/main/java/com/izouma/awesomeadmin/dao/DataSourceInfoMapper.xml

@@ -0,0 +1,327 @@
+<?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.izouma.awesomeadmin.dao.DataSourceInfoMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.DataSourceInfo" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="code" property="code" jdbcType="VARCHAR" />
+                                <result column="database_type" property="databaseType" jdbcType="VARCHAR" />
+                                <result column="url" property="url" jdbcType="VARCHAR" />
+                                <result column="username" property="username" jdbcType="VARCHAR" />
+                                <result column="password" property="password" jdbcType="VARCHAR" />
+                                <result column="database_name" property="databaseName" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            code,
+
+            database_type,
+
+            url,
+
+            username,
+
+            password,
+
+            database_name,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from sys_data_source_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from sys_data_source_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.DataSourceInfo" useGeneratedKeys="true" keyProperty="id">
+        insert into sys_data_source_info
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="code!= null" >
+                code,
+            </if>
+                <if test="databaseType!= null" >
+                database_type,
+            </if>
+                <if test="url!= null" >
+                url,
+            </if>
+                <if test="username!= null" >
+                username,
+            </if>
+                <if test="password!= null" >
+                password,
+            </if>
+                <if test="databaseName!= null" >
+                database_name,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="code != null" >
+                #{code,jdbcType=VARCHAR},
+            </if>
+                    <if test="databaseType != null" >
+                #{databaseType,jdbcType=VARCHAR},
+            </if>
+                    <if test="url != null" >
+                #{url,jdbcType=VARCHAR},
+            </if>
+                    <if test="username != null" >
+                #{username,jdbcType=VARCHAR},
+            </if>
+                    <if test="password != null" >
+                #{password,jdbcType=VARCHAR},
+            </if>
+                    <if test="databaseName != null" >
+                #{databaseName,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.DataSourceInfo" >
+        update sys_data_source_info
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="code != null" >
+               code= #{code,jdbcType=VARCHAR},
+            </if>
+                     <if test="databaseType != null" >
+               database_type= #{databaseType,jdbcType=VARCHAR},
+            </if>
+                     <if test="url != null" >
+               url= #{url,jdbcType=VARCHAR},
+            </if>
+                     <if test="username != null" >
+               username= #{username,jdbcType=VARCHAR},
+            </if>
+                     <if test="password != null" >
+               password= #{password,jdbcType=VARCHAR},
+            </if>
+                     <if test="databaseName != null" >
+               database_name= #{databaseName,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryDataSourceInfoByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
+        select <include refid="Base_Column_List"/> from sys_data_source_info
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.code != null and !&quot;&quot;.equals(record.code)">
+                and  code = #{record.code}
+            </if>
+                     <if test="record.databaseType != null and !&quot;&quot;.equals(record.databaseType)">
+                and  database_type = #{record.databaseType}
+            </if>
+                     <if test="record.url != null and !&quot;&quot;.equals(record.url)">
+                and  url = #{record.url}
+            </if>
+                     <if test="record.username != null and !&quot;&quot;.equals(record.username)">
+                and  username = #{record.username}
+            </if>
+                     <if test="record.password != null and !&quot;&quot;.equals(record.password)">
+                and  password = #{record.password}
+            </if>
+                     <if test="record.databaseName != null and !&quot;&quot;.equals(record.databaseName)">
+                and  database_name = #{record.databaseName}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                OR  code LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  database_type LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  url LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  username LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  password LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  database_name LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllDataSourceInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
+        select <include refid="Base_Column_List"/> from sys_data_source_info
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="code != null and !&quot;&quot;.equals(code)">
+                and  code = #{code}
+            </if>
+                    <if test="databaseType != null and !&quot;&quot;.equals(databaseType)">
+                and  database_type = #{databaseType}
+            </if>
+                    <if test="url != null and !&quot;&quot;.equals(url)">
+                and  url = #{url}
+            </if>
+                    <if test="username != null and !&quot;&quot;.equals(username)">
+                and  username = #{username}
+            </if>
+                    <if test="password != null and !&quot;&quot;.equals(password)">
+                and  password = #{password}
+            </if>
+                    <if test="databaseName != null and !&quot;&quot;.equals(databaseName)">
+                and  database_name = #{databaseName}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                OR  code LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  database_type LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  url LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  username LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  password LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  database_name LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryDataSourceInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
+        select <include refid="Base_Column_List"/> from sys_data_source_info
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="code != null and !&quot;&quot;.equals(code)">
+                and code = #{code}
+            </if>
+                     <if test="databaseType != null and !&quot;&quot;.equals(databaseType)">
+                and database_type = #{databaseType}
+            </if>
+                     <if test="url != null and !&quot;&quot;.equals(url)">
+                and url = #{url}
+            </if>
+                     <if test="username != null and !&quot;&quot;.equals(username)">
+                and username = #{username}
+            </if>
+                     <if test="password != null and !&quot;&quot;.equals(password)">
+                and password = #{password}
+            </if>
+                     <if test="databaseName != null and !&quot;&quot;.equals(databaseName)">
+                and database_name = #{databaseName}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE sys_data_source_info SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
+        select <include refid="Base_Column_List"/> from sys_data_source_info
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                    </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 51 - 0
src/main/java/com/izouma/awesomeadmin/dao/DepartInfoMapper.java

@@ -0,0 +1,51 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import com.izouma.awesomeadmin.model.UserInfo;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.DepartInfo;
+
+/**
+ * depart_info Dao接口
+ * Thu Apr 26 10:56:37 CST 2018  Suo Chen Cheng
+ */
+@Repository("com.izouma.awesomeadmin.dao.DepartInfoMapper")
+public interface DepartInfoMapper {
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(DepartInfo record);
+
+    DepartInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(DepartInfo record);
+
+    List<DepartInfo> queryAllDepartInfo(DepartInfo record);
+
+    List<DepartInfo> queryDepartInfosByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    DepartInfo queryDepartInfo(DepartInfo record);
+
+    List<DepartInfo> findPower(DepartInfo record);
+
+    List<DepartInfo> getParentList(Integer id);
+
+    List<DepartInfo> selectByPrimaryKeys(String ids);
+
+    List<DepartInfo> getUserDeparts(@Param("userId") Integer userId);
+
+    int setUserDeparts(@Param("userId") Integer userId, @Param("departs") List<String> departs);
+
+    int clearUserDeparts(@Param("userId") Integer userId);
+
+    String getUserDepartId(Integer id);
+
+    List<UserInfo> getDepartUsers(Integer departId);
+}
+

+ 341 - 0
src/main/java/com/izouma/awesomeadmin/dao/DepartInfoMapper.xml

@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.izouma.awesomeadmin.dao.DepartInfoMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.DepartInfo" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="depart_name" property="departName" jdbcType="VARCHAR" />
+		<result column="parent_id" property="parentId" jdbcType="INTEGER" />
+		<result column="all_parent_id" property="allParentId" jdbcType="VARCHAR" />
+		<result column="description" property="description" jdbcType="VARCHAR" />
+		<result column="depart_code" property="departCode" jdbcType="VARCHAR" />
+		<result column="org_code" property="orgCode" jdbcType="VARCHAR" />
+		<result column="type" property="type" jdbcType="INTEGER" />
+		<result column="remark" property="remark" jdbcType="VARCHAR" />
+		<result column="sort" property="sort" jdbcType="INTEGER" />
+		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
+		<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+		<result column="permission" property="permission" jdbcType="VARCHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, depart_name, parent_id, all_parent_id, description, depart_code, org_code, type, remark, sort, del_flag, create_time, permission
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_depart
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<select id="selectByPrimaryKeys" resultMap="BaseResultMap" parameterType="java.lang.String" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_depart
+		where FIND_IN_SET(id, #{ids,jdbcType=INTEGER}) and del_flag = 'N'
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from sys_depart
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.DepartInfo" useGeneratedKeys="true" keyProperty="id">
+		insert into sys_depart
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="departName != null" >
+				depart_name,	
+			</if>
+			<if test="parentId != null" >
+				parent_id,	
+			</if>
+			<if test="allParentId != null" >
+				all_parent_id,	
+			</if>
+			<if test="description != null" >
+				description,	
+			</if>
+			<if test="departCode != null" >
+				depart_code,	
+			</if>
+			<if test="orgCode != null" >
+				org_code,	
+			</if>
+			<if test="type != null" >
+				type,	
+			</if>
+			<if test="remark != null" >
+				remark,	
+			</if>
+			<if test="sort != null" >
+				sort,
+			</if>
+			<if test="delFlag != null" >
+				del_flag,	
+			</if>
+			<if test="createTime != null" >
+				create_time,	
+			</if>
+			<if test="permission != null" >
+				permission,	
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="departName != null" >
+				#{departName,jdbcType=VARCHAR},	
+			</if>
+			<if test="parentId != null" >
+				#{parentId,jdbcType=INTEGER},	
+			</if>
+			<if test="allParentId != null" >
+				#{allParentId,jdbcType=VARCHAR},	
+			</if>
+			<if test="description != null" >
+				#{description,jdbcType=VARCHAR},	
+			</if>
+			<if test="departCode != null" >
+				#{departCode,jdbcType=VARCHAR},	
+			</if>
+			<if test="orgCode != null" >
+				#{orgCode,jdbcType=VARCHAR},	
+			</if>
+			<if test="type != null" >
+				#{type,jdbcType=INTEGER},	
+			</if>
+			<if test="remark != null" >
+				#{remark,jdbcType=VARCHAR},	
+			</if>
+			<if test="sort != null" >
+				#{sort,jdbcType=INTEGER},
+			</if>
+			<if test="delFlag != null" >
+				#{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="createTime != null" >
+				#{createTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="permission != null" >
+				#{permission,jdbcType=VARCHAR},	
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.DepartInfo" >
+		UPDATE sys_depart
+		<set >
+			<if test="departName != null" >
+				depart_name = #{departName,jdbcType=VARCHAR},	
+			</if>
+			<if test="parentId != null" >
+				parent_id = #{parentId,jdbcType=INTEGER},	
+			</if>
+			<if test="allParentId != null" >
+				all_parent_id = #{allParentId,jdbcType=VARCHAR},	
+			</if>
+			<if test="description != null" >
+				description = #{description,jdbcType=VARCHAR},	
+			</if>
+			<if test="departCode != null" >
+				depart_code = #{departCode,jdbcType=VARCHAR},	
+			</if>
+			<if test="orgCode != null" >
+				org_code = #{orgCode,jdbcType=VARCHAR},	
+			</if>
+			<if test="type != null" >
+				type = #{type,jdbcType=INTEGER},	
+			</if>
+			<if test="remark != null" >
+				remark = #{remark,jdbcType=VARCHAR},	
+			</if>
+			<if test="sort != null" >
+				sort = #{sort,jdbcType=INTEGER},
+			</if>
+			<if test="delFlag != null" >
+				del_flag = #{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="createTime != null" >
+				create_time = #{createTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="permission != null" >
+				permission = #{permission,jdbcType=VARCHAR},	
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="queryDepartInfosByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DepartInfo">
+		select <include refid="Base_Column_List"/> from sys_depart
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.departName != null and !&quot;&quot;.equals(record.departName)">
+				and depart_name = #{record.departName}	
+			</if>
+			<if test="record.parentId != null and !&quot;&quot;.equals(record.parentId)">
+				and parent_id = #{record.parentId}	
+			</if>
+			<if test="record.allParentId != null and !&quot;&quot;.equals(record.allParentId)">
+				and all_parent_id = #{record.allParentId}	
+			</if>
+			<if test="record.description != null and !&quot;&quot;.equals(record.description)">
+				and description = #{record.description}	
+			</if>
+			<if test="record.departCode != null and !&quot;&quot;.equals(record.departCode)">
+				and depart_code = #{record.departCode}	
+			</if>
+			<if test="record.orgCode != null and !&quot;&quot;.equals(record.orgCode)">
+				and org_code = #{record.orgCode}	
+			</if>
+			<if test="record.type != null and !&quot;&quot;.equals(record.type)">
+				and type = #{record.type}	
+			</if>
+			<if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+				and remark = #{record.remark}	
+			</if>
+			<if test="record.sort != null and !&quot;&quot;.equals(record.sort)">
+				and sort = #{record.sort}
+			</if>
+			<if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+				and del_flag = #{record.delFlag}	
+			</if>
+			<if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+				and create_time = #{record.createTime}	
+			</if>
+			<if test="record.permission != null and !&quot;&quot;.equals(record.permission)">
+				and permission = #{record.permission}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllDepartInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DepartInfo">
+		select <include refid="Base_Column_List"/> from sys_depart
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="departName != null and !&quot;&quot;.equals(departName)">
+				and depart_name = #{departName}	
+			</if>
+			<if test="parentId != null and !&quot;&quot;.equals(parentId)">
+				and parent_id = #{parentId}	
+			</if>
+			<if test="allParentId != null and !&quot;&quot;.equals(allParentId)">
+				and all_parent_id = #{allParentId}	
+			</if>
+			<if test="description != null and !&quot;&quot;.equals(description)">
+				and description = #{description}	
+			</if>
+			<if test="departCode != null and !&quot;&quot;.equals(departCode)">
+				and depart_code = #{departCode}	
+			</if>
+			<if test="orgCode != null and !&quot;&quot;.equals(orgCode)">
+				and org_code = #{orgCode}	
+			</if>
+			<if test="type != null and !&quot;&quot;.equals(type)">
+				and type = #{type}	
+			</if>
+			<if test="remark != null and !&quot;&quot;.equals(remark)">
+				and remark = #{remark}	
+			</if>
+			<if test="sort != null and !&quot;&quot;.equals(sort)">
+				and sort = #{sort}
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="createTime != null and !&quot;&quot;.equals(createTime)">
+				and create_time = #{createTime}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryDepartInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DepartInfo">
+		select <include refid="Base_Column_List"/> from sys_depart
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="departName != null and !&quot;&quot;.equals(departName)">
+				and depart_name = #{departName}	
+			</if>
+			<if test="parentId != null and !&quot;&quot;.equals(parentId)">
+				and parent_id = #{parentId}	
+			</if>
+			<if test="allParentId != null and !&quot;&quot;.equals(allParentId)">
+				and all_parent_id = #{allParentId}	
+			</if>
+			<if test="description != null and !&quot;&quot;.equals(description)">
+				and description = #{description}	
+			</if>
+			<if test="departCode != null and !&quot;&quot;.equals(departCode)">
+				and depart_code = #{departCode}	
+			</if>
+			<if test="orgCode != null and !&quot;&quot;.equals(orgCode)">
+				and org_code = #{orgCode}	
+			</if>
+			<if test="type != null and !&quot;&quot;.equals(type)">
+				and type = #{type}	
+			</if>
+			<if test="remark != null and !&quot;&quot;.equals(remark)">
+				and remark = #{remark}	
+			</if>
+			<if test="sort != null and !&quot;&quot;.equals(sort)">
+				and sort = #{sort}
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="createTime != null and !&quot;&quot;.equals(createTime)">
+				and create_time = #{createTime}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}	
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+    <select id="findPower" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DepartInfo">
+		select * from sys_depart where all_parent_id  LIKE '${allParentId}%'  and id=  #{parentId}
+	</select>
+    <update id="delete">
+		UPDATE sys_depart SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+
+	<select id="getParentList" resultType="departInfo" parameterType="integer">
+	    SELECT * from sys_depart WHERE FIND_IN_SET(id,(SELECT all_parent_id from sys_depart WHERE id  = #{id})) AND del_flag = 'N'
+	</select>
+
+	<select id="getUserDeparts" resultType="com.izouma.awesomeadmin.model.DepartInfo">
+		select
+		<include refid="Base_Column_List" />
+		from sys_depart
+		where id in (select depart_id from sys_user_depart where user_id = #{userId})
+		and del_flag = 'N'
+	</select>
+    <insert id="setUserDeparts">
+		insert into sys_user_depart (user_id, depart_id)
+		values
+		<foreach collection="departs" item="departId" separator=",">
+			(#{userId}, #{departId})
+		</foreach>
+	</insert>
+	<delete id="clearUserDeparts">
+		delete from sys_user_depart where user_id = #{userId}
+	</delete>
+	<select id="getUserDepartId" resultType="java.lang.String">
+		SELECT group_concat(depart_id) FROM sys_user_depart WHERE user_id = #{id}
+	</select>
+	<select id="getDepartUsers" resultType="com.izouma.awesomeadmin.model.UserInfo">
+		select * from sys_user where id in (select user_id from sys_user_depart where depart_id = #{departId}) and del_flag = 'N'
+	</select>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/GenCodeMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.GenCode;
+
+/**
+ * gen_code_model Dao接口
+ * Fri May 04 15:57:06 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.izouma.awesomeadmin.dao.GenCodeModelMapper")
+public interface GenCodeMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(GenCode record);
+
+	GenCode selectByPrimaryKey(Integer id);
+
+	int updateByPrimaryKeySelective(GenCode record);
+
+	List <GenCode> queryAllGenCode(GenCode record);
+
+	List <GenCode> queryGenCodeByPage(Map <String, Object> parameter);
+
+	int delete(String id);
+
+	GenCode queryGenCode(GenCode record);
+}
+

+ 265 - 0
src/main/java/com/izouma/awesomeadmin/dao/GenCodeMapper.xml

@@ -0,0 +1,265 @@
+<?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.izouma.awesomeadmin.dao.GenCodeMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.GenCode">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="tableName" property="tableName" jdbcType="VARCHAR"/>
+        <result column="className" property="className" jdbcType="VARCHAR"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <result column="genTable" property="genTable" jdbcType="BIT"/>
+        <result column="genClass" property="genClass" jdbcType="BIT"/>
+        <result column="genList" property="genList" jdbcType="BIT"/>
+        <result column="genForm" property="genForm" jdbcType="BIT"/>
+        <result column="field_id" property="fieldId" jdbcType="VARCHAR"/>
+        <result column="gen_json" property="genJson" jdbcType="VARCHAR"/>
+        <result column="del_flag" property="delFlag" jdbcType="VARCHAR"/>
+        <result column="type_flag" property="typeFlag" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+		 id, tableName, className, remark, genTable, genClass,
+		 genList, genForm, field_id, gen_json, del_flag, type_flag
+	</sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_gen_code
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+		delete from sys_gen_code
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.GenCode" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_gen_code
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                id,
+            </if>
+            <if test="tableName != null">
+                tableName,
+            </if>
+            <if test="className != null">
+                className,
+            </if>
+            <if test="remark != null">
+                remark,
+            </if>
+            <if test="genTable != null">
+                genTable,
+            </if>
+            <if test="genClass != null">
+                genClass,
+            </if>
+            <if test="genList != null">
+                genList,
+            </if>
+            <if test="genForm != null">
+                genForm,
+            </if>
+            <if test="fieldId != null">
+                field_id,
+            </if>
+            <if test="genJson != null">
+                gen_json,
+            </if>
+            <if test="typeFlag != null">
+                type_flag,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="tableName != null">
+                #{tableName,jdbcType=VARCHAR},
+            </if>
+            <if test="className != null">
+                #{className,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="genTable != null">
+                #{genTable,jdbcType=BIT},
+            </if>
+            <if test="genClass != null">
+                #{genClass,jdbcType=BIT},
+            </if>
+            <if test="genList != null">
+                #{genList,jdbcType=BIT},
+            </if>
+            <if test="genForm != null">
+                #{genForm,jdbcType=BIT},
+            </if>
+            <if test="fieldId != null">
+                #{fieldId,jdbcType=VARCHAR},
+            </if>
+            <if test="genJson != null">
+                #{genJson,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.GenCode">
+        update sys_gen_code
+        <set>
+            <if test="tableName != null">
+                tableName = #{tableName,jdbcType=VARCHAR},
+            </if>
+            <if test="className != null">
+                className = #{className,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                remark = #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="genTable != null">
+                genTable = #{genTable,jdbcType=BIT},
+            </if>
+            <if test="genClass != null">
+                genClass = #{genClass,jdbcType=BIT},
+            </if>
+            <if test="genList != null">
+                genList = #{genList,jdbcType=BIT},
+            </if>
+            <if test="genForm != null">
+                genForm = #{genForm,jdbcType=BIT},
+            </if>
+            <if test="fieldId != null">
+                field_id = #{fieldId,jdbcType=VARCHAR},
+            </if>
+            <if test="genJson != null">
+                gen_json = #{genJson,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                type_flag = #{typeFlag,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryGenCodeByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenCode">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_gen_code
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.tableName != null and !&quot;&quot;.equals(record.tableName)">
+                and tableName = #{record.tableName}
+            </if>
+            <if test="record.className != null and !&quot;&quot;.equals(record.className)">
+                and className = #{record.className}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and remark = #{record.remark}
+            </if>
+            <if test="record.genTable != null and !&quot;&quot;.equals(record.genTable)">
+                and genTable = #{record.genTable}
+            </if>
+            <if test="record.genClass != null and !&quot;&quot;.equals(record.genClass)">
+                and genClass = #{record.genClass}
+            </if>
+            <if test="record.genList != null and !&quot;&quot;.equals(record.genList)">
+                and genList = #{record.genList}
+            </if>
+            <if test="record.genForm != null and !&quot;&quot;.equals(record.genForm)">
+                and genForm = #{record.genForm}
+            </if>
+            <if test="record.fieldId != null and !&quot;&quot;.equals(record.fieldId)">
+                and field_id = #{record.fieldId}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR tableName LIKE concat('%',#{record.searchKey},'%')
+                    OR className LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllGenCode" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenCode">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_gen_code
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="tableName != null and !&quot;&quot;.equals(tableName)">
+                and tableName = #{tableName}
+            </if>
+            <if test="className != null and !&quot;&quot;.equals(className)">
+                and className = #{className}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="genTable != null and !&quot;&quot;.equals(genTable)">
+                and genTable = #{genTable}
+            </if>
+            <if test="genClass != null and !&quot;&quot;.equals(genClass)">
+                and genClass = #{genClass}
+            </if>
+            <if test="genList != null and !&quot;&quot;.equals(genList)">
+                and genList = #{genList}
+            </if>
+            <if test="genForm != null and !&quot;&quot;.equals(genForm)">
+                and genForm = #{genForm}
+            </if>
+            <if test="fieldId != null and !&quot;&quot;.equals(fieldId)">
+                and field_id = #{fieldId}
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryGenCode" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenCode">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_gen_code
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="tableName != null and !&quot;&quot;.equals(tableName)">
+                and tableName = #{tableName}
+            </if>
+            <if test="className != null and !&quot;&quot;.equals(className)">
+                and className = #{className}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="genTable != null and !&quot;&quot;.equals(genTable)">
+                and genTable = #{genTable}
+            </if>
+            <if test="genClass != null and !&quot;&quot;.equals(genClass)">
+                and genClass = #{genClass}
+            </if>
+            <if test="genList != null and !&quot;&quot;.equals(genList)">
+                and genList = #{genList}
+            </if>
+            <if test="genForm != null and !&quot;&quot;.equals(genForm)">
+                and genForm = #{genForm}
+            </if>
+            <if test="fieldId != null and !&quot;&quot;.equals(fieldId)">
+                and field_id = #{fieldId}
+            </if>
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE sys_gen_code SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/GenTestTableMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.GenTestTable;
+
+/**
+ * gen_test_table Dao接口
+ * Fri Apr 20 09:24:30 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.izouma.awesomeadmin.dao.GenTestTableMapper")
+public interface GenTestTableMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(GenTestTable record);
+
+	GenTestTable selectByPrimaryKey(Integer id);
+
+	int updateByPrimaryKeySelective(GenTestTable record);
+
+	List <GenTestTable> queryAllGenTestTable(GenTestTable record);
+
+	List <GenTestTable> queryGenTestTablesByPage(Map <String, Object> parameter);
+
+	int delete(String id);
+
+	GenTestTable queryGenTestTable(GenTestTable record);
+}
+

+ 209 - 0
src/main/java/com/izouma/awesomeadmin/dao/GenTestTableMapper.xml

@@ -0,0 +1,209 @@
+<?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.izouma.awesomeadmin.dao.GenTestTableMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.GenTestTable" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="my_column" property="myColumn" jdbcType="VARCHAR" />
+		<result column="aaa_test" property="aaaTest" jdbcType="VARCHAR" />
+		<result column="bbb_flag" property="bbbFlag" jdbcType="CHAR" />
+		<result column="no_comment" property="noComment" jdbcType="VARCHAR" />
+		<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+		<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, my_column, aaa_test, bbb_flag, no_comment, create_time, update_time, del_flag
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from gen_test_table
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from gen_test_table
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.GenTestTable" useGeneratedKeys="true" keyProperty="id">
+		insert into gen_test_table
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="myColumn != null" >
+				my_column,	
+			</if>
+			<if test="aaaTest != null" >
+				aaa_test,	
+			</if>
+			<if test="bbbFlag != null" >
+				bbb_flag,	
+			</if>
+			<if test="noComment != null" >
+				no_comment,	
+			</if>
+			<if test="createTime != null" >
+				create_time,	
+			</if>
+			<if test="updateTime != null" >
+				update_time,	
+			</if>
+			<if test="delFlag != null" >
+				del_flag,	
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="myColumn != null" >
+				#{myColumn,jdbcType=VARCHAR},	
+			</if>
+			<if test="aaaTest != null" >
+				#{aaaTest,jdbcType=VARCHAR},	
+			</if>
+			<if test="bbbFlag != null" >
+				#{bbbFlag,jdbcType=CHAR},	
+			</if>
+			<if test="noComment != null" >
+				#{noComment,jdbcType=VARCHAR},	
+			</if>
+			<if test="createTime != null" >
+				#{createTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateTime != null" >
+				#{updateTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="delFlag != null" >
+				#{delFlag,jdbcType=CHAR},	
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.GenTestTable" >
+		update gen_test_table
+		<set >
+			<if test="myColumn != null" >
+				my_column = #{myColumn,jdbcType=VARCHAR},	
+			</if>
+			<if test="aaaTest != null" >
+				aaa_test = #{aaaTest,jdbcType=VARCHAR},	
+			</if>
+			<if test="bbbFlag != null" >
+				bbb_flag = #{bbbFlag,jdbcType=CHAR},	
+			</if>
+			<if test="noComment != null" >
+				no_comment = #{noComment,jdbcType=VARCHAR},	
+			</if>
+			<if test="createTime != null" >
+				create_time = #{createTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateTime != null" >
+				update_time = #{updateTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="delFlag != null" >
+				del_flag = #{delFlag,jdbcType=CHAR},	
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="queryGenTestTablesByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenTestTable">
+		select <include refid="Base_Column_List"/> from gen_test_table
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.myColumn != null and !&quot;&quot;.equals(record.myColumn)">
+				and my_column = #{record.myColumn}	
+			</if>
+			<if test="record.aaaTest != null and !&quot;&quot;.equals(record.aaaTest)">
+				and aaa_test = #{record.aaaTest}	
+			</if>
+			<if test="record.bbbFlag != null and !&quot;&quot;.equals(record.bbbFlag)">
+				and bbb_flag = #{record.bbbFlag}	
+			</if>
+			<if test="record.noComment != null and !&quot;&quot;.equals(record.noComment)">
+				and no_comment = #{record.noComment}	
+			</if>
+			<if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+				and create_time = #{record.createTime}	
+			</if>
+			<if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+				and update_time = #{record.updateTime}	
+			</if>
+			<if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+				and del_flag = #{record.delFlag}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllGenTestTable" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenTestTable">
+		select <include refid="Base_Column_List"/> from gen_test_table
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="myColumn != null and !&quot;&quot;.equals(myColumn)">
+				and my_column = #{myColumn}	
+			</if>
+			<if test="aaaTest != null and !&quot;&quot;.equals(aaaTest)">
+				and aaa_test = #{aaaTest}	
+			</if>
+			<if test="bbbFlag != null and !&quot;&quot;.equals(bbbFlag)">
+				and bbb_flag = #{bbbFlag}	
+			</if>
+			<if test="noComment != null and !&quot;&quot;.equals(noComment)">
+				and no_comment = #{noComment}	
+			</if>
+			<if test="createTime != null and !&quot;&quot;.equals(createTime)">
+				and create_time = #{createTime}	
+			</if>
+			<if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+				and update_time = #{updateTime}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryGenTestTable" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenTestTable">
+		select <include refid="Base_Column_List"/> from gen_test_table
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="myColumn != null and !&quot;&quot;.equals(myColumn)">
+				and my_column = #{myColumn}	
+			</if>
+			<if test="aaaTest != null and !&quot;&quot;.equals(aaaTest)">
+				and aaa_test = #{aaaTest}	
+			</if>
+			<if test="bbbFlag != null and !&quot;&quot;.equals(bbbFlag)">
+				and bbb_flag = #{bbbFlag}	
+			</if>
+			<if test="noComment != null and !&quot;&quot;.equals(noComment)">
+				and no_comment = #{noComment}	
+			</if>
+			<if test="createTime != null and !&quot;&quot;.equals(createTime)">
+				and create_time = #{createTime}	
+			</if>
+			<if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+				and update_time = #{updateTime}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+	<update id="delete">
+		UPDATE gen_test_table SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/PowerInfoMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.PowerInfo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * power_info Dao接口
+ * Wed Apr 11 11:04:02 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.zoumaframe.dao.PowerInfoMapper")
+public interface PowerInfoMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(PowerInfo record);
+
+	PowerInfo selectByPrimaryKey(Integer id);
+
+	int updateByPrimaryKeySelective(PowerInfo record);
+
+	List<PowerInfo> queryAllPowerInfo(PowerInfo record);
+
+	List<PowerInfo> queryPowerInfosByPage(Map<String, Object> parameter);
+
+	int delete(String id);
+
+	PowerInfo queryPowerInfo(PowerInfo record);
+
+	int deleteByRoleId(String roleId);
+}
+

+ 224 - 0
src/main/java/com/izouma/awesomeadmin/dao/PowerInfoMapper.xml

@@ -0,0 +1,224 @@
+<?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.izouma.awesomeadmin.dao.PowerInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.PowerInfo">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="role_id" property="roleId" jdbcType="INTEGER"/>
+        <result column="menu_id" property="menuId" jdbcType="INTEGER"/>
+        <result column="can_add" property="canAdd" jdbcType="INTEGER"/>
+        <result column="can_delete" property="canDelete" jdbcType="INTEGER"/>
+        <result column="can_update" property="canUpdate" jdbcType="INTEGER"/>
+        <result column="can_select" property="canSelect" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+		 id, role_id, menu_id, can_add, can_delete, can_update, can_select, del_flag
+	</sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+		delete from sys_power_info
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.PowerInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_power_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                id,
+            </if>
+            <if test="roleId != null">
+                role_id,
+            </if>
+            <if test="menuId != null">
+                menu_id,
+            </if>
+            <if test="canAdd != null">
+                can_add,
+            </if>
+            <if test="canDelete != null">
+                can_delete,
+            </if>
+            <if test="canUpdate != null">
+                can_update,
+            </if>
+            <if test="canSelect != null">
+                can_select,
+            </if>
+            <if test="delFlag != null">
+                del_flag,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="roleId != null">
+                #{roleId,jdbcType=INTEGER},
+            </if>
+            <if test="menuId != null">
+                #{menuId,jdbcType=INTEGER},
+            </if>
+            <if test="canAdd != null">
+                #{canAdd,jdbcType=INTEGER},
+            </if>
+            <if test="canDelete != null">
+                #{canDelete,jdbcType=INTEGER},
+            </if>
+            <if test="canUpdate != null">
+                #{canUpdate,jdbcType=INTEGER},
+            </if>
+            <if test="canSelect != null">
+                #{canSelect,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.PowerInfo">
+        update sys_power_info
+        <set>
+            <if test="roleId != null">
+                role_id = #{roleId,jdbcType=INTEGER},
+            </if>
+            <if test="menuId != null">
+                menu_id = #{menuId,jdbcType=INTEGER},
+            </if>
+            <if test="canAdd != null">
+                can_add = #{canAdd,jdbcType=INTEGER},
+            </if>
+            <if test="canDelete != null">
+                can_delete = #{canDelete,jdbcType=INTEGER},
+            </if>
+            <if test="canUpdate != null">
+                can_update = #{canUpdate,jdbcType=INTEGER},
+            </if>
+            <if test="canSelect != null">
+                can_select = #{canSelect,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag = #{delFlag,jdbcType=CHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryPowerInfosByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.PowerInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.roleId != null and !&quot;&quot;.equals(record.roleId)">
+                and role_id = #{record.roleId}
+            </if>
+            <if test="record.menuId != null and !&quot;&quot;.equals(record.menuId)">
+                and menu_id = #{record.menuId}
+            </if>
+            <if test="record.canAdd != null and !&quot;&quot;.equals(record.canAdd)">
+                and can_add = #{record.canAdd}
+            </if>
+            <if test="record.canDelete != null and !&quot;&quot;.equals(record.canDelete)">
+                and can_delete = #{record.canDelete}
+            </if>
+            <if test="record.canUpdate != null and !&quot;&quot;.equals(record.canUpdate)">
+                and can_update = #{record.canUpdate}
+            </if>
+            <if test="record.canSelect != null and !&quot;&quot;.equals(record.canSelect)">
+                and can_select = #{record.canSelect}
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllPowerInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PowerInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="roleId != null and !&quot;&quot;.equals(roleId)">
+                and role_id = #{roleId}
+            </if>
+            <if test="menuId != null and !&quot;&quot;.equals(menuId)">
+                and menu_id = #{menuId}
+            </if>
+            <if test="canAdd != null and !&quot;&quot;.equals(canAdd)">
+                and can_add = #{canAdd}
+            </if>
+            <if test="canDelete != null and !&quot;&quot;.equals(canDelete)">
+                and can_delete = #{canDelete}
+            </if>
+            <if test="canUpdate != null and !&quot;&quot;.equals(canUpdate)">
+                and can_update = #{canUpdate}
+            </if>
+            <if test="canSelect != null and !&quot;&quot;.equals(canSelect)">
+                and can_select = #{canSelect}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="roleIdStr != null and !&quot;&quot;.equals(roleIdStr)">
+                and role_id in (${roleIdStr})
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryPowerInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PowerInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="roleId != null and !&quot;&quot;.equals(roleId)">
+                and role_id = #{roleId}
+            </if>
+            <if test="menuId != null and !&quot;&quot;.equals(menuId)">
+                and menu_id = #{menuId}
+            </if>
+            <if test="canAdd != null and !&quot;&quot;.equals(canAdd)">
+                and can_add = #{canAdd}
+            </if>
+            <if test="canDelete != null and !&quot;&quot;.equals(canDelete)">
+                and can_delete = #{canDelete}
+            </if>
+            <if test="canUpdate != null and !&quot;&quot;.equals(canUpdate)">
+                and can_update = #{canUpdate}
+            </if>
+            <if test="canSelect != null and !&quot;&quot;.equals(canSelect)">
+                and can_select = #{canSelect}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE sys_power_info SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+
+    <update id="deleteByRoleId">
+        UPDATE sys_power_info SET del_flag = 'Y'
+        <where>
+            AND role_id = #{roleId}
+        </where>
+    </update>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/QueryConfigMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.QueryConfig;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.QueryConfigMapper")
+public interface QueryConfigMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(QueryConfig record);
+
+    QueryConfig selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(QueryConfig record);
+
+    List<QueryConfig> queryAllQueryConfig(QueryConfig record);
+
+    List<QueryConfig> queryQueryConfigByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    QueryConfig queryQueryConfig(QueryConfig record);
+
+    List<QueryConfig> query(QueryConfig record);
+}
+

+ 363 - 0
src/main/java/com/izouma/awesomeadmin/dao/QueryConfigMapper.xml

@@ -0,0 +1,363 @@
+<?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.izouma.awesomeadmin.dao.QueryConfigMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.QueryConfig">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="code" property="code" jdbcType="VARCHAR"/>
+        <result column="table_name" property="tableName" jdbcType="VARCHAR"/>
+        <result column="tableColumns" property="tablecolumns" jdbcType="VARCHAR"/>
+        <result column="dataBaseType" property="databasetype" jdbcType="VARCHAR"/>
+        <result column="modules" property="modules" jdbcType="VARCHAR"/>
+        <result column="data_source_code" property="dataSourceCode" jdbcType="VARCHAR"/>
+        <result column="config_json" property="configJson" jdbcType="VARCHAR"/>
+        <result column="type_flag" property="typeFlag" jdbcType="VARCHAR"/>
+        <result column="sub_json" property="subJson" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            code,
+
+            table_name,
+
+            tableColumns,
+
+            dataBaseType,
+
+            modules,
+
+            data_source_code,
+
+            config_json,
+
+            type_flag,
+
+            sub_json,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_query_config
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from sys_query_config
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.QueryConfig" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_query_config
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="code!= null">
+                code,
+            </if>
+            <if test="tableName!= null">
+                table_name,
+            </if>
+            <if test="tablecolumns!= null">
+                tableColumns,
+            </if>
+            <if test="databasetype!= null">
+                dataBaseType,
+            </if>
+            <if test="modules!= null">
+                modules,
+            </if>
+            <if test="dataSourceCode!= null">
+                data_source_code,
+            </if>
+            <if test="configJson!= null">
+                config_json,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="subJson!= null">
+                sub_json,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="code != null">
+                #{code,jdbcType=VARCHAR},
+            </if>
+            <if test="tableName != null">
+                #{tableName,jdbcType=VARCHAR},
+            </if>
+            <if test="tablecolumns != null">
+                #{tablecolumns,jdbcType=VARCHAR},
+            </if>
+            <if test="databasetype != null">
+                #{databasetype,jdbcType=VARCHAR},
+            </if>
+            <if test="modules != null">
+                #{modules,jdbcType=VARCHAR},
+            </if>
+            <if test="dataSourceCode != null">
+                #{dataSourceCode,jdbcType=VARCHAR},
+            </if>
+            <if test="configJson != null">
+                #{configJson,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=VARCHAR},
+            </if>
+            <if test="subJson != null">
+                #{subJson,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.QueryConfig">
+        update sys_query_config
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="code != null">
+                code= #{code,jdbcType=VARCHAR},
+            </if>
+            <if test="tableName != null">
+                table_name= #{tableName,jdbcType=VARCHAR},
+            </if>
+            <if test="tablecolumns != null">
+                tableColumns= #{tablecolumns,jdbcType=VARCHAR},
+            </if>
+            <if test="databasetype != null">
+                dataBaseType= #{databasetype,jdbcType=VARCHAR},
+            </if>
+            <if test="modules != null">
+                modules= #{modules,jdbcType=VARCHAR},
+            </if>
+            <if test="dataSourceCode != null">
+                data_source_code= #{dataSourceCode,jdbcType=VARCHAR},
+            </if>
+            <if test="configJson != null">
+                config_json= #{configJson,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=VARCHAR},
+            </if>
+            <if test="subJson != null">
+                sub_json= #{subJson,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryQueryConfigByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.QueryConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_query_config
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.code != null and !&quot;&quot;.equals(record.code)">
+                and code = #{record.code}
+            </if>
+            <if test="record.tableName != null and !&quot;&quot;.equals(record.tableName)">
+                and table_name = #{record.tableName}
+            </if>
+            <if test="record.tablecolumns != null and !&quot;&quot;.equals(record.tablecolumns)">
+                and tableColumns = #{record.tablecolumns}
+            </if>
+            <if test="record.databasetype != null and !&quot;&quot;.equals(record.databasetype)">
+                and dataBaseType = #{record.databasetype}
+            </if>
+            <if test="record.modules != null and !&quot;&quot;.equals(record.modules)">
+                and modules = #{record.modules}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR code LIKE concat('%',#{record.searchKey},'%')
+                    OR table_name LIKE concat('%',#{record.searchKey},'%')
+                    OR tableColumns LIKE concat('%',#{record.searchKey},'%')
+                    OR dataBaseType LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllQueryConfig" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.QueryConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_query_config
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="code != null and !&quot;&quot;.equals(code)">
+                and code = #{code}
+            </if>
+            <if test="tableName != null and !&quot;&quot;.equals(tableName)">
+                and table_name = #{tableName}
+            </if>
+            <if test="tablecolumns != null and !&quot;&quot;.equals(tablecolumns)">
+                and tableColumns = #{tablecolumns}
+            </if>
+            <if test="databasetype != null and !&quot;&quot;.equals(databasetype)">
+                and dataBaseType = #{databasetype}
+            </if>
+            <if test="modules != null and !&quot;&quot;.equals(modules)">
+                and modules = #{modules}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR code LIKE concat('%',#{searchKey},'%')
+                    OR table_name LIKE concat('%',#{searchKey},'%')
+                    OR tableColumns LIKE concat('%',#{searchKey},'%')
+                    OR dataBaseType LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryQueryConfig" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.QueryConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_query_config
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="code != null and !&quot;&quot;.equals(code)">
+                and code = #{code}
+            </if>
+            <if test="tableName != null and !&quot;&quot;.equals(tableName)">
+                and table_name = #{tableName}
+            </if>
+            <if test="tablecolumns != null and !&quot;&quot;.equals(tablecolumns)">
+                and tableColumns = #{tablecolumns}
+            </if>
+            <if test="databasetype != null and !&quot;&quot;.equals(databasetype)">
+                and dataBaseType = #{databasetype}
+            </if>
+            <if test="modules != null and !&quot;&quot;.equals(modules)">
+                and modules = #{modules}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE sys_query_config SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.QueryConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_query_config
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 26 - 0
src/main/java/com/izouma/awesomeadmin/dao/RongYunTokenMapper.java

@@ -0,0 +1,26 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.RongYunToken;
+
+public interface RongYunTokenMapper {
+
+    int deleteByPrimaryKey(Long id);
+
+
+    int insert(RongYunToken record);
+
+
+    int insertSelective(RongYunToken record);
+
+
+    RongYunToken selectByPrimaryKey(Long id);
+
+
+    int updateByPrimaryKeySelective(RongYunToken record);
+
+
+    int updateByPrimaryKey(RongYunToken record);
+
+
+    RongYunToken getRongToken(String rongKey);
+}

+ 88 - 0
src/main/java/com/izouma/awesomeadmin/dao/RongYunTokenMapper.xml

@@ -0,0 +1,88 @@
+<?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.izouma.awesomeadmin.dao.RongYunTokenMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.RongYunToken">
+        <id column="id" property="id" jdbcType="BIGINT"/>
+        <result column="user_id" property="userId" jdbcType="BIGINT"/>
+        <result column="token" property="token" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+      id, user_id, token
+    </sql>
+
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_rong_yun_token
+        where id = #{id,jdbcType=BIGINT}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+        delete from sys_rong_yun_token
+        where id = #{id,jdbcType=BIGINT}
+    </delete>
+
+    <insert id="insert" parameterType="com.izouma.awesomeadmin.model.RongYunToken" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_rong_yun_token (id, user_id, token)
+        values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{token,jdbcType=VARCHAR})
+    </insert>
+
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.RongYunToken" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_rong_yun_token
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                id,
+            </if>
+            <if test="userId != null">
+                user_id,
+            </if>
+            <if test="token != null">
+                token,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=BIGINT},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=BIGINT},
+            </if>
+            <if test="token != null">
+                #{token,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.RongYunToken">
+        update sys_rong_yun_token
+        <set>
+            <if test="userId != null">
+                user_id = #{userId,jdbcType=BIGINT},
+            </if>
+            <if test="token != null">
+                token = #{token,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=BIGINT}
+    </update>
+
+    <update id="updateByPrimaryKey" parameterType="com.izouma.awesomeadmin.model.RongYunToken">
+        update sys_rong_yun_token
+        set user_id = #{userId,jdbcType=BIGINT},
+            token = #{token,jdbcType=VARCHAR}
+        where id = #{id,jdbcType=BIGINT}
+    </update>
+
+    <select id="getRongToken" resultType="com.izouma.awesomeadmin.model.RongYunToken" parameterType="string">
+		SELECT
+		*
+		FROM sys_rong_yun_token
+		WHERE user_id = #{rongKey}
+		order by id desc
+		LIMIT 1
+	</select>
+
+</mapper>

+ 51 - 0
src/main/java/com/izouma/awesomeadmin/dao/SuperUserMapper.java

@@ -0,0 +1,51 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.SuperUser;
+
+@Repository("com.izouma.awesomeadmin.dao.SuperUserMapper")
+public interface SuperUserMapper {
+
+    /**
+     * 
+     * <p>获取用户列表。</p>
+     *
+     * @return TblUser list
+     */
+    List <SuperUser> queryAllUsers();
+
+
+    /**
+     * 
+     * <p>分页查询,需要以ByPage结尾。</p>
+     *
+     * @return
+     */
+    List <SuperUser> queryAllUsersByPage(Map <String, Object> parameter);
+
+
+    /**
+     * 
+     * <p>根据用户id获取单个用户。</p>
+     *
+     * @param id
+     * @return
+     */
+    SuperUser queryUserById(String userId);
+
+
+    int save(SuperUser superUser);
+
+
+    int updateUserInfo(Map <String, Object> parameter);
+
+
+    int delete(String userId);
+
+
+    SuperUser userLogin(Map <String, Object> parameter);
+}

+ 88 - 0
src/main/java/com/izouma/awesomeadmin/dao/SuperUserMapper.xml

@@ -0,0 +1,88 @@
+<?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.izouma.awesomeadmin.dao.SuperUserMapper">
+    <sql id="columns">
+        user_id, power, password, user_name, profile, del_flag
+  	</sql>
+
+    <select id="queryUserById" resultType="com.izouma.awesomeadmin.model.SuperUser" parameterType="string">
+        SELECT
+        <include refid="columns"/>
+        FROM sys_super_user
+        WHERE user_id = #{userId}
+        LIMIT 1
+    </select>
+
+    <select id="userLogin" resultType="com.izouma.awesomeadmin.model.SuperUser" parameterType="map">
+        SELECT
+        <include refid="columns"/>
+        FROM sys_super_user
+        WHERE user_name = #{username}
+        and password = #{password}
+        LIMIT 1
+    </select>
+
+    <select id="queryAllUsers" resultType="com.izouma.awesomeadmin.model.SuperUser">
+        SELECT
+        <include refid="columns"/>
+        FROM sys_super_user
+        where del_flag = 'N'
+        order by user_id
+        <!-- 为了测试只取100个 -->
+        <!-- LIMIT 100  -->
+    </select>
+
+    <select id="queryAllUsersByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SuperUser">
+        select
+        <include refid="columns"/>
+        from sys_super_user
+        <where>
+            <!--  
+            <if test="userInfo.userId != null and !&quot;&quot;.equals(userInfo.userId)">
+                and user_id=#{userInfo.userId}
+            </if>
+            <if test="userInfo.username != null and !&quot;&quot;.equals(userInfo.username.trim())">
+                and user_name like '%' #{userInfo.username} '%'
+            </if>
+            -->
+        </where>
+        order by user_id
+    </select>
+
+    <insert id="save" parameterType="com.izouma.awesomeadmin.model.SuperUser" useGeneratedKeys="true" keyProperty="id">
+	    INSERT INTO sys_super_user (user_name, power, password, profile)
+        VALUES (#{username}, #{power}, #{password}, #{profile})
+    </insert>
+
+    <update id="updateUserInfo">
+        UPDATE sys_super_user
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userInfo.userId != null">
+                user_Id = #{userInfo.userId},
+            </if>
+            <if test="userInfo.username != null">
+                user_name = #{userInfo.username},
+            </if>
+            <if test="userInfo.password != null">
+                password = #{userInfo.password},
+            </if>
+            <if test="userInfo.profile != null">
+                profile = #{userInfo.profile},
+            </if>
+            <if test="userInfo.power != null">
+                power = #{userInfo.power},
+            </if>
+        </trim>
+        <where>
+            AND user_id = #{userId}
+        </where>
+    </update>
+
+    <update id="delete">
+        UPDATE sys_super_user SET del_flag = 'Y'
+        <where>
+            AND user_id = #{userId}
+        </where>
+    </update>
+</mapper>

+ 14 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysAppTokenMapper.java

@@ -0,0 +1,14 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.shiro.AppToken;
+import org.apache.ibatis.annotations.Param;
+
+public interface SysAppTokenMapper {
+    int saveToken(@Param("userId") Integer userId, @Param("token") String token);
+
+    AppToken getToken(String token);
+
+    int delToken(String token);
+
+    int delUserToken(Integer userId);
+}

+ 18 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysAppTokenMapper.xml

@@ -0,0 +1,18 @@
+<?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.izouma.awesomeadmin.dao.SysAppTokenMapper">
+    <insert id="saveToken">
+        insert into sys_app_token (user_id, token)
+        values (#{userId}, #{token})
+    </insert>
+    <delete id="delToken">
+        delete from sys_app_token where token = #{token}
+    </delete>
+    <delete id="delUserToken">
+        delete from sys_app_token where user_id = #{userId}
+    </delete>
+    <select id="getToken" resultType="com.izouma.awesomeadmin.shiro.AppToken">
+        select * from sys_app_token where token = #{token}
+    </select>
+
+</mapper>

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysDataruleMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import com.izouma.awesomeadmin.model.SysDatarule;
+import org.springframework.stereotype.Repository;
+
+
+/**
+ * sys_datarule Dao接口
+ * Tue Apr 17 10:44:06 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.izouma.awesomeadmin.dao.SysDataruleMapper")
+public interface SysDataruleMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(SysDatarule record);
+
+	SysDatarule selectByPrimaryKey(Integer id);
+
+	int updateByPrimaryKeySelective(SysDatarule record);
+
+	List <SysDatarule> queryAllSysDatarule(SysDatarule record);
+
+	List <SysDatarule> querySysDatarulesByPage(Map <String, Object> parameter);
+
+	int delete(String id);
+
+	SysDatarule querySysDatarule(SysDatarule record);
+}
+

+ 153 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysDataruleMapper.xml

@@ -0,0 +1,153 @@
+<?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.izouma.awesomeadmin.dao.SysDataruleMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.SysDatarule" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="datarule_name" property="dataruleName" jdbcType="VARCHAR" />
+		<result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
+		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
+		<result column="permission" property="permission" jdbcType="VARCHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, datarule_name, create_date, del_flag,permission
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_datarule
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from sys_datarule
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.SysDatarule" useGeneratedKeys="true" keyProperty="id">
+		insert into sys_datarule
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="dataruleName != null" >
+				datarule_name,	
+			</if>
+			<if test="createDate != null" >
+				create_date,	
+			</if>
+			<if test="delFlag != null" >
+				del_flag,	
+			</if>
+			<if test="permission != null" >
+				permission,
+			</if>
+
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="dataruleName != null" >
+				#{dataruleName,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				#{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="delFlag != null" >
+				#{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="permission != null" >
+				#{permission,jdbcType=VARCHAR},
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.SysDatarule" >
+		update sys_datarule
+		<set >
+			<if test="dataruleName != null" >
+				datarule_name = #{dataruleName,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				create_date = #{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="delFlag != null" >
+				del_flag = #{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="permission != null" >
+				permission = #{permission,jdbcType=VARCHAR},
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="querySysDatarulesByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysDatarule">
+		select <include refid="Base_Column_List"/> from sys_datarule
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.dataruleName != null and !&quot;&quot;.equals(record.dataruleName)">
+				and datarule_name = #{record.dataruleName}	
+			</if>
+			<if test="record.createDate != null and !&quot;&quot;.equals(record.createDate)">
+				and create_date = #{record.createDate}	
+			</if>
+			<if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+				and del_flag = #{record.delFlag}	
+			</if>
+			<if test="record.permission != null and !&quot;&quot;.equals(record.permission)">
+				and permission = #{record.permission}
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllSysDatarule" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysDatarule">
+		select <include refid="Base_Column_List"/> from sys_datarule
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="dataruleName != null and !&quot;&quot;.equals(dataruleName)">
+				and datarule_name = #{dataruleName}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="querySysDatarule" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysDatarule">
+		select <include refid="Base_Column_List"/> from sys_datarule
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="dataruleName != null and !&quot;&quot;.equals(dataruleName)">
+				and datarule_name = #{dataruleName}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+	<update id="delete">
+		UPDATE sys_datarule SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysMenuMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.SysMenu;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * sys_menu Dao接口
+ * Tue Apr 10 18:09:44 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.zoumaframe.dao.SysMenuMapper")
+public interface SysMenuMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(SysMenu record);
+
+	SysMenu selectByPrimaryKey(Integer id);
+
+	List<SysMenu> selectByPrimaryKeys(String ids);
+
+	int updateByPrimaryKeySelective(SysMenu record);
+
+	List<SysMenu> queryAllSysMenu(SysMenu record);
+
+	List<SysMenu> querySysMenusByPage(Map<String, Object> parameter);
+
+	int delete(String id);
+
+	SysMenu querySysMenu(SysMenu record);
+}
+

+ 386 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysMenuMapper.xml

@@ -0,0 +1,386 @@
+<?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.izouma.awesomeadmin.dao.SysMenuMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.SysMenu" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="parent_id" property="parentId" jdbcType="INTEGER" />
+		<result column="parent_ids" property="parentIds" jdbcType="VARCHAR" />
+		<result column="name" property="name" jdbcType="VARCHAR" />
+		<result column="sort" property="sort" jdbcType="DECIMAL" />
+		<result column="href" property="href" jdbcType="VARCHAR" />
+		<result column="target" property="target" jdbcType="VARCHAR" />
+		<result column="icon" property="icon" jdbcType="VARCHAR" />
+		<result column="is_show" property="isShow" jdbcType="CHAR" />
+		<result column="permission" property="permission" jdbcType="VARCHAR" />
+		<result column="create_by" property="createBy" jdbcType="VARCHAR" />
+		<result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
+		<result column="update_by" property="updateBy" jdbcType="VARCHAR" />
+		<result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
+		<result column="remarks" property="remarks" jdbcType="VARCHAR" />
+		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
+		<result column="menu_type" property="menuType" jdbcType="CHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, parent_id, parent_ids, name, sort, href, target, icon, is_show, permission, create_by, create_date, update_by, update_date, remarks, del_flag, menu_type
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_menu
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<select id="selectByPrimaryKeys" resultMap="BaseResultMap" parameterType="java.lang.String" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_menu
+		where FIND_IN_SET(id, #{ids,jdbcType=INTEGER}) and del_flag = 'N'
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from sys_menu
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.SysMenu" useGeneratedKeys="true" keyProperty="id">
+		insert into sys_menu
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="parentId != null" >
+				parent_id,	
+			</if>
+			<if test="parentIds != null" >
+				parent_ids,	
+			</if>
+			<if test="name != null" >
+				name,	
+			</if>
+			<if test="sort != null" >
+				sort,	
+			</if>
+			<if test="href != null" >
+				href,	
+			</if>
+			<if test="target != null" >
+				target,	
+			</if>
+			<if test="icon != null" >
+				icon,	
+			</if>
+			<if test="isShow != null" >
+				is_show,	
+			</if>
+			<if test="permission != null" >
+				permission,	
+			</if>
+			<if test="createBy != null" >
+				create_by,	
+			</if>
+			<if test="createDate != null" >
+				create_date,	
+			</if>
+			<if test="updateBy != null" >
+				update_by,	
+			</if>
+			<if test="updateDate != null" >
+				update_date,	
+			</if>
+			<if test="remarks != null" >
+				remarks,	
+			</if>
+			<if test="delFlag != null" >
+				del_flag,	
+			</if>
+			<if test="menuType != null" >
+				menu_type,	
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="parentId != null" >
+				#{parentId,jdbcType=INTEGER},	
+			</if>
+			<if test="parentIds != null" >
+				#{parentIds,jdbcType=VARCHAR},	
+			</if>
+			<if test="name != null" >
+				#{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="sort != null" >
+				#{sort,jdbcType=DECIMAL},	
+			</if>
+			<if test="href != null" >
+				#{href,jdbcType=VARCHAR},	
+			</if>
+			<if test="target != null" >
+				#{target,jdbcType=VARCHAR},	
+			</if>
+			<if test="icon != null" >
+				#{icon,jdbcType=VARCHAR},	
+			</if>
+			<if test="isShow != null" >
+				#{isShow,jdbcType=CHAR},	
+			</if>
+			<if test="permission != null" >
+				#{permission,jdbcType=VARCHAR},	
+			</if>
+			<if test="createBy != null" >
+				#{createBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				#{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateBy != null" >
+				#{updateBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="updateDate != null" >
+				#{updateDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="remarks != null" >
+				#{remarks,jdbcType=VARCHAR},	
+			</if>
+			<if test="delFlag != null" >
+				#{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="menuType != null" >
+				#{menuType,jdbcType=CHAR},	
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.SysMenu" >
+		update sys_menu
+		<set >
+			<if test="parentId != null" >
+				parent_id = #{parentId,jdbcType=INTEGER},	
+			</if>
+			<if test="parentIds != null" >
+				parent_ids = #{parentIds,jdbcType=VARCHAR},	
+			</if>
+			<if test="name != null" >
+				name = #{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="sort != null" >
+				sort = #{sort,jdbcType=DECIMAL},	
+			</if>
+			<if test="href != null" >
+				href = #{href,jdbcType=VARCHAR},	
+			</if>
+			<if test="target != null" >
+				target = #{target,jdbcType=VARCHAR},	
+			</if>
+			<if test="icon != null" >
+				icon = #{icon,jdbcType=VARCHAR},	
+			</if>
+			<if test="isShow != null" >
+				is_show = #{isShow,jdbcType=CHAR},	
+			</if>
+			<if test="permission != null" >
+				permission = #{permission,jdbcType=VARCHAR},	
+			</if>
+			<if test="createBy != null" >
+				create_by = #{createBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				create_date = #{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateBy != null" >
+				update_by = #{updateBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="updateDate != null" >
+				update_date = #{updateDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="remarks != null" >
+				remarks = #{remarks,jdbcType=VARCHAR},	
+			</if>
+			<if test="delFlag != null" >
+				del_flag = #{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="menuType != null" >
+				menu_type = #{menuType,jdbcType=CHAR},	
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="querySysMenusByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysMenu">
+		select <include refid="Base_Column_List"/> from sys_menu
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.parentId != null and !&quot;&quot;.equals(record.parentId)">
+				and parent_id = #{record.parentId}	
+			</if>
+			<if test="record.parentIds != null and !&quot;&quot;.equals(record.parentIds)">
+				and parent_ids = #{record.parentIds}	
+			</if>
+			<if test="record.name != null and !&quot;&quot;.equals(record.name)">
+				and name = #{record.name}	
+			</if>
+			<if test="record.sort != null and !&quot;&quot;.equals(record.sort)">
+				and sort = #{record.sort}	
+			</if>
+			<if test="record.href != null and !&quot;&quot;.equals(record.href)">
+				and href = #{record.href}	
+			</if>
+			<if test="record.target != null and !&quot;&quot;.equals(record.target)">
+				and target = #{record.target}	
+			</if>
+			<if test="record.icon != null and !&quot;&quot;.equals(record.icon)">
+				and icon = #{record.icon}	
+			</if>
+			<if test="record.isShow != null and !&quot;&quot;.equals(record.isShow)">
+				and is_show = #{record.isShow}	
+			</if>
+			<if test="record.permission != null and !&quot;&quot;.equals(record.permission)">
+				and permission = #{record.permission}	
+			</if>
+			<if test="record.createBy != null and !&quot;&quot;.equals(record.createBy)">
+				and create_by = #{record.createBy}	
+			</if>
+			<if test="record.createDate != null and !&quot;&quot;.equals(record.createDate)">
+				and create_date = #{record.createDate}	
+			</if>
+			<if test="record.updateBy != null and !&quot;&quot;.equals(record.updateBy)">
+				and update_by = #{record.updateBy}	
+			</if>
+			<if test="record.updateDate != null and !&quot;&quot;.equals(record.updateDate)">
+				and update_date = #{record.updateDate}	
+			</if>
+			<if test="record.remarks != null and !&quot;&quot;.equals(record.remarks)">
+				and remarks = #{record.remarks}	
+			</if>
+			<if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+				and del_flag = #{record.delFlag}	
+			</if>
+			<if test="record.menuType != null and !&quot;&quot;.equals(record.menuType)">
+				and menu_type = #{record.menuType}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllSysMenu" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysMenu">
+		select <include refid="Base_Column_List"/> from sys_menu
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="parentId != null and !&quot;&quot;.equals(parentId)">
+				and parent_id = #{parentId}	
+			</if>
+			<if test="parentIds != null and !&quot;&quot;.equals(parentIds)">
+				and parent_ids = #{parentIds}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="sort != null and !&quot;&quot;.equals(sort)">
+				and sort = #{sort}	
+			</if>
+			<if test="href != null and !&quot;&quot;.equals(href)">
+				and href = #{href}	
+			</if>
+			<if test="target != null and !&quot;&quot;.equals(target)">
+				and target = #{target}	
+			</if>
+			<if test="icon != null and !&quot;&quot;.equals(icon)">
+				and icon = #{icon}	
+			</if>
+			<if test="isShow != null and !&quot;&quot;.equals(isShow)">
+				and is_show = #{isShow}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}	
+			</if>
+			<if test="createBy != null and !&quot;&quot;.equals(createBy)">
+				and create_by = #{createBy}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="updateBy != null and !&quot;&quot;.equals(updateBy)">
+				and update_by = #{updateBy}	
+			</if>
+			<if test="updateDate != null and !&quot;&quot;.equals(updateDate)">
+				and update_date = #{updateDate}	
+			</if>
+			<if test="remarks != null and !&quot;&quot;.equals(remarks)">
+				and remarks = #{remarks}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="menuType != null and !&quot;&quot;.equals(menuType)">
+				and menu_type = #{menuType}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="querySysMenu" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysMenu">
+		select <include refid="Base_Column_List"/> from sys_menu
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="parentId != null and !&quot;&quot;.equals(parentId)">
+				and parent_id = #{parentId}	
+			</if>
+			<if test="parentIds != null and !&quot;&quot;.equals(parentIds)">
+				and parent_ids = #{parentIds}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="sort != null and !&quot;&quot;.equals(sort)">
+				and sort = #{sort}	
+			</if>
+			<if test="href != null and !&quot;&quot;.equals(href)">
+				and href = #{href}	
+			</if>
+			<if test="target != null and !&quot;&quot;.equals(target)">
+				and target = #{target}	
+			</if>
+			<if test="icon != null and !&quot;&quot;.equals(icon)">
+				and icon = #{icon}	
+			</if>
+			<if test="isShow != null and !&quot;&quot;.equals(isShow)">
+				and is_show = #{isShow}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}	
+			</if>
+			<if test="createBy != null and !&quot;&quot;.equals(createBy)">
+				and create_by = #{createBy}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="updateBy != null and !&quot;&quot;.equals(updateBy)">
+				and update_by = #{updateBy}	
+			</if>
+			<if test="updateDate != null and !&quot;&quot;.equals(updateDate)">
+				and update_date = #{updateDate}	
+			</if>
+			<if test="remarks != null and !&quot;&quot;.equals(remarks)">
+				and remarks = #{remarks}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="menuType != null and !&quot;&quot;.equals(menuType)">
+				and menu_type = #{menuType}	
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+	<update id="delete">
+		UPDATE sys_menu SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+</mapper>
+

+ 47 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysRoleMapper.java

@@ -0,0 +1,47 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.SysRole;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * sys_role Dao接口
+ * Tue Apr 10 18:09:56 CST 2018  Suo Chen Cheng
+ */
+@Repository("com.zoumaframe.dao.SysRoleMapper")
+public interface SysRoleMapper {
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(SysRole record);
+
+    SysRole selectByPrimaryKey(Integer id);
+
+    List<SysRole> selectByPrimaryKeys(@Param("ids") String ids);
+
+    int updateByPrimaryKeySelective(SysRole record);
+
+    List<SysRole> queryAllSysRole(SysRole record);
+
+    List<SysRole> querySysRolesByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    SysRole querySysRole(SysRole record);
+
+    List<SysRole> getUserRoles(@Param("userId") Integer userId);
+
+    int setUserRoles(@Param("userId") Integer userId, @Param("roles") List<String> roles);
+
+    int clearUserRoles(@Param("userId") Integer userId);
+
+    int addUserRole(@Param("userId") Integer userId, @Param("roleId") Integer roleId);
+
+    int removeUserRole(@Param("userId") Integer userId, @Param("roleId") Integer roleId);
+
+    String getUserRoleId(Integer id);
+}
+

+ 372 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysRoleMapper.xml

@@ -0,0 +1,372 @@
+<?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.izouma.awesomeadmin.dao.SysRoleMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.SysRole" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="office_id" property="officeId" jdbcType="VARCHAR" />
+		<result column="name" property="name" jdbcType="VARCHAR" />
+		<result column="enname" property="enname" jdbcType="VARCHAR" />
+		<result column="role_type" property="roleType" jdbcType="VARCHAR" />
+		<result column="is_sys" property="isSys" jdbcType="VARCHAR" />
+		<result column="useable" property="useable" jdbcType="VARCHAR" />
+		<result column="create_by" property="createBy" jdbcType="VARCHAR" />
+		<result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
+		<result column="update_by" property="updateBy" jdbcType="VARCHAR" />
+		<result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
+		<result column="remarks" property="remarks" jdbcType="VARCHAR" />
+		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
+		<result column="menu_ids" property="menuIds" jdbcType="VARCHAR" />
+		<result column="permission" property="permission" jdbcType="VARCHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, office_id, name, enname, role_type, is_sys, useable, create_by, create_date, update_by, update_date, remarks, del_flag,menu_ids,permission
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_role
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from sys_role
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.SysRole" useGeneratedKeys="true" keyProperty="id">
+		insert into sys_role
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="officeId != null" >
+				office_id,	
+			</if>
+			<if test="name != null" >
+				name,	
+			</if>
+			<if test="enname != null" >
+				enname,	
+			</if>
+			<if test="roleType != null" >
+				role_type,	
+			</if>
+			<if test="isSys != null" >
+				is_sys,	
+			</if>
+			<if test="useable != null" >
+				useable,	
+			</if>
+			<if test="createBy != null" >
+				create_by,	
+			</if>
+			<if test="createDate != null" >
+				create_date,	
+			</if>
+			<if test="updateBy != null" >
+				update_by,	
+			</if>
+			<if test="updateDate != null" >
+				update_date,	
+			</if>
+			<if test="remarks != null" >
+				remarks,	
+			</if>
+			<if test="menuIds != null" >
+				menu_ids,
+			</if>
+			<if test="permission != null" >
+				permission,
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="officeId != null" >
+				#{officeId,jdbcType=VARCHAR},	
+			</if>
+			<if test="name != null" >
+				#{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="enname != null" >
+				#{enname,jdbcType=VARCHAR},	
+			</if>
+			<if test="roleType != null" >
+				#{roleType,jdbcType=VARCHAR},	
+			</if>
+			<if test="isSys != null" >
+				#{isSys,jdbcType=VARCHAR},	
+			</if>
+			<if test="useable != null" >
+				#{useable,jdbcType=VARCHAR},	
+			</if>
+			<if test="createBy != null" >
+				#{createBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				#{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateBy != null" >
+				#{updateBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="updateDate != null" >
+				#{updateDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="remarks != null" >
+				#{remarks,jdbcType=VARCHAR},	
+			</if>
+			<if test="menuIds != null" >
+				#{menuIds,jdbcType=VARCHAR},
+			</if>
+			<if test="permission != null" >
+				#{permission,jdbcType=VARCHAR},
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.SysRole" >
+		update sys_role
+		<set >
+			<if test="officeId != null" >
+				office_id = #{officeId,jdbcType=VARCHAR},	
+			</if>
+			<if test="name != null" >
+				name = #{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="enname != null" >
+				enname = #{enname,jdbcType=VARCHAR},	
+			</if>
+			<if test="roleType != null" >
+				role_type = #{roleType,jdbcType=VARCHAR},	
+			</if>
+			<if test="isSys != null" >
+				is_sys = #{isSys,jdbcType=VARCHAR},	
+			</if>
+			<if test="useable != null" >
+				useable = #{useable,jdbcType=VARCHAR},	
+			</if>
+			<if test="createBy != null" >
+				create_by = #{createBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				create_date = #{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateBy != null" >
+				update_by = #{updateBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="updateDate != null" >
+				update_date = #{updateDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="remarks != null" >
+				remarks = #{remarks,jdbcType=VARCHAR},	
+			</if>
+			<if test="delFlag != null" >
+				del_flag = #{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="menuIds != null" >
+				menu_ids = #{menuIds,jdbcType=VARCHAR},
+			</if>
+			<if test="permission != null" >
+				permission = #{permission,jdbcType=VARCHAR},
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="querySysRolesByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysRole">
+		select <include refid="Base_Column_List"/> from sys_role
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.officeId != null and !&quot;&quot;.equals(record.officeId)">
+				and office_id = #{record.officeId}	
+			</if>
+			<if test="record.name != null and !&quot;&quot;.equals(record.name)">
+				and name = #{record.name}	
+			</if>
+			<if test="record.enname != null and !&quot;&quot;.equals(record.enname)">
+				and enname = #{record.enname}	
+			</if>
+			<if test="record.roleType != null and !&quot;&quot;.equals(record.roleType)">
+				and role_type = #{record.roleType}	
+			</if>
+			<if test="record.isSys != null and !&quot;&quot;.equals(record.isSys)">
+				and is_sys = #{record.isSys}	
+			</if>
+			<if test="record.useable != null and !&quot;&quot;.equals(record.useable)">
+				and useable = #{record.useable}	
+			</if>
+			<if test="record.createBy != null and !&quot;&quot;.equals(record.createBy)">
+				and create_by = #{record.createBy}	
+			</if>
+			<if test="record.createDate != null and !&quot;&quot;.equals(record.createDate)">
+				and create_date = #{record.createDate}	
+			</if>
+			<if test="record.updateBy != null and !&quot;&quot;.equals(record.updateBy)">
+				and update_by = #{record.updateBy}	
+			</if>
+			<if test="record.updateDate != null and !&quot;&quot;.equals(record.updateDate)">
+				and update_date = #{record.updateDate}	
+			</if>
+			<if test="record.remarks != null and !&quot;&quot;.equals(record.remarks)">
+				and remarks = #{record.remarks}	
+			</if>
+			<if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+				and del_flag = #{record.delFlag}	
+			</if>
+			<if test="record.menuIds != null and !&quot;&quot;.equals(record.menuIds)">
+				and menu_ids = #{record.menuIds}
+			</if>
+			<if test="record.permission != null and !&quot;&quot;.equals(record.permission)">
+				and permission = #{record.permission}
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllSysRole" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysRole">
+		select <include refid="Base_Column_List"/> from sys_role
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="officeId != null and !&quot;&quot;.equals(officeId)">
+				and office_id = #{officeId}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="enname != null and !&quot;&quot;.equals(enname)">
+				and enname = #{enname}	
+			</if>
+			<if test="roleType != null and !&quot;&quot;.equals(roleType)">
+				and role_type = #{roleType}	
+			</if>
+			<if test="isSys != null and !&quot;&quot;.equals(isSys)">
+				and is_sys = #{isSys}	
+			</if>
+			<if test="useable != null and !&quot;&quot;.equals(useable)">
+				and useable = #{useable}	
+			</if>
+			<if test="createBy != null and !&quot;&quot;.equals(createBy)">
+				and create_by = #{createBy}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="updateBy != null and !&quot;&quot;.equals(updateBy)">
+				and update_by = #{updateBy}	
+			</if>
+			<if test="updateDate != null and !&quot;&quot;.equals(updateDate)">
+				and update_date = #{updateDate}	
+			</if>
+			<if test="remarks != null and !&quot;&quot;.equals(remarks)">
+				and remarks = #{remarks}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="idStr != null and !&quot;&quot;.equals(idStr)">
+				and id in  (${idStr})
+			</if>
+			<if test="menuIds != null and !&quot;&quot;.equals(menuIds)">
+				and menu_ids = #{menuIds}
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="querySysRole" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysRole">
+		select <include refid="Base_Column_List"/> from sys_role
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="officeId != null and !&quot;&quot;.equals(officeId)">
+				and office_id = #{officeId}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="enname != null and !&quot;&quot;.equals(enname)">
+				and enname = #{enname}	
+			</if>
+			<if test="roleType != null and !&quot;&quot;.equals(roleType)">
+				and role_type = #{roleType}	
+			</if>
+			<if test="isSys != null and !&quot;&quot;.equals(isSys)">
+				and is_sys = #{isSys}	
+			</if>
+			<if test="useable != null and !&quot;&quot;.equals(useable)">
+				and useable = #{useable}	
+			</if>
+			<if test="createBy != null and !&quot;&quot;.equals(createBy)">
+				and create_by = #{createBy}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="updateBy != null and !&quot;&quot;.equals(updateBy)">
+				and update_by = #{updateBy}	
+			</if>
+			<if test="updateDate != null and !&quot;&quot;.equals(updateDate)">
+				and update_date = #{updateDate}	
+			</if>
+			<if test="remarks != null and !&quot;&quot;.equals(remarks)">
+				and remarks = #{remarks}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="menuIds != null and !&quot;&quot;.equals(menuIds)">
+				and menu_ids = #{menuIds}
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+    <select id="selectByPrimaryKeys" resultType="com.izouma.awesomeadmin.model.SysRole">
+		select
+		<include refid="Base_Column_List" />
+		from sys_role
+		where id in (${ids})
+		and del_flag = 'N'
+	</select>
+    <select id="getUserRoles" resultType="com.izouma.awesomeadmin.model.SysRole">
+		select
+		<include refid="Base_Column_List" />
+		from sys_role
+		where id in (select role_id from sys_user_role where user_id = #{userId})
+		and del_flag = 'N'
+	</select>
+    <update id="delete">
+		UPDATE sys_role SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+	<insert id="setUserRoles">
+		insert into sys_user_role (user_id, role_id)
+		values
+		<foreach collection="roles" item="roleId" separator=",">
+			(#{userId}, #{roleId})
+		</foreach>
+	</insert>
+    <delete id="clearUserRoles">
+		delete from sys_user_role where user_id = #{userId}
+	</delete>
+	<insert id="addUserRole">
+		insert into sys_user_role (user_id, role_id) values (#{userId}, #{roleId})
+	</insert>
+	<delete id="removeUserRole">
+		delete from sys_user_role when user_id = #{userId} and role_id = #{roleId}
+	</delete>
+	<select id="getUserRoleId" resultType="java.lang.String">
+		SELECT group_concat(role_id) FROM sys_user_role WHERE user_id = #{id}
+	</select>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/TableFieldMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.TableField;
+
+/**
+ * table_field Dao接口
+ * Fri May 04 13:38:24 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.izouma.awesomeadmin.dao.TableFieldMapper")
+public interface TableFieldMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(TableField record);
+
+	TableField selectByPrimaryKey(Integer id);
+
+	int updateByPrimaryKeySelective(TableField record);
+
+	List <TableField> queryAllTableField(TableField record);
+
+	List <TableField> queryTableFieldsByPage(Map <String, Object> parameter);
+
+	int delete(String id);
+
+	TableField queryTableField(TableField record);
+
+}
+

+ 494 - 0
src/main/java/com/izouma/awesomeadmin/dao/TableFieldMapper.xml

@@ -0,0 +1,494 @@
+<?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.izouma.awesomeadmin.dao.TableFieldMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.TableField" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="name" property="name" jdbcType="VARCHAR" />
+		<result column="remark" property="remark" jdbcType="VARCHAR" />
+		<result column="jdbcType" property="jdbcType" jdbcType="VARCHAR" />
+		<result column="javaType" property="javaType" jdbcType="VARCHAR" />
+		<result column="length" property="length" jdbcType="INTEGER" />
+		<result column="decimalPlaces" property="decimalPlaces" jdbcType="INTEGER" />
+		<result column="defaultValue" property="defaultValue" jdbcType="VARCHAR" />
+		<result column="notNull" property="notNull" jdbcType="BIT" />
+		<result column="primaryKey" property="primaryKey" jdbcType="BIT" />
+		<result column="autoIncrease" property="autoIncrease" jdbcType="BIT" />
+		<result column="showInList" property="showInList" jdbcType="BIT" />
+		<result column="showInForm" property="showInForm" jdbcType="BIT" />
+		<result column="searchable" property="searchable" jdbcType="BIT" />
+		<result column="formType" property="formType" jdbcType="VARCHAR" />
+		<result column="searchMethod" property="searchMethod" jdbcType="VARCHAR" />
+		<result column="required" property="required" jdbcType="BIT" />
+		<result column="validate" property="validate" jdbcType="BIT" />
+		<result column="minLength" property="minLength" jdbcType="INTEGER" />
+		<result column="maxLength" property="maxLength" jdbcType="INTEGER" />
+		<result column="min" property="min" jdbcType="VARCHAR" />
+		<result column="max" property="max" jdbcType="VARCHAR" />
+		<result column="validatorType" property="validatorType" jdbcType="VARCHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, 'name', remark, jdbcType, javaType, 'length', decimalPlaces, defaultValue, notNull, primaryKey, autoIncrease, showInList, showInForm, searchable, formType, searchMethod, required, validate, minLength, maxLength, 'min','max', validatorType
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_table_field
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from sys_table_field
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.TableField" useGeneratedKeys="true" keyProperty="id">
+		insert into sys_table_field
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="name != null" >
+				name,	
+			</if>
+			<if test="remark != null" >
+				remark,	
+			</if>
+			<if test="jdbcType != null" >
+				jdbcType,	
+			</if>
+			<if test="javaType != null" >
+				javaType,	
+			</if>
+			<if test="length != null" >
+				length,	
+			</if>
+			<if test="decimalPlaces != null" >
+				decimalPlaces,	
+			</if>
+			<if test="defaultValue != null" >
+				defaultValue,	
+			</if>
+			<if test="notNull != null" >
+				notNull,	
+			</if>
+			<if test="primaryKey != null" >
+				primaryKey,	
+			</if>
+			<if test="autoIncrease != null" >
+				autoIncrease,	
+			</if>
+			<if test="showInList != null" >
+				showInList,	
+			</if>
+			<if test="showInForm != null" >
+				showInForm,	
+			</if>
+			<if test="searchable != null" >
+				searchable,	
+			</if>
+			<if test="formType != null" >
+				formType,	
+			</if>
+			<if test="searchMethod != null" >
+				searchMethod,	
+			</if>
+			<if test="required != null" >
+				required,	
+			</if>
+			<if test="validate != null" >
+				validate,	
+			</if>
+			<if test="minLength != null" >
+				minLength,	
+			</if>
+			<if test="maxLength != null" >
+				maxLength,	
+			</if>
+			<if test="min != null" >
+				min,	
+			</if>
+			<if test="max != null" >
+				max,	
+			</if>
+			<if test="validatorType != null" >
+				validatorType,	
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="name != null" >
+				#{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="remark != null" >
+				#{remark,jdbcType=VARCHAR},	
+			</if>
+			<if test="jdbcType != null" >
+				#{jdbcType,jdbcType=VARCHAR},	
+			</if>
+			<if test="javaType != null" >
+				#{javaType,jdbcType=VARCHAR},	
+			</if>
+			<if test="length != null" >
+				#{length,jdbcType=INTEGER},	
+			</if>
+			<if test="decimalPlaces != null" >
+				#{decimalPlaces,jdbcType=INTEGER},	
+			</if>
+			<if test="defaultValue != null" >
+				#{defaultValue,jdbcType=VARCHAR},	
+			</if>
+			<if test="notNull != null" >
+				#{notNull,jdbcType=BIT},	
+			</if>
+			<if test="primaryKey != null" >
+				#{primaryKey,jdbcType=BIT},	
+			</if>
+			<if test="autoIncrease != null" >
+				#{autoIncrease,jdbcType=BIT},	
+			</if>
+			<if test="showInList != null" >
+				#{showInList,jdbcType=BIT},	
+			</if>
+			<if test="showInForm != null" >
+				#{showInForm,jdbcType=BIT},	
+			</if>
+			<if test="searchable != null" >
+				#{searchable,jdbcType=BIT},	
+			</if>
+			<if test="formType != null" >
+				#{formType,jdbcType=VARCHAR},	
+			</if>
+			<if test="searchMethod != null" >
+				#{searchMethod,jdbcType=VARCHAR},	
+			</if>
+			<if test="required != null" >
+				#{required,jdbcType=BIT},	
+			</if>
+			<if test="validate != null" >
+				#{validate,jdbcType=BIT},	
+			</if>
+			<if test="minLength != null" >
+				#{minLength,jdbcType=INTEGER},	
+			</if>
+			<if test="maxLength != null" >
+				#{maxLength,jdbcType=INTEGER},	
+			</if>
+			<if test="min != null" >
+				#{min,jdbcType=VARCHAR},	
+			</if>
+			<if test="max != null" >
+				#{max,jdbcType=VARCHAR},	
+			</if>
+			<if test="validatorType != null" >
+				#{validatorType,jdbcType=VARCHAR},	
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.TableField" >
+		update sys_table_field
+		<set >
+			<if test="name != null" >
+				name = #{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="remark != null" >
+				remark = #{remark,jdbcType=VARCHAR},	
+			</if>
+			<if test="jdbcType != null" >
+				jdbcType = #{jdbcType,jdbcType=VARCHAR},	
+			</if>
+			<if test="javaType != null" >
+				javaType = #{javaType,jdbcType=VARCHAR},	
+			</if>
+			<if test="length != null" >
+				length = #{length,jdbcType=INTEGER},	
+			</if>
+			<if test="decimalPlaces != null" >
+				decimalPlaces = #{decimalPlaces,jdbcType=INTEGER},	
+			</if>
+			<if test="defaultValue != null" >
+				defaultValue = #{defaultValue,jdbcType=VARCHAR},	
+			</if>
+			<if test="notNull != null" >
+				notNull = #{notNull,jdbcType=BIT},	
+			</if>
+			<if test="primaryKey != null" >
+				primaryKey = #{primaryKey,jdbcType=BIT},	
+			</if>
+			<if test="autoIncrease != null" >
+				autoIncrease = #{autoIncrease,jdbcType=BIT},	
+			</if>
+			<if test="showInList != null" >
+				showInList = #{showInList,jdbcType=BIT},	
+			</if>
+			<if test="showInForm != null" >
+				showInForm = #{showInForm,jdbcType=BIT},	
+			</if>
+			<if test="searchable != null" >
+				searchable = #{searchable,jdbcType=BIT},	
+			</if>
+			<if test="formType != null" >
+				formType = #{formType,jdbcType=VARCHAR},	
+			</if>
+			<if test="searchMethod != null" >
+				searchMethod = #{searchMethod,jdbcType=VARCHAR},	
+			</if>
+			<if test="required != null" >
+				required = #{required,jdbcType=BIT},	
+			</if>
+			<if test="validate != null" >
+				validate = #{validate,jdbcType=BIT},	
+			</if>
+			<if test="minLength != null" >
+				minLength = #{minLength,jdbcType=INTEGER},	
+			</if>
+			<if test="maxLength != null" >
+				maxLength = #{maxLength,jdbcType=INTEGER},	
+			</if>
+			<if test="min != null" >
+				min = #{min,jdbcType=VARCHAR},	
+			</if>
+			<if test="max != null" >
+				max = #{max,jdbcType=VARCHAR},	
+			</if>
+			<if test="validatorType != null" >
+				validatorType = #{validatorType,jdbcType=VARCHAR},	
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="queryTableFieldsByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TableField">
+		select <include refid="Base_Column_List"/> from sys_table_field
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.name != null and !&quot;&quot;.equals(record.name)">
+				and name = #{record.name}	
+			</if>
+			<if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+				and remark = #{record.remark}	
+			</if>
+			<if test="record.jdbcType != null and !&quot;&quot;.equals(record.jdbcType)">
+				and jdbcType = #{record.jdbcType}	
+			</if>
+			<if test="record.javaType != null and !&quot;&quot;.equals(record.javaType)">
+				and javaType = #{record.javaType}	
+			</if>
+			<if test="record.length != null and !&quot;&quot;.equals(record.length)">
+				and length = #{record.length}	
+			</if>
+			<if test="record.decimalPlaces != null and !&quot;&quot;.equals(record.decimalPlaces)">
+				and decimalPlaces = #{record.decimalPlaces}	
+			</if>
+			<if test="record.defaultValue != null and !&quot;&quot;.equals(record.defaultValue)">
+				and defaultValue = #{record.defaultValue}	
+			</if>
+			<if test="record.notNull != null and !&quot;&quot;.equals(record.notNull)">
+				and notNull = #{record.notNull}	
+			</if>
+			<if test="record.primaryKey != null and !&quot;&quot;.equals(record.primaryKey)">
+				and primaryKey = #{record.primaryKey}	
+			</if>
+			<if test="record.autoIncrease != null and !&quot;&quot;.equals(record.autoIncrease)">
+				and autoIncrease = #{record.autoIncrease}	
+			</if>
+			<if test="record.showInList != null and !&quot;&quot;.equals(record.showInList)">
+				and showInList = #{record.showInList}	
+			</if>
+			<if test="record.showInForm != null and !&quot;&quot;.equals(record.showInForm)">
+				and showInForm = #{record.showInForm}	
+			</if>
+			<if test="record.searchable != null and !&quot;&quot;.equals(record.searchable)">
+				and searchable = #{record.searchable}	
+			</if>
+			<if test="record.formType != null and !&quot;&quot;.equals(record.formType)">
+				and formType = #{record.formType}	
+			</if>
+			<if test="record.searchMethod != null and !&quot;&quot;.equals(record.searchMethod)">
+				and searchMethod = #{record.searchMethod}	
+			</if>
+			<if test="record.required != null and !&quot;&quot;.equals(record.required)">
+				and required = #{record.required}	
+			</if>
+			<if test="record.validate != null and !&quot;&quot;.equals(record.validate)">
+				and validate = #{record.validate}	
+			</if>
+			<if test="record.minLength != null and !&quot;&quot;.equals(record.minLength)">
+				and minLength = #{record.minLength}	
+			</if>
+			<if test="record.maxLength != null and !&quot;&quot;.equals(record.maxLength)">
+				and maxLength = #{record.maxLength}	
+			</if>
+			<if test="record.min != null and !&quot;&quot;.equals(record.min)">
+				and min = #{record.min}	
+			</if>
+			<if test="record.max != null and !&quot;&quot;.equals(record.max)">
+				and max = #{record.max}	
+			</if>
+			<if test="record.validatorType != null and !&quot;&quot;.equals(record.validatorType)">
+				and validatorType = #{record.validatorType}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllTableField" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TableField">
+		select <include refid="Base_Column_List"/> from sys_table_field
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="remark != null and !&quot;&quot;.equals(remark)">
+				and remark = #{remark}	
+			</if>
+			<if test="jdbcType != null and !&quot;&quot;.equals(jdbcType)">
+				and jdbcType = #{jdbcType}	
+			</if>
+			<if test="javaType != null and !&quot;&quot;.equals(javaType)">
+				and javaType = #{javaType}	
+			</if>
+			<if test="length != null and !&quot;&quot;.equals(length)">
+				and length = #{length}	
+			</if>
+			<if test="decimalPlaces != null and !&quot;&quot;.equals(decimalPlaces)">
+				and decimalPlaces = #{decimalPlaces}	
+			</if>
+			<if test="defaultValue != null and !&quot;&quot;.equals(defaultValue)">
+				and defaultValue = #{defaultValue}	
+			</if>
+			<if test="notNull != null and !&quot;&quot;.equals(notNull)">
+				and notNull = #{notNull}	
+			</if>
+			<if test="primaryKey != null and !&quot;&quot;.equals(primaryKey)">
+				and primaryKey = #{primaryKey}	
+			</if>
+			<if test="autoIncrease != null and !&quot;&quot;.equals(autoIncrease)">
+				and autoIncrease = #{autoIncrease}	
+			</if>
+			<if test="showInList != null and !&quot;&quot;.equals(showInList)">
+				and showInList = #{showInList}	
+			</if>
+			<if test="showInForm != null and !&quot;&quot;.equals(showInForm)">
+				and showInForm = #{showInForm}	
+			</if>
+			<if test="searchable != null and !&quot;&quot;.equals(searchable)">
+				and searchable = #{searchable}	
+			</if>
+			<if test="formType != null and !&quot;&quot;.equals(formType)">
+				and formType = #{formType}	
+			</if>
+			<if test="searchMethod != null and !&quot;&quot;.equals(searchMethod)">
+				and searchMethod = #{searchMethod}	
+			</if>
+			<if test="required != null and !&quot;&quot;.equals(required)">
+				and required = #{required}	
+			</if>
+			<if test="validate != null and !&quot;&quot;.equals(validate)">
+				and validate = #{validate}	
+			</if>
+			<if test="minLength != null and !&quot;&quot;.equals(minLength)">
+				and minLength = #{minLength}	
+			</if>
+			<if test="maxLength != null and !&quot;&quot;.equals(maxLength)">
+				and maxLength = #{maxLength}	
+			</if>
+			<if test="min != null and !&quot;&quot;.equals(min)">
+				and min = #{min}	
+			</if>
+			<if test="max != null and !&quot;&quot;.equals(max)">
+				and max = #{max}	
+			</if>
+			<if test="validatorType != null and !&quot;&quot;.equals(validatorType)">
+				and validatorType = #{validatorType}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryTableField" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TableField">
+		select <include refid="Base_Column_List"/> from sys_table_field
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="remark != null and !&quot;&quot;.equals(remark)">
+				and remark = #{remark}	
+			</if>
+			<if test="jdbcType != null and !&quot;&quot;.equals(jdbcType)">
+				and jdbcType = #{jdbcType}	
+			</if>
+			<if test="javaType != null and !&quot;&quot;.equals(javaType)">
+				and javaType = #{javaType}	
+			</if>
+			<if test="length != null and !&quot;&quot;.equals(length)">
+				and length = #{length}	
+			</if>
+			<if test="decimalPlaces != null and !&quot;&quot;.equals(decimalPlaces)">
+				and decimalPlaces = #{decimalPlaces}	
+			</if>
+			<if test="defaultValue != null and !&quot;&quot;.equals(defaultValue)">
+				and defaultValue = #{defaultValue}	
+			</if>
+			<if test="notNull != null and !&quot;&quot;.equals(notNull)">
+				and notNull = #{notNull}	
+			</if>
+			<if test="primaryKey != null and !&quot;&quot;.equals(primaryKey)">
+				and primaryKey = #{primaryKey}	
+			</if>
+			<if test="autoIncrease != null and !&quot;&quot;.equals(autoIncrease)">
+				and autoIncrease = #{autoIncrease}	
+			</if>
+			<if test="showInList != null and !&quot;&quot;.equals(showInList)">
+				and showInList = #{showInList}	
+			</if>
+			<if test="showInForm != null and !&quot;&quot;.equals(showInForm)">
+				and showInForm = #{showInForm}	
+			</if>
+			<if test="searchable != null and !&quot;&quot;.equals(searchable)">
+				and searchable = #{searchable}	
+			</if>
+			<if test="formType != null and !&quot;&quot;.equals(formType)">
+				and formType = #{formType}	
+			</if>
+			<if test="searchMethod != null and !&quot;&quot;.equals(searchMethod)">
+				and searchMethod = #{searchMethod}	
+			</if>
+			<if test="required != null and !&quot;&quot;.equals(required)">
+				and required = #{required}	
+			</if>
+			<if test="validate != null and !&quot;&quot;.equals(validate)">
+				and validate = #{validate}	
+			</if>
+			<if test="minLength != null and !&quot;&quot;.equals(minLength)">
+				and minLength = #{minLength}	
+			</if>
+			<if test="maxLength != null and !&quot;&quot;.equals(maxLength)">
+				and maxLength = #{maxLength}	
+			</if>
+			<if test="min != null and !&quot;&quot;.equals(min)">
+				and min = #{min}	
+			</if>
+			<if test="max != null and !&quot;&quot;.equals(max)">
+				and max = #{max}	
+			</if>
+			<if test="validatorType != null and !&quot;&quot;.equals(validatorType)">
+				and validatorType = #{validatorType}	
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+	<update id="delete">
+		UPDATE sys_table_field SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/TableShouyiYaopinxinxiMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.TableShouyiYaopinxinxi;
+
+
+/**
+*  Dao接口
+*/
+@DataSource("dataSourceSqlserver")
+@Repository("com.zoumaframe.dao.TableShouyiYaopinxinxiMapper")
+public interface TableShouyiYaopinxinxiMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(TableShouyiYaopinxinxi record);
+
+    TableShouyiYaopinxinxi selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TableShouyiYaopinxinxi record);
+
+    List<TableShouyiYaopinxinxi> queryAllTableShouyiYaopinxinxi(TableShouyiYaopinxinxi record);
+
+    List<TableShouyiYaopinxinxi> queryTableShouyiYaopinxinxiByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    TableShouyiYaopinxinxi queryTableShouyiYaopinxinxi(TableShouyiYaopinxinxi record);
+
+    List<TableShouyiYaopinxinxi> query(TableShouyiYaopinxinxi record);
+}
+

+ 376 - 0
src/main/java/com/izouma/awesomeadmin/dao/TableShouyiYaopinxinxiMapper.xml

@@ -0,0 +1,376 @@
+<?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.izouma.awesomeadmin.dao.TableShouyiYaopinxinxiMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.TableShouyiYaopinxinxi">
+                                    <id column="id" property="id" jdbcType="INTEGER"/>
+                                                                        <result column="药品编号" property="药品编号" jdbcType="VARCHAR"/>
+                                                            <result column="药品名称" property="药品名称" jdbcType="VARCHAR"/>
+                                                            <result column="计量单位" property="计量单位" jdbcType="VARCHAR"/>
+                                                            <result column="规格" property="规格" jdbcType="VARCHAR"/>
+                                                            <result column="主要成分" property="主要成分" jdbcType="VARCHAR"/>
+                                                            <result column="有效成分" property="有效成分" jdbcType="VARCHAR"/>
+                                                            <result column="单价" property="单价" jdbcType="DECIMAL"/>
+                                                            <result column="生产厂家" property="生产厂家" jdbcType="VARCHAR"/>
+                                                            <result column="药品制定部门" property="药品制定部门" jdbcType="VARCHAR"/>
+                                                            <result column="FlagColumn" property="flagcolumn" jdbcType="INTEGER"/>
+                        </resultMap>
+    <sql id="Base_Column_List">
+                    ID,                    药品编号,                    药品名称,                    计量单位,                    规格,                    主要成分,                    有效成分,                    单价,                    生产厂家,                    药品制定部门,                    FlagColumn            </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from Table_兽医_药品信息
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from Table_兽医_药品信息
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.TableShouyiYaopinxinxi"
+            useGeneratedKeys="true" keyProperty="id">
+        insert into Table_兽医_药品信息
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                                                                            <if test="药品编号!= null">
+                        药品编号,
+                    </if>
+                                                                <if test="药品名称!= null">
+                        药品名称,
+                    </if>
+                                                                <if test="计量单位!= null">
+                        计量单位,
+                    </if>
+                                                                <if test="规格!= null">
+                        规格,
+                    </if>
+                                                                <if test="主要成分!= null">
+                        主要成分,
+                    </if>
+                                                                <if test="有效成分!= null">
+                        有效成分,
+                    </if>
+                                                                <if test="单价!= null">
+                        单价,
+                    </if>
+                                                                <if test="生产厂家!= null">
+                        生产厂家,
+                    </if>
+                                                                <if test="药品制定部门!= null">
+                        药品制定部门,
+                    </if>
+                                                                <if test="flagcolumn!= null">
+                        FlagColumn,
+                    </if>
+                                    </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                                                                            <if test="药品编号 != null">
+                        #{药品编号,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="药品名称 != null">
+                        #{药品名称,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="计量单位 != null">
+                        #{计量单位,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="规格 != null">
+                        #{规格,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="主要成分 != null">
+                        #{主要成分,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="有效成分 != null">
+                        #{有效成分,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="单价 != null">
+                        #{单价,jdbcType=DECIMAL},
+                    </if>
+                                                                <if test="生产厂家 != null">
+                        #{生产厂家,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="药品制定部门 != null">
+                        #{药品制定部门,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="flagcolumn != null">
+                        #{flagcolumn,jdbcType=INTEGER},
+                    </if>
+                                    </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.TableShouyiYaopinxinxi">
+        update Table_兽医_药品信息
+        <set>
+                                                                            <if test="药品编号 != null">
+                        药品编号= #{药品编号,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="药品名称 != null">
+                        药品名称= #{药品名称,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="计量单位 != null">
+                        计量单位= #{计量单位,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="规格 != null">
+                        规格= #{规格,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="主要成分 != null">
+                        主要成分= #{主要成分,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="有效成分 != null">
+                        有效成分= #{有效成分,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="单价 != null">
+                        单价= #{单价,jdbcType=DECIMAL},
+                    </if>
+                                                                <if test="生产厂家 != null">
+                        生产厂家= #{生产厂家,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="药品制定部门 != null">
+                        药品制定部门= #{药品制定部门,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="flagcolumn != null">
+                        FlagColumn= #{flagcolumn,jdbcType=INTEGER},
+                    </if>
+                                    </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryTableShouyiYaopinxinxiByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.TableShouyiYaopinxinxi">
+        select
+        <include refid="Base_Column_List"/>
+        from Table_兽医_药品信息
+        <where>
+            and FlagColumn = 0
+                            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                    and  ID = #{record.id}
+                </if>
+                            <if test="record.药品编号 != null and !&quot;&quot;.equals(record.药品编号)">
+                    and  药品编号 = #{record.药品编号}
+                </if>
+                            <if test="record.药品名称 != null and !&quot;&quot;.equals(record.药品名称)">
+                    and  药品名称 = #{record.药品名称}
+                </if>
+                            <if test="record.计量单位 != null and !&quot;&quot;.equals(record.计量单位)">
+                    and  计量单位 = #{record.计量单位}
+                </if>
+                            <if test="record.规格 != null and !&quot;&quot;.equals(record.规格)">
+                    and  规格 = #{record.规格}
+                </if>
+                            <if test="record.主要成分 != null and !&quot;&quot;.equals(record.主要成分)">
+                    and  主要成分 = #{record.主要成分}
+                </if>
+                            <if test="record.有效成分 != null and !&quot;&quot;.equals(record.有效成分)">
+                    and  有效成分 = #{record.有效成分}
+                </if>
+                            <if test="record.单价 != null and !&quot;&quot;.equals(record.单价)">
+                    and  单价 = #{record.单价}
+                </if>
+                            <if test="record.生产厂家 != null and !&quot;&quot;.equals(record.生产厂家)">
+                    and  生产厂家 = #{record.生产厂家}
+                </if>
+                            <if test="record.药品制定部门 != null and !&quot;&quot;.equals(record.药品制定部门)">
+                    and  药品制定部门 = #{record.药品制定部门}
+                </if>
+                            <if test="record.flagcolumn != null and !&quot;&quot;.equals(record.flagcolumn)">
+                    and  FlagColumn = #{record.flagcolumn}
+                </if>
+            
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                    OR  药品编号 LIKE concat('%',#{record.searchKey},'%')
+                                                                                                OR  药品名称 LIKE concat('%',#{record.searchKey},'%')
+                                                                                                OR  计量单位 LIKE concat('%',#{record.searchKey},'%')
+                                                                                                OR  规格 LIKE concat('%',#{record.searchKey},'%')
+                                                                                                OR  主要成分 LIKE concat('%',#{record.searchKey},'%')
+                                                                                                OR  有效成分 LIKE concat('%',#{record.searchKey},'%')
+                                                                                                OR  单价 LIKE concat('%',#{record.searchKey},'%')
+                                                                                                OR  生产厂家 LIKE concat('%',#{record.searchKey},'%')
+                                                                                                OR  药品制定部门 LIKE concat('%',#{record.searchKey},'%')
+                                                                                                OR  FlagColumn LIKE concat('%',#{record.searchKey},'%')
+                                                            </trim>
+            </if>
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllTableShouyiYaopinxinxi" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.TableShouyiYaopinxinxi">
+        select
+        <include refid="Base_Column_List"/>
+        from Table_兽医_药品信息
+        <where>
+            and FlagColumn = 0
+                            <if test="id != null and !&quot;&quot;.equals(id)">
+                    and  ID = #{id}
+                </if>
+                            <if test="药品编号 != null and !&quot;&quot;.equals(药品编号)">
+                    and  药品编号 = #{药品编号}
+                </if>
+                            <if test="药品名称 != null and !&quot;&quot;.equals(药品名称)">
+                    and  药品名称 = #{药品名称}
+                </if>
+                            <if test="计量单位 != null and !&quot;&quot;.equals(计量单位)">
+                    and  计量单位 = #{计量单位}
+                </if>
+                            <if test="规格 != null and !&quot;&quot;.equals(规格)">
+                    and  规格 = #{规格}
+                </if>
+                            <if test="主要成分 != null and !&quot;&quot;.equals(主要成分)">
+                    and  主要成分 = #{主要成分}
+                </if>
+                            <if test="有效成分 != null and !&quot;&quot;.equals(有效成分)">
+                    and  有效成分 = #{有效成分}
+                </if>
+                            <if test="单价 != null and !&quot;&quot;.equals(单价)">
+                    and  单价 = #{单价}
+                </if>
+                            <if test="生产厂家 != null and !&quot;&quot;.equals(生产厂家)">
+                    and  生产厂家 = #{生产厂家}
+                </if>
+                            <if test="药品制定部门 != null and !&quot;&quot;.equals(药品制定部门)">
+                    and  药品制定部门 = #{药品制定部门}
+                </if>
+                            <if test="flagcolumn != null and !&quot;&quot;.equals(flagcolumn)">
+                    and  FlagColumn = #{flagcolumn}
+                </if>
+            
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                    OR  药品编号 LIKE concat('%',#{searchKey},'%')
+                                                                                                OR  药品名称 LIKE concat('%',#{searchKey},'%')
+                                                                                                OR  计量单位 LIKE concat('%',#{searchKey},'%')
+                                                                                                OR  规格 LIKE concat('%',#{searchKey},'%')
+                                                                                                OR  主要成分 LIKE concat('%',#{searchKey},'%')
+                                                                                                OR  有效成分 LIKE concat('%',#{searchKey},'%')
+                                                                                                OR  单价 LIKE concat('%',#{searchKey},'%')
+                                                                                                OR  生产厂家 LIKE concat('%',#{searchKey},'%')
+                                                                                                OR  药品制定部门 LIKE concat('%',#{searchKey},'%')
+                                                                                                OR  FlagColumn LIKE concat('%',#{searchKey},'%')
+                                                            </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryTableShouyiYaopinxinxi" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.TableShouyiYaopinxinxi">
+        select top 1
+        <include refid="Base_Column_List"/>
+        from Table_兽医_药品信息
+        <where>
+            and FlagColumn = 0
+                            <if test="id != null and !&quot;&quot;.equals(id)">
+                    and ID = #{id}
+                </if>
+                            <if test="药品编号 != null and !&quot;&quot;.equals(药品编号)">
+                    and 药品编号 = #{药品编号}
+                </if>
+                            <if test="药品名称 != null and !&quot;&quot;.equals(药品名称)">
+                    and 药品名称 = #{药品名称}
+                </if>
+                            <if test="计量单位 != null and !&quot;&quot;.equals(计量单位)">
+                    and 计量单位 = #{计量单位}
+                </if>
+                            <if test="规格 != null and !&quot;&quot;.equals(规格)">
+                    and 规格 = #{规格}
+                </if>
+                            <if test="主要成分 != null and !&quot;&quot;.equals(主要成分)">
+                    and 主要成分 = #{主要成分}
+                </if>
+                            <if test="有效成分 != null and !&quot;&quot;.equals(有效成分)">
+                    and 有效成分 = #{有效成分}
+                </if>
+                            <if test="单价 != null and !&quot;&quot;.equals(单价)">
+                    and 单价 = #{单价}
+                </if>
+                            <if test="生产厂家 != null and !&quot;&quot;.equals(生产厂家)">
+                    and 生产厂家 = #{生产厂家}
+                </if>
+                            <if test="药品制定部门 != null and !&quot;&quot;.equals(药品制定部门)">
+                    and 药品制定部门 = #{药品制定部门}
+                </if>
+                            <if test="flagcolumn != null and !&quot;&quot;.equals(flagcolumn)">
+                    and FlagColumn = #{flagcolumn}
+                </if>
+            
+        </where>
+    </select>
+    <update id="delete">
+        UPDATE Table_兽医_药品信息 SET FlagColumn = 1
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TableShouyiYaopinxinxi">
+        select
+        <include refid="Base_Column_List"/>
+        from Table_兽医_药品信息
+        <where>
+            and FlagColumn = 0
+                                                                                                                                                                                                                                                                                                                                        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestAaaMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.TestAaa;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.TestAaaMapper")
+public interface TestAaaMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(TestAaa record);
+
+    TestAaa selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TestAaa record);
+
+    List<TestAaa> queryAllTestAaa(TestAaa record);
+
+    List<TestAaa> queryTestAaaByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    TestAaa queryTestAaa(TestAaa record);
+
+    List<TestAaa> query(TestAaa record);
+}
+

+ 331 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestAaaMapper.xml

@@ -0,0 +1,331 @@
+<?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.izouma.awesomeadmin.dao.TestAaaMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.TestAaa" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="test_name" property="testName" jdbcType="VARCHAR" />
+                                <result column="remark" property="remark" jdbcType="VARCHAR" />
+                                <result column="image_url" property="imageUrl" jdbcType="VARCHAR" />
+                                <result column="test_time" property="testTime" jdbcType="TIMESTAMP" />
+                                <result column="multi_select" property="multiSelect" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            test_name,
+
+            remark,
+
+            image_url,
+
+            test_time,
+
+            multi_select,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from test_aaa
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from test_aaa
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.TestAaa" useGeneratedKeys="true" keyProperty="id">
+        insert into test_aaa
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="testName!= null" >
+                test_name,
+            </if>
+                <if test="remark!= null" >
+                remark,
+            </if>
+                <if test="imageUrl!= null" >
+                image_url,
+            </if>
+                <if test="testTime!= null" >
+                test_time,
+            </if>
+                <if test="multiSelect!= null" >
+                multi_select,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="testName != null" >
+                #{testName,jdbcType=VARCHAR},
+            </if>
+                    <if test="remark != null" >
+                #{remark,jdbcType=VARCHAR},
+            </if>
+                    <if test="imageUrl != null" >
+                #{imageUrl,jdbcType=VARCHAR},
+            </if>
+                    <if test="testTime != null" >
+                #{testTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="multiSelect != null" >
+                #{multiSelect,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.TestAaa" >
+        update test_aaa
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="testName != null" >
+               test_name= #{testName,jdbcType=VARCHAR},
+            </if>
+                     <if test="remark != null" >
+               remark= #{remark,jdbcType=VARCHAR},
+            </if>
+                     <if test="imageUrl != null" >
+               image_url= #{imageUrl,jdbcType=VARCHAR},
+            </if>
+                     <if test="testTime != null" >
+               test_time= #{testTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="multiSelect != null" >
+               multi_select= #{multiSelect,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryTestAaaByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestAaa">
+        select <include refid="Base_Column_List"/> from test_aaa
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.testName != null and !&quot;&quot;.equals(record.testName)">
+                and  test_name = #{record.testName}
+            </if>
+                     <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and  remark = #{record.remark}
+            </if>
+                     <if test="record.imageUrl != null and !&quot;&quot;.equals(record.imageUrl)">
+                and  image_url = #{record.imageUrl}
+            </if>
+                     <if test="record.testTime != null and !&quot;&quot;.equals(record.testTime)">
+                and  test_time = #{record.testTime}
+            </if>
+                     <if test="record.multiSelect != null and !&quot;&quot;.equals(record.multiSelect)">
+                and  multi_select = #{record.multiSelect}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                OR  test_name LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  remark LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  image_url LIKE concat('%',#{record.searchKey},'%')
+                                                                                                                                                                     OR  multi_select LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllTestAaa" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestAaa">
+        select <include refid="Base_Column_List"/> from test_aaa
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="testName != null and !&quot;&quot;.equals(testName)">
+                and  test_name = #{testName}
+            </if>
+                    <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and  remark = #{remark}
+            </if>
+                    <if test="imageUrl != null and !&quot;&quot;.equals(imageUrl)">
+                and  image_url = #{imageUrl}
+            </if>
+                    <if test="testTime != null and !&quot;&quot;.equals(testTime)">
+                and  test_time = #{testTime}
+            </if>
+                    <if test="multiSelect != null and !&quot;&quot;.equals(multiSelect)">
+                and  multi_select = #{multiSelect}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                OR  test_name LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  remark LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  image_url LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                                                                                                                        OR  multi_select LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryTestAaa" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestAaa">
+        select <include refid="Base_Column_List"/> from test_aaa
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="testName != null and !&quot;&quot;.equals(testName)">
+                and test_name = #{testName}
+            </if>
+                     <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+                     <if test="imageUrl != null and !&quot;&quot;.equals(imageUrl)">
+                and image_url = #{imageUrl}
+            </if>
+                     <if test="testTime != null and !&quot;&quot;.equals(testTime)">
+                and test_time = #{testTime}
+            </if>
+                     <if test="multiSelect != null and !&quot;&quot;.equals(multiSelect)">
+                and multi_select = #{multiSelect}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE test_aaa SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestAaa">
+        select <include refid="Base_Column_List"/> from test_aaa
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestBbbCopyMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.TestBbbCopy;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.TestBbbCopyMapper")
+public interface TestBbbCopyMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(TestBbbCopy record);
+
+    TestBbbCopy selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TestBbbCopy record);
+
+    List<TestBbbCopy> queryAllTestBbbCopy(TestBbbCopy record);
+
+    List<TestBbbCopy> queryTestBbbCopyByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    TestBbbCopy queryTestBbbCopy(TestBbbCopy record);
+
+    List<TestBbbCopy> query(TestBbbCopy record);
+}
+

+ 237 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestBbbCopyMapper.xml

@@ -0,0 +1,237 @@
+<?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.izouma.awesomeadmin.dao.TestBbbCopyMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.TestBbbCopy" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="name_aaa" property="nameAaa" jdbcType="VARCHAR" />
+                                <result column="name_bbb" property="nameBbb" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            name_aaa,
+
+            name_bbb,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from test_bbb_copy
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from test_bbb_copy
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.TestBbbCopy" useGeneratedKeys="true" keyProperty="id">
+        insert into test_bbb_copy
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="nameAaa!= null" >
+                name_aaa,
+            </if>
+                <if test="nameBbb!= null" >
+                name_bbb,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="nameAaa != null" >
+                #{nameAaa,jdbcType=VARCHAR},
+            </if>
+                    <if test="nameBbb != null" >
+                #{nameBbb,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.TestBbbCopy" >
+        update test_bbb_copy
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="nameAaa != null" >
+               name_aaa= #{nameAaa,jdbcType=VARCHAR},
+            </if>
+                     <if test="nameBbb != null" >
+               name_bbb= #{nameBbb,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryTestBbbCopyByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestBbbCopy">
+        select <include refid="Base_Column_List"/> from test_bbb_copy
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.nameAaa != null and !&quot;&quot;.equals(record.nameAaa)">
+                and  name_aaa = #{record.nameAaa}
+            </if>
+                     <if test="record.nameBbb != null and !&quot;&quot;.equals(record.nameBbb)">
+                and  name_bbb = #{record.nameBbb}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                               OR  del_flag LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  name_aaa LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  name_bbb LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllTestBbbCopy" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestBbbCopy">
+        select <include refid="Base_Column_List"/> from test_bbb_copy
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="nameAaa != null and !&quot;&quot;.equals(nameAaa)">
+                and  name_aaa = #{nameAaa}
+            </if>
+                    <if test="nameBbb != null and !&quot;&quot;.equals(nameBbb)">
+                and  name_bbb = #{nameBbb}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                OR  del_flag LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  name_aaa LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  name_bbb LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryTestBbbCopy" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestBbbCopy">
+        select <include refid="Base_Column_List"/> from test_bbb_copy
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="nameAaa != null and !&quot;&quot;.equals(nameAaa)">
+                and name_aaa = #{nameAaa}
+            </if>
+                     <if test="nameBbb != null and !&quot;&quot;.equals(nameBbb)">
+                and name_bbb = #{nameBbb}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE test_bbb_copy SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestBbbCopy">
+        select <include refid="Base_Column_List"/> from test_bbb_copy
+        <where>
+            and del_flag = 'N'
+                                                                                                                                    </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestBbbMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.TestBbb;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.TestBbbMapper")
+public interface TestBbbMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(TestBbb record);
+
+    TestBbb selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TestBbb record);
+
+    List<TestBbb> queryAllTestBbb(TestBbb record);
+
+    List<TestBbb> queryTestBbbByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    TestBbb queryTestBbb(TestBbb record);
+
+    List<TestBbb> query(TestBbb record);
+}
+

+ 281 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestBbbMapper.xml

@@ -0,0 +1,281 @@
+<?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.izouma.awesomeadmin.dao.TestBbbMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.TestBbb" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="name_aaa" property="nameAaa" jdbcType="VARCHAR" />
+                                <result column="name_bbb" property="nameBbb" jdbcType="VARCHAR" />
+                                <result column="name_ccc" property="nameCcc" jdbcType="VARCHAR" />
+                                <result column="name_ddd" property="nameDdd" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            name_aaa,
+
+            name_bbb,
+
+            name_ccc,
+
+            name_ddd,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from test_bbb
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from test_bbb
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.TestBbb" useGeneratedKeys="true" keyProperty="id">
+        insert into test_bbb
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="nameAaa!= null" >
+                name_aaa,
+            </if>
+                <if test="nameBbb!= null" >
+                name_bbb,
+            </if>
+                <if test="nameCcc!= null" >
+                name_ccc,
+            </if>
+                <if test="nameDdd!= null" >
+                name_ddd,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="nameAaa != null" >
+                #{nameAaa,jdbcType=VARCHAR},
+            </if>
+                    <if test="nameBbb != null" >
+                #{nameBbb,jdbcType=VARCHAR},
+            </if>
+                    <if test="nameCcc != null" >
+                #{nameCcc,jdbcType=VARCHAR},
+            </if>
+                    <if test="nameDdd != null" >
+                #{nameDdd,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.TestBbb" >
+        update test_bbb
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="nameAaa != null" >
+               name_aaa= #{nameAaa,jdbcType=VARCHAR},
+            </if>
+                     <if test="nameBbb != null" >
+               name_bbb= #{nameBbb,jdbcType=VARCHAR},
+            </if>
+                     <if test="nameCcc != null" >
+               name_ccc= #{nameCcc,jdbcType=VARCHAR},
+            </if>
+                     <if test="nameDdd != null" >
+               name_ddd= #{nameDdd,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryTestBbbByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestBbb">
+        select <include refid="Base_Column_List"/> from test_bbb
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.nameAaa != null and !&quot;&quot;.equals(record.nameAaa)">
+                and  name_aaa = #{record.nameAaa}
+            </if>
+                     <if test="record.nameBbb != null and !&quot;&quot;.equals(record.nameBbb)">
+                and  name_bbb = #{record.nameBbb}
+            </if>
+                     <if test="record.nameCcc != null and !&quot;&quot;.equals(record.nameCcc)">
+                and  name_ccc = #{record.nameCcc}
+            </if>
+                     <if test="record.nameDdd != null and !&quot;&quot;.equals(record.nameDdd)">
+                and  name_ddd = #{record.nameDdd}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                OR  name_aaa LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  name_bbb LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  name_ccc LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  name_ddd LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllTestBbb" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestBbb">
+        select <include refid="Base_Column_List"/> from test_bbb
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="nameAaa != null and !&quot;&quot;.equals(nameAaa)">
+                and  name_aaa = #{nameAaa}
+            </if>
+                    <if test="nameBbb != null and !&quot;&quot;.equals(nameBbb)">
+                and  name_bbb = #{nameBbb}
+            </if>
+                    <if test="nameCcc != null and !&quot;&quot;.equals(nameCcc)">
+                and  name_ccc = #{nameCcc}
+            </if>
+                    <if test="nameDdd != null and !&quot;&quot;.equals(nameDdd)">
+                and  name_ddd = #{nameDdd}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                OR  name_aaa LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  name_bbb LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  name_ccc LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  name_ddd LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryTestBbb" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestBbb">
+        select <include refid="Base_Column_List"/> from test_bbb
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="nameAaa != null and !&quot;&quot;.equals(nameAaa)">
+                and name_aaa = #{nameAaa}
+            </if>
+                     <if test="nameBbb != null and !&quot;&quot;.equals(nameBbb)">
+                and name_bbb = #{nameBbb}
+            </if>
+                     <if test="nameCcc != null and !&quot;&quot;.equals(nameCcc)">
+                and name_ccc = #{nameCcc}
+            </if>
+                     <if test="nameDdd != null and !&quot;&quot;.equals(nameDdd)">
+                and name_ddd = #{nameDdd}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE test_bbb SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestBbb">
+        select <include refid="Base_Column_List"/> from test_bbb
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestDeployMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.TestDeploy;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.TestDeployMapper")
+public interface TestDeployMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(TestDeploy record);
+
+    TestDeploy selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TestDeploy record);
+
+    List<TestDeploy> queryAllTestDeploy(TestDeploy record);
+
+    List<TestDeploy> queryTestDeployByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    TestDeploy queryTestDeploy(TestDeploy record);
+
+    List<TestDeploy> query(TestDeploy record);
+}
+

+ 212 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestDeployMapper.xml

@@ -0,0 +1,212 @@
+<?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.izouma.awesomeadmin.dao.TestDeployMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.TestDeploy" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+        <result column="name" property="name" jdbcType="VARCHAR" />
+    </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+        id,
+
+        del_flag,
+
+        name,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from test_deploy
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from test_deploy
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.TestDeploy" useGeneratedKeys="true" keyProperty="id">
+        insert into test_deploy
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="id!= null" >
+                id,
+            </if>
+            <if test="delFlag!= null" >
+                del_flag,
+            </if>
+            <if test="name!= null" >
+                name,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="name != null" >
+                #{name,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.TestDeploy" >
+        update test_deploy
+        <set >
+            <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="name != null" >
+               name= #{name,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryTestDeployByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestDeploy">
+        select <include refid="Base_Column_List"/> from test_deploy
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+            <if test="record.name != null and !&quot;&quot;.equals(record.name)">
+                and  name = #{record.name}
+            </if>
+         <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                 OR  name LIKE concat('%',#{record.searchKey},'%')
+             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllTestDeploy" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestDeploy">
+        select <include refid="Base_Column_List"/> from test_deploy
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and  name = #{name}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                            OR  name LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryTestDeploy" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestDeploy">
+        select <include refid="Base_Column_List"/> from test_deploy
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE test_deploy SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestDeploy">
+        select <include refid="Base_Column_List"/> from test_deploy
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestSqlserverAaaMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.TestSqlserverAaa;
+
+
+/**
+*  Dao接口
+*/
+@DataSource("dataSourceSqlserver")
+@Repository("com.zoumaframe.dao.TestSqlserverAaaMapper")
+public interface TestSqlserverAaaMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(TestSqlserverAaa record);
+
+    TestSqlserverAaa selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TestSqlserverAaa record);
+
+    List<TestSqlserverAaa> queryAllTestSqlserverAaa(TestSqlserverAaa record);
+
+    List<TestSqlserverAaa> queryTestSqlserverAaaByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    TestSqlserverAaa queryTestSqlserverAaa(TestSqlserverAaa record);
+
+    List<TestSqlserverAaa> query(TestSqlserverAaa record);
+}
+

+ 228 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestSqlserverAaaMapper.xml

@@ -0,0 +1,228 @@
+<?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.izouma.awesomeadmin.dao.TestSqlserverAaaMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.TestSqlserverAaa">
+                                    <id column="id" property="id" jdbcType="INTEGER"/>
+                                                                        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+                                                            <result column="name_aaa" property="nameAaa" jdbcType="VARCHAR"/>
+                                                            <result column="name_bbb" property="nameBbb" jdbcType="VARCHAR"/>
+                        </resultMap>
+    <sql id="Base_Column_List">
+                    id,                    del_flag,                    name_aaa,                    name_bbb            </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from test_sqlserver_aaa
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from test_sqlserver_aaa
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.TestSqlserverAaa"
+            useGeneratedKeys="true" keyProperty="id">
+        insert into test_sqlserver_aaa
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                                                                            <if test="delFlag!= null">
+                        del_flag,
+                    </if>
+                                                                <if test="nameAaa!= null">
+                        name_aaa,
+                    </if>
+                                                                <if test="nameBbb!= null">
+                        name_bbb,
+                    </if>
+                                    </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                                                                            <if test="delFlag != null">
+                        #{delFlag,jdbcType=CHAR},
+                    </if>
+                                                                <if test="nameAaa != null">
+                        #{nameAaa,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="nameBbb != null">
+                        #{nameBbb,jdbcType=VARCHAR},
+                    </if>
+                                    </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.TestSqlserverAaa">
+        update test_sqlserver_aaa
+        <set>
+                                                                            <if test="delFlag != null">
+                        del_flag= #{delFlag,jdbcType=CHAR},
+                    </if>
+                                                                <if test="nameAaa != null">
+                        name_aaa= #{nameAaa,jdbcType=VARCHAR},
+                    </if>
+                                                                <if test="nameBbb != null">
+                        name_bbb= #{nameBbb,jdbcType=VARCHAR},
+                    </if>
+                                    </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryTestSqlserverAaaByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.TestSqlserverAaa">
+        select
+        <include refid="Base_Column_List"/>
+        from test_sqlserver_aaa
+        <where>
+            and 1 = 1
+                            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                    and  id = #{record.id}
+                </if>
+                            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                    and  del_flag = #{record.delFlag}
+                </if>
+                            <if test="record.nameAaa != null and !&quot;&quot;.equals(record.nameAaa)">
+                    and  name_aaa = #{record.nameAaa}
+                </if>
+                            <if test="record.nameBbb != null and !&quot;&quot;.equals(record.nameBbb)">
+                    and  name_bbb = #{record.nameBbb}
+                </if>
+            
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                    OR  del_flag LIKE concat('%',#{record.searchKey},'%')
+                                                                                                OR  name_aaa LIKE concat('%',#{record.searchKey},'%')
+                                                                                                OR  name_bbb LIKE concat('%',#{record.searchKey},'%')
+                                                            </trim>
+            </if>
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllTestSqlserverAaa" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.TestSqlserverAaa">
+        select
+        <include refid="Base_Column_List"/>
+        from test_sqlserver_aaa
+        <where>
+            and 1 = 1
+                            <if test="id != null and !&quot;&quot;.equals(id)">
+                    and  id = #{id}
+                </if>
+                            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                    and  del_flag = #{delFlag}
+                </if>
+                            <if test="nameAaa != null and !&quot;&quot;.equals(nameAaa)">
+                    and  name_aaa = #{nameAaa}
+                </if>
+                            <if test="nameBbb != null and !&quot;&quot;.equals(nameBbb)">
+                    and  name_bbb = #{nameBbb}
+                </if>
+            
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                    OR  del_flag LIKE concat('%',#{searchKey},'%')
+                                                                                                OR  name_aaa LIKE concat('%',#{searchKey},'%')
+                                                                                                OR  name_bbb LIKE concat('%',#{searchKey},'%')
+                                                            </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryTestSqlserverAaa" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.TestSqlserverAaa">
+        select top 1
+        <include refid="Base_Column_List"/>
+        from test_sqlserver_aaa
+        <where>
+            and 1 = 1
+                            <if test="id != null and !&quot;&quot;.equals(id)">
+                    and id = #{id}
+                </if>
+                            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                    and del_flag = #{delFlag}
+                </if>
+                            <if test="nameAaa != null and !&quot;&quot;.equals(nameAaa)">
+                    and name_aaa = #{nameAaa}
+                </if>
+                            <if test="nameBbb != null and !&quot;&quot;.equals(nameBbb)">
+                    and name_bbb = #{nameBbb}
+                </if>
+            
+        </where>
+    </select>
+    <delete id="delete" >
+        delete from test_sqlserver_aaa
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestSqlserverAaa">
+        select
+        <include refid="Base_Column_List"/>
+        from test_sqlserver_aaa
+        <where>
+            and 1 = 1
+                                                                                                                                    </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestaaaoneMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.Testaaaone;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.TestaaaoneMapper")
+public interface TestaaaoneMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(Testaaaone record);
+
+    Testaaaone selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(Testaaaone record);
+
+    List<Testaaaone> queryAllTestaaaone(Testaaaone record);
+
+    List<Testaaaone> queryTestaaaoneByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    Testaaaone queryTestaaaone(Testaaaone record);
+
+    List<Testaaaone> query(Testaaaone record);
+}
+

+ 235 - 0
src/main/java/com/izouma/awesomeadmin/dao/TestaaaoneMapper.xml

@@ -0,0 +1,235 @@
+<?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.izouma.awesomeadmin.dao.TestaaaoneMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.Testaaaone" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="test_name" property="testName" jdbcType="VARCHAR" />
+                                <result column="remark" property="remark" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            test_name,
+
+            remark,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from test_aaa
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from test_aaa
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.Testaaaone" useGeneratedKeys="true" keyProperty="id">
+        insert into test_aaa
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="testName!= null" >
+                test_name,
+            </if>
+                <if test="remark!= null" >
+                remark,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="testName != null" >
+                #{testName,jdbcType=VARCHAR},
+            </if>
+                    <if test="remark != null" >
+                #{remark,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.Testaaaone" >
+        update test_aaa
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="testName != null" >
+               test_name= #{testName,jdbcType=VARCHAR},
+            </if>
+                     <if test="remark != null" >
+               remark= #{remark,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryTestaaaoneByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.Testaaaone">
+        select <include refid="Base_Column_List"/> from test_aaa
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.testName != null and !&quot;&quot;.equals(record.testName)">
+                and  test_name = #{record.testName}
+            </if>
+                     <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and  remark = #{record.remark}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                OR  test_name LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  remark LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllTestaaaone" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.Testaaaone">
+        select <include refid="Base_Column_List"/> from test_aaa
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="testName != null and !&quot;&quot;.equals(testName)">
+                and  test_name = #{testName}
+            </if>
+                    <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and  remark = #{remark}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                OR  test_name LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  remark LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryTestaaaone" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.Testaaaone">
+        select <include refid="Base_Column_List"/> from test_aaa
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="testName != null and !&quot;&quot;.equals(testName)">
+                and test_name = #{testName}
+            </if>
+                     <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE test_aaa SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.Testaaaone">
+        select <include refid="Base_Column_List"/> from test_aaa
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 39 - 0
src/main/java/com/izouma/awesomeadmin/dao/UserInfoMapper.java

@@ -0,0 +1,39 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.UserInfo;
+
+/**
+ * user_info Dao接口
+ * Tue Apr 17 10:32:49 CST 2018  Suo Chen Cheng
+ */
+@Repository("com.izouma.awesomeadmin.dao.UserInfoMapper")
+public interface UserInfoMapper {
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(UserInfo record);
+
+    UserInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(UserInfo record);
+
+    List<UserInfo> queryAllUserInfo(UserInfo record);
+
+    List<UserInfo> queryUserInfosByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    UserInfo queryUserInfo(UserInfo record);
+
+    UserInfo login(Map<String, Object> parameter);
+
+    List<String> findDepartLeader(String userId);
+
+    List<String> findUserByRoleName(String roleName);
+}
+

+ 433 - 0
src/main/java/com/izouma/awesomeadmin/dao/UserInfoMapper.xml

@@ -0,0 +1,433 @@
+<?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.izouma.awesomeadmin.dao.UserInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.UserInfo">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="username" property="username" jdbcType="VARCHAR"/>
+        <result column="nickname" property="nickname" jdbcType="VARCHAR"/>
+        <result column="password" property="password" jdbcType="VARCHAR"/>
+        <result column="icon" property="icon" jdbcType="VARCHAR"/>
+        <result column="birthday" property="birthday" jdbcType="TIMESTAMP"/>
+        <result column="sex" property="sex" jdbcType="CHAR"/>
+        <result column="open_id" property="openId" jdbcType="VARCHAR"/>
+        <result column="union_id" property="unionId" jdbcType="VARCHAR"/>
+        <result column="phone" property="phone" jdbcType="VARCHAR"/>
+        <result column="mail" property="mail" jdbcType="VARCHAR"/>
+        <result column="country" property="country" jdbcType="VARCHAR"/>
+        <result column="province" property="province" jdbcType="VARCHAR"/>
+        <result column="city" property="city" jdbcType="VARCHAR"/>
+        <result column="district" property="district" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <association property="departId" javaType="string" column="id"
+                     select="com.izouma.awesomeadmin.dao.DepartInfoMapper.getUserDepartId"/>
+        <association property="roleId" javaType="string" column="id"
+                     select="com.izouma.awesomeadmin.dao.SysRoleMapper.getUserRoleId"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        id, username, nickname, icon, birthday, sex, open_id, union_id, phone, mail, country, province, city, district, create_time, del_flag
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_user
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete
+        from sys_user
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.UserInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_user
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                id,
+            </if>
+            <if test="username != null">
+                username,
+            </if>
+            <if test="nickname != null">
+                nickname,
+            </if>
+            <if test="password != null">
+                password,
+            </if>
+            <if test="icon != null">
+                icon,
+            </if>
+            <if test="birthday != null">
+                birthday,
+            </if>
+            <if test="sex != null">
+                sex,
+            </if>
+            <if test="openId != null">
+                open_id,
+            </if>
+            <if test="unionId != null">
+                union_id,
+            </if>
+            <if test="phone != null">
+                phone,
+            </if>
+            <if test="mail != null">
+                mail,
+            </if>
+            <if test="country != null">
+                country,
+            </if>
+            <if test="province != null">
+                province,
+            </if>
+            <if test="city != null">
+                city,
+            </if>
+            <if test="district != null">
+                district,
+            </if>
+            <if test="roleId != null">
+                role_id,
+            </if>
+            <if test="createTime != null">
+                create_time,
+            </if>
+            <if test="delFlag != null">
+                del_flag,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="username != null">
+                #{username,jdbcType=VARCHAR},
+            </if>
+            <if test="nickname != null">
+                #{nickname,jdbcType=VARCHAR},
+            </if>
+            <if test="password != null">
+                #{password,jdbcType=VARCHAR},
+            </if>
+            <if test="icon != null">
+                #{icon,jdbcType=VARCHAR},
+            </if>
+            <if test="birthday != null">
+                #{birthday,jdbcType=TIMESTAMP},
+            </if>
+            <if test="sex != null">
+                #{sex,jdbcType=CHAR},
+            </if>
+            <if test="openId != null">
+                #{openId,jdbcType=VARCHAR},
+            </if>
+            <if test="unionId != null">
+                #{unionId,jdbcType=VARCHAR},
+            </if>
+            <if test="phone != null">
+                #{phone,jdbcType=VARCHAR},
+            </if>
+            <if test="mail != null">
+                #{mail,jdbcType=VARCHAR},
+            </if>
+            <if test="country != null">
+                #{country,jdbcType=VARCHAR},
+            </if>
+            <if test="province != null">
+                #{province,jdbcType=VARCHAR},
+            </if>
+            <if test="city != null">
+                #{city,jdbcType=VARCHAR},
+            </if>
+            <if test="district != null">
+                #{district,jdbcType=VARCHAR},
+            </if>
+            <if test="roleId != null">
+                #{roleId,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.UserInfo">
+        update sys_user
+        <set>
+            <if test="username != null">
+                username = #{username,jdbcType=VARCHAR},
+            </if>
+            <if test="nickname != null">
+                nickname = #{nickname,jdbcType=VARCHAR},
+            </if>
+            <if test="password != null">
+                password = #{password,jdbcType=VARCHAR},
+            </if>
+            <if test="icon != null">
+                icon = #{icon,jdbcType=VARCHAR},
+            </if>
+            <if test="birthday != null">
+                birthday = #{birthday,jdbcType=TIMESTAMP},
+            </if>
+            <if test="sex != null">
+                sex = #{sex,jdbcType=CHAR},
+            </if>
+            <if test="openId != null">
+                open_id = #{openId,jdbcType=VARCHAR},
+            </if>
+            <if test="unionId != null">
+                union_id = #{unionId,jdbcType=VARCHAR},
+            </if>
+            <if test="phone != null">
+                phone = #{phone,jdbcType=VARCHAR},
+            </if>
+            <if test="mail != null">
+                mail = #{mail,jdbcType=VARCHAR},
+            </if>
+            <if test="country != null">
+                country = #{country,jdbcType=VARCHAR},
+            </if>
+            <if test="province != null">
+                province = #{province,jdbcType=VARCHAR},
+            </if>
+            <if test="city != null">
+                city = #{city,jdbcType=VARCHAR},
+            </if>
+            <if test="district != null">
+                district = #{district,jdbcType=VARCHAR},
+            </if>
+            <if test="roleId != null">
+                role_id = #{roleId,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time = #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="delFlag != null">
+                del_flag = #{delFlag,jdbcType=CHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryUserInfosByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.UserInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_user
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.username != null and !&quot;&quot;.equals(record.username)">
+                and username = #{record.username}
+            </if>
+            <if test="record.nickname != null and !&quot;&quot;.equals(record.nickname)">
+                and nickname = #{record.nickname}
+            </if>
+            <if test="record.password != null and !&quot;&quot;.equals(record.password)">
+                and password = #{record.password}
+            </if>
+            <if test="record.icon != null and !&quot;&quot;.equals(record.icon)">
+                and icon = #{record.icon}
+            </if>
+            <if test="record.birthday != null and !&quot;&quot;.equals(record.birthday)">
+                and birthday = #{record.birthday}
+            </if>
+            <if test="record.sex != null and !&quot;&quot;.equals(record.sex)">
+                and sex = #{record.sex}
+            </if>
+            <if test="record.openId != null and !&quot;&quot;.equals(record.openId)">
+                and open_id = #{record.openId}
+            </if>
+            <if test="record.unionId != null and !&quot;&quot;.equals(record.unionId)">
+                and union_id = #{record.unionId}
+            </if>
+            <if test="record.phone != null and !&quot;&quot;.equals(record.phone)">
+                and phone = #{record.phone}
+            </if>
+            <if test="record.mail != null and !&quot;&quot;.equals(record.mail)">
+                and mail = #{record.mail}
+            </if>
+            <if test="record.country != null and !&quot;&quot;.equals(record.country)">
+                and country = #{record.country}
+            </if>
+            <if test="record.province != null and !&quot;&quot;.equals(record.province)">
+                and province = #{record.province}
+            </if>
+            <if test="record.city != null and !&quot;&quot;.equals(record.city)">
+                and city = #{record.city}
+            </if>
+            <if test="record.district != null and !&quot;&quot;.equals(record.district)">
+                and district = #{record.district}
+            </if>
+            <if test="record.roleId != null and !&quot;&quot;.equals(record.roleId)">
+                and role_id = #{record.roleId}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllUserInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.UserInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_user
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="username != null and !&quot;&quot;.equals(username)">
+                and username = #{username}
+            </if>
+            <if test="nickname != null and !&quot;&quot;.equals(nickname)">
+                and nickname = #{nickname}
+            </if>
+            <if test="password != null and !&quot;&quot;.equals(password)">
+                and password = #{password}
+            </if>
+            <if test="icon != null and !&quot;&quot;.equals(icon)">
+                and icon = #{icon}
+            </if>
+            <if test="birthday != null and !&quot;&quot;.equals(birthday)">
+                and birthday = #{birthday}
+            </if>
+            <if test="sex != null and !&quot;&quot;.equals(sex)">
+                and sex = #{sex}
+            </if>
+            <if test="openId != null and !&quot;&quot;.equals(openId)">
+                and open_id = #{openId}
+            </if>
+            <if test="unionId != null and !&quot;&quot;.equals(unionId)">
+                and union_id = #{unionId}
+            </if>
+            <if test="phone != null and !&quot;&quot;.equals(phone)">
+                and phone = #{phone}
+            </if>
+            <if test="mail != null and !&quot;&quot;.equals(mail)">
+                and mail = #{mail}
+            </if>
+            <if test="country != null and !&quot;&quot;.equals(country)">
+                and country = #{country}
+            </if>
+            <if test="province != null and !&quot;&quot;.equals(province)">
+                and province = #{province}
+            </if>
+            <if test="city != null and !&quot;&quot;.equals(city)">
+                and city = #{city}
+            </if>
+            <if test="district != null and !&quot;&quot;.equals(district)">
+                and district = #{district}
+            </if>
+            <if test="roleId != null and !&quot;&quot;.equals(roleId)">
+                and role_id = #{roleId}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryUserInfo" parameterType="java.util.Map" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_user
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="username != null and !&quot;&quot;.equals(username)">
+                and username = #{username}
+            </if>
+            <if test="nickname != null and !&quot;&quot;.equals(nickname)">
+                and nickname = #{nickname}
+            </if>
+            <if test="password != null and !&quot;&quot;.equals(password)">
+                and password = #{password}
+            </if>
+            <if test="icon != null and !&quot;&quot;.equals(icon)">
+                and icon = #{icon}
+            </if>
+            <if test="birthday != null and !&quot;&quot;.equals(birthday)">
+                and birthday = #{birthday}
+            </if>
+            <if test="sex != null and !&quot;&quot;.equals(sex)">
+                and sex = #{sex}
+            </if>
+            <if test="openId != null and !&quot;&quot;.equals(openId)">
+                and open_id = #{openId}
+            </if>
+            <if test="unionId != null and !&quot;&quot;.equals(unionId)">
+                and union_id = #{unionId}
+            </if>
+            <if test="phone != null and !&quot;&quot;.equals(phone)">
+                and phone = #{phone}
+            </if>
+            <if test="mail != null and !&quot;&quot;.equals(mail)">
+                and mail = #{mail}
+            </if>
+            <if test="country != null and !&quot;&quot;.equals(country)">
+                and country = #{country}
+            </if>
+            <if test="province != null and !&quot;&quot;.equals(province)">
+                and province = #{province}
+            </if>
+            <if test="city != null and !&quot;&quot;.equals(city)">
+                and city = #{city}
+            </if>
+            <if test="district != null and !&quot;&quot;.equals(district)">
+                and district = #{district}
+            </if>
+            <if test="roleId != null and !&quot;&quot;.equals(roleId)">
+                and role_id = #{roleId}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+        </where>
+        LIMIT 1
+    </select>
+    <select id="login" resultMap="BaseResultMap" parameterType="java.util.Map">
+        SELECT
+        <include refid="Base_Column_List"/>
+        from sys_user
+        WHERE username = #{username} AND password = #{password} AND del_flag = 'N'
+    </select>
+    <select id="findDepartLeader" resultType="java.lang.String">
+        SELECT *
+        FROM (SELECT user_id, GROUP_CONCAT(depart_id ORDER BY depart_id) AS depart_id
+              FROM sys_user_depart
+              GROUP BY user_id) AS tmp
+                 LEFT JOIN sys_user_role ON tmp.user_id = sys_user_role.user_id
+        WHERE tmp.depart_id =
+              (SELECT GROUP_CONCAT(depart_id ORDER BY depart_id) FROM sys_user_depart WHERE user_id = #{userId})
+          AND role_id = 9
+    </select>
+    <select id="findUserByRoleName" resultType="java.lang.String">
+        SELECT user_id
+        FROM sys_user_role
+        WHERE FIND_IN_SET((SELECT id FROM sys_role WHERE enname = #{roleName}
+                                                     AND sys_role.del_flag = 'N'), role_id)
+    </select>
+    <update id="delete">
+        UPDATE sys_user SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+</mapper>
+

+ 23 - 0
src/main/java/com/izouma/awesomeadmin/datasource/DataService.java

@@ -0,0 +1,23 @@
+package com.izouma.awesomeadmin.datasource;
+
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.SqlServerTest;
+import com.izouma.awesomeadmin.model.SuperUser;
+import com.izouma.awesomeadmin.model.Zouma;
+
+import java.util.List;
+
+public interface DataService {
+
+    /**
+     * <p>获取所有用户记录。</p>
+     *
+     * @return tblUser list
+     */
+    List<SuperUser> getSuperUserList();
+
+    List<Zouma> getZoumaList();
+
+    List<SqlServerTest> getSqlServerTestByPage(Page page);
+
+}

+ 44 - 0
src/main/java/com/izouma/awesomeadmin/datasource/DataServiceImpl.java

@@ -0,0 +1,44 @@
+package com.izouma.awesomeadmin.datasource;
+
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dao.DataMapper;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.SqlServerTest;
+import com.izouma.awesomeadmin.model.SuperUser;
+import com.izouma.awesomeadmin.model.Zouma;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+// 默认DataServiceImpl下的所有方法均访问数据源1
+
+public class DataServiceImpl implements DataService {
+
+    @Autowired
+    private DataMapper dataMapper;
+
+    @Override
+    public List<SuperUser> getSuperUserList() {
+
+        return dataMapper.queryAllUsers();
+    }
+
+    @Override
+    public List<Zouma> getZoumaList() {
+        return dataMapper.queryZouma();
+    }
+
+    @Override
+
+    public List<SqlServerTest> getSqlServerTestByPage(Page page) {
+        Map<String, Object> parameter = new HashMap<String, Object>();
+        parameter.put(AppConstant.PAGE, page);
+
+        return dataMapper.getSqlServerTestByPage(parameter);
+    }
+
+}

+ 14 - 0
src/main/java/com/izouma/awesomeadmin/datasource/DataSource.java

@@ -0,0 +1,14 @@
+package com.izouma.awesomeadmin.datasource;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+public @interface DataSource {
+    String value();
+}

+ 67 - 0
src/main/java/com/izouma/awesomeadmin/datasource/DataSourceAspect.java

@@ -0,0 +1,67 @@
+package com.izouma.awesomeadmin.datasource;
+
+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.stereotype.Component;
+
+import java.lang.reflect.Method;
+
+@Component
+@Aspect
+public class DataSourceAspect {
+
+    @Pointcut("execution(public * com.izouma.awesomeadmin.dao..*(..)))")
+    public void pointcut() {
+    }
+
+
+    /**
+     * 拦截目标方法,获取由@DataSource指定的数据源标识,设置到线程存储中以便切换数据源
+     *
+     * @param point
+     * @throws Exception
+     */
+    @Before(value = "pointcut()")
+    public void intercept(JoinPoint point) {
+        //默认使用默认datasource
+        DynamicDataSourceHolder.setDataSource("dataSource");
+
+        Class<?> target = point.getTarget().getClass();
+        MethodSignature signature = (MethodSignature) point.getSignature();
+        // 默认使用目标类型的注解,如果没有则使用其实现接口的注解
+        for (Class<?> clazz : target.getInterfaces()) {
+            resolveDataSource(clazz, signature.getMethod());
+        }
+        resolveDataSource(target, signature.getMethod());
+    }
+
+    /**
+     * 提取目标对象方法注解和类型注解中的数据源标识
+     *
+     * @param clazz
+     * @param method
+     */
+    private void resolveDataSource(Class<?> clazz, Method method) {
+        try {
+
+            Class<?>[] types = method.getParameterTypes();
+            // 默认使用类型注解
+            if (clazz.isAnnotationPresent(DataSource.class)) {
+                DataSource source = clazz.getAnnotation(DataSource.class);
+                DynamicDataSourceHolder.setDataSource(source.value());
+            }
+            // 方法注解可以覆盖类型注解
+            Method m = clazz.getMethod(method.getName(), types);
+            if (m != null && m.isAnnotationPresent(DataSource.class)) {
+                DataSource source = m.getAnnotation(DataSource.class);
+                DynamicDataSourceHolder.setDataSource(source.value());
+            }
+        } catch (Exception e) {
+            System.out.println(clazz + ":" + e.getMessage());
+        }
+    }
+
+}

+ 79 - 0
src/main/java/com/izouma/awesomeadmin/datasource/DynamicDataSource.java

@@ -0,0 +1,79 @@
+package com.izouma.awesomeadmin.datasource;
+
+import com.izouma.awesomeadmin.model.DataSourceInfo;
+import com.izouma.awesomeadmin.util.Const;
+import org.apache.commons.dbcp.BasicDataSource;
+import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
+
+import javax.sql.DataSource;
+import java.util.HashMap;
+import java.util.Map;
+
+public class DynamicDataSource extends AbstractRoutingDataSource {
+    private static final Map targetDataSource = new HashMap<>();
+    protected DataSource masterDataSource;
+
+
+    @Override
+    protected DataSource determineTargetDataSource() {
+        // 根据数据库选择方案,拿到要访问的数据库
+        String dataSourceName = determineCurrentLookupKey();
+        if (!dataSourceName.equals("dataSource")) {
+            DataSource datasource = (DataSource) targetDataSource.get(DynamicDataSourceHolder.getDataSource());
+            if (datasource == null) {
+                datasource = createDataSource(DynamicDataSourceHolder.getDataSource());
+                targetDataSource.put(DynamicDataSourceHolder.getDataSource(), datasource);
+            }
+            return datasource;
+        } else {
+            return masterDataSource;
+        }
+
+    }
+
+    @Override
+    protected String determineCurrentLookupKey() {
+        return DynamicDataSourceHolder.getDataSource();
+    }
+
+    public DataSource getMasterDataSource() {
+        return masterDataSource;
+    }
+
+    public void setMasterDataSource(DataSource masterDataSource) {
+        this.masterDataSource = masterDataSource;
+    }
+
+    //创建数据源
+    private BasicDataSource createDataSource(String datasource) {
+
+        // 查询所需信息
+        DataSourceInfo dataSourceInfo = Const.DataSourceInfoMap.get(datasource);
+
+        if (dataSourceInfo != null) {
+
+            if ("Mysql".equals(dataSourceInfo.getDatabaseType())) {
+                return createDataSource("com.mysql.jdbc.Driver", "jdbc:mysql://" + dataSourceInfo.getUrl() + "/" + dataSourceInfo.getDatabaseName(), dataSourceInfo.getUsername(), dataSourceInfo.getPassword());
+            } else if ("SqlServer".equals(dataSourceInfo.getDatabaseType())) {
+
+                return createDataSource("com.microsoft.sqlserver.jdbc.SQLServerDriver", "jdbc:sqlserver://" + dataSourceInfo.getUrl() + ";DatabaseName=" + dataSourceInfo.getDatabaseName(), dataSourceInfo.getUsername(), dataSourceInfo.getPassword());
+            }
+
+        }
+        return null;
+    }
+
+    //创建数据源
+    private BasicDataSource createDataSource(String driverClassName, String url,
+                                             String username, String password) {
+        BasicDataSource dataSource = new BasicDataSource();
+        dataSource.setDriverClassName(driverClassName);
+        dataSource.setUrl(url);
+        dataSource.setUsername(username);
+        dataSource.setPassword(password);
+        dataSource.setTestWhileIdle(true);
+
+        return dataSource;
+    }
+
+}

+ 20 - 0
src/main/java/com/izouma/awesomeadmin/datasource/DynamicDataSourceHolder.java

@@ -0,0 +1,20 @@
+package com.izouma.awesomeadmin.datasource;
+
+public class DynamicDataSourceHolder {
+    /**
+     * 注意:数据源标识保存在线程变量中,避免多线程操作数据源时互相干扰
+     */
+    private static final ThreadLocal<String> THREAD_DATA_SOURCE = new ThreadLocal<String>();
+
+    public static String getDataSource() {
+        return THREAD_DATA_SOURCE.get();
+    }
+
+    public static void setDataSource(String dataSource) {
+        THREAD_DATA_SOURCE.set(dataSource);
+    }
+
+    public static void clearDataSource() {
+        THREAD_DATA_SOURCE.remove();
+    }
+}

+ 144 - 0
src/main/java/com/izouma/awesomeadmin/dto/Page.java

@@ -0,0 +1,144 @@
+package com.izouma.awesomeadmin.dto;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * 分页对应的实体类
+ */
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class Page {
+
+    private static int DEFAULT_PAGE_SIZE = 20;
+
+    /**
+     * 总条数
+     */
+    private int        totalNumber;
+
+    /**
+     * 当前第几页
+     */
+    private int        currentPage;
+
+    /**
+     * 总页数
+     */
+    private int        totalPage;
+
+    /**
+     * 每页显示条数
+     */
+    private int        pageNumber        = DEFAULT_PAGE_SIZE;
+
+    /**
+     * 数据库中limit的参数,从第几条开始取
+     */
+    private int        dbIndex;
+
+    /**
+     * 数据库中limit的参数,一共取多少条
+     */
+    private int        dbNumber;
+
+
+    /**
+     * 根据当前对象中属性值计算并设置相关属性值
+     */
+    public void count() {
+
+        // 计算总页数
+        int totalPageTemp = this.totalNumber / this.pageNumber;
+        int plus = (this.totalNumber % this.pageNumber) == 0 ? 0 : 1;
+        totalPageTemp = totalPageTemp + plus;
+        if (totalPageTemp <= 0) {
+            totalPageTemp = 1;
+        }
+        this.totalPage = totalPageTemp;
+
+        // 设置当前页数
+        // 当前页数小于1设置为1
+        if (this.currentPage < 1) {
+            this.currentPage = 1;
+        }
+
+        // 设置limit的参数
+        this.dbIndex = (this.currentPage - 1) * this.pageNumber;
+        this.dbNumber = this.pageNumber;
+    }
+
+
+    public int getTotalNumber() {
+
+        return totalNumber;
+    }
+
+
+    public void setTotalNumber(int totalNumber) {
+
+        this.totalNumber = totalNumber;
+        //记录总条数时进行操作
+        this.count();
+    }
+
+
+    public int getCurrentPage() {
+
+        return currentPage;
+    }
+
+
+    public void setCurrentPage(int currentPage) {
+
+        this.currentPage = currentPage;
+    }
+
+
+    public int getTotalPage() {
+
+        return totalPage;
+    }
+
+
+    public void setTotalPage(int totalPage) {
+
+        this.totalPage = totalPage;
+    }
+
+
+    public int getPageNumber() {
+
+        return pageNumber;
+    }
+
+
+    public void setPageNumber(int pageNumber) {
+
+        this.pageNumber = pageNumber;
+    }
+
+
+    public int getDbIndex() {
+
+        return dbIndex;
+    }
+
+
+    public void setDbIndex(int dbIndex) {
+
+        this.dbIndex = dbIndex;
+    }
+
+
+    public int getDbNumber() {
+
+        return dbNumber;
+    }
+
+
+    public void setDbNumber(int dbNumber) {
+
+        this.dbNumber = dbNumber;
+    }
+}

+ 70 - 0
src/main/java/com/izouma/awesomeadmin/dto/Result.java

@@ -0,0 +1,70 @@
+package com.izouma.awesomeadmin.dto;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * <p>封装json返回类型。</p>
+ *
+ * @author 姓名 <br />
+ * 更新履历 <br />
+ * 日期 : 姓名: 更新内容<br />
+ * @version 1.0
+ */
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class Result {
+
+    private boolean success;
+
+    private Object data;
+
+    private String error;
+
+
+    public Result(boolean success, Object data) {
+
+        this.success = success;
+        if (!success) {
+            this.error = data.toString();
+        } else {
+            this.data = data;
+        }
+    }
+
+    public boolean isSuccess() {
+
+        return success;
+    }
+
+
+    public void setSuccess(boolean success) {
+
+        this.success = success;
+    }
+
+
+    public Object getData() {
+
+        return data;
+    }
+
+
+    public void setData(Object data) {
+
+        this.data = data;
+    }
+
+
+    public String getError() {
+
+        return error;
+    }
+
+
+    public void setError(String error) {
+
+        this.error = error;
+    }
+
+}

+ 87 - 0
src/main/java/com/izouma/awesomeadmin/dto/TreeNode.java

@@ -0,0 +1,87 @@
+package com.izouma.awesomeadmin.dto;
+
+import java.util.List;
+
+public class TreeNode {
+
+    private String id;
+
+    private String parentId;
+
+    private String name;
+
+    private List<TreeNode> children;
+
+    private Object extra;
+
+    public Object getExtra() {
+        return extra;
+    }
+
+    public void setExtra(Object extra) {
+        this.extra = extra;
+    }
+
+    public TreeNode(String id, String name, String parentId) {
+        this.id = id;
+        this.parentId = parentId;
+        this.name = name;
+    }
+
+    public TreeNode(String id, String name, String parentId, Object extra) {
+        this.id = id;
+        this.parentId = parentId;
+        this.name = name;
+        this.extra = extra;
+    }
+
+    public TreeNode(String id, String name, TreeNode parent) {
+        this.id = id;
+        this.parentId = parent.getId();
+        this.name = name;
+    }
+
+
+    public String getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(String parentId) {
+        this.parentId = parentId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public List<TreeNode> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<TreeNode> children) {
+        this.children = children;
+    }
+
+    @Override
+    public String toString() {
+        return "TreeNode{" +
+                "id='" + id + '\'' +
+                ", parentId='" + parentId + '\'' +
+                ", name='" + name + '\'' +
+                ", children=" + children +
+                '}';
+    }
+
+}  

+ 32 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/AccessToken.java

@@ -0,0 +1,32 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+public class AccessToken {
+
+    private String token;
+
+    private int    expiresIn;
+
+
+    public String getToken() {
+
+        return token;
+    }
+
+
+    public void setToken(String token) {
+
+        this.token = token;
+    }
+
+
+    public int getExpiresIn() {
+
+        return expiresIn;
+    }
+
+
+    public void setExpiresIn(int expiresIn) {
+
+        this.expiresIn = expiresIn;
+    }
+}

+ 69 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/BaseMessage.java

@@ -0,0 +1,69 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+/**
+ * ��Ϣ����
+ * @author Stephen
+ *
+ */
+public class BaseMessage {
+
+    //���շ�΢�ź�
+    private String ToUserName;
+
+    //���ͷ�΢�ź�
+    private String FromUserName;
+
+    //����ʱ��
+    private long   CreateTime;
+
+    //��Ϣ����
+    private String MsgType;
+
+
+    public String getToUserName() {
+
+        return ToUserName;
+    }
+
+
+    public void setToUserName(String toUserName) {
+
+        ToUserName = toUserName;
+    }
+
+
+    public String getFromUserName() {
+
+        return FromUserName;
+    }
+
+
+    public void setFromUserName(String fromUserName) {
+
+        FromUserName = fromUserName;
+    }
+
+
+    public long getCreateTime() {
+
+        return CreateTime;
+    }
+
+
+    public void setCreateTime(long createTime) {
+
+        CreateTime = createTime;
+    }
+
+
+    public String getMsgType() {
+
+        return MsgType;
+    }
+
+
+    public void setMsgType(String msgType) {
+
+        MsgType = msgType;
+    }
+}

+ 54 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/CustomServiceMessage.java

@@ -0,0 +1,54 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class CustomServiceMessage {
+	
+	private String touser;
+	
+	private String msgtype;
+	
+	private TextMessage text;
+	
+	private NewsMessage news;
+
+	public String getTouser() {
+		return touser;
+	}
+
+	
+	public NewsMessage getNews() {
+		return news;
+	}
+
+
+	public void setNews(NewsMessage news) {
+		this.news = news;
+	}
+
+
+	public void setTouser(String touser) {
+		this.touser = touser;
+	}
+
+	public String getMsgtype() {
+		return msgtype;
+	}
+
+	public void setMsgtype(String msgtype) {
+		this.msgtype = msgtype;
+	}
+
+	public TextMessage getText() {
+		return text;
+	}
+
+	public void setText(TextMessage text) {
+		this.text = text;
+	}
+
+	
+}

+ 18 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/Image.java

@@ -0,0 +1,18 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+public class Image {
+
+    private String MediaId;
+
+
+    public String getMediaId() {
+
+        return MediaId;
+    }
+
+
+    public void setMediaId(String mediaId) {
+
+        MediaId = mediaId;
+    }
+}

+ 18 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/ImageMessage.java

@@ -0,0 +1,18 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+public class ImageMessage extends BaseMessage {
+
+    private Image Image;
+
+
+    public Image getImage() {
+
+        return Image;
+    }
+
+
+    public void setImage(Image image) {
+
+        Image = image;
+    }
+}

+ 74 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/Music.java

@@ -0,0 +1,74 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+public class Music {
+
+    private String Title;
+
+    private String Description;
+
+    private String MusicUrl;
+
+    private String HQMusicUrl;
+
+    private String ThumbMediaId;
+
+
+    public String getTitle() {
+
+        return Title;
+    }
+
+
+    public void setTitle(String title) {
+
+        Title = title;
+    }
+
+
+    public String getDescription() {
+
+        return Description;
+    }
+
+
+    public void setDescription(String description) {
+
+        Description = description;
+    }
+
+
+    public String getMusicUrl() {
+
+        return MusicUrl;
+    }
+
+
+    public void setMusicUrl(String musicUrl) {
+
+        MusicUrl = musicUrl;
+    }
+
+
+    public String getHQMusicUrl() {
+
+        return HQMusicUrl;
+    }
+
+
+    public void setHQMusicUrl(String hQMusicUrl) {
+
+        HQMusicUrl = hQMusicUrl;
+    }
+
+
+    public String getThumbMediaId() {
+
+        return ThumbMediaId;
+    }
+
+
+    public void setThumbMediaId(String thumbMediaId) {
+
+        ThumbMediaId = thumbMediaId;
+    }
+}

+ 18 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/MusicMessage.java

@@ -0,0 +1,18 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+public class MusicMessage extends BaseMessage {
+
+    private Music Music;
+
+
+    public Music getMusic() {
+
+        return Music;
+    }
+
+
+    public void setMusic(Music music) {
+
+        Music = music;
+    }
+}

+ 58 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/News.java

@@ -0,0 +1,58 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+public class News {
+
+    private String Title;
+
+    private String Description;
+
+    private String Picurl;
+
+    private String Url;
+
+
+    public String getTitle() {
+
+        return Title;
+    }
+
+
+    public void setTitle(String title) {
+
+        Title = title;
+    }
+
+
+    public String getDescription() {
+
+        return Description;
+    }
+
+
+    public void setDescription(String description) {
+
+        Description = description;
+    }
+
+
+    public String getPicurl() {
+		return Picurl;
+	}
+
+
+	public void setPicurl(String picurl) {
+		Picurl = picurl;
+	}
+
+
+	public String getUrl() {
+
+        return Url;
+    }
+
+
+    public void setUrl(String url) {
+
+        Url = url;
+    }
+}

+ 25 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/NewsMessage.java

@@ -0,0 +1,25 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class NewsMessage {
+
+    private List <News> Articles;
+
+
+    public List <News> getArticles() {
+
+        return Articles;
+    }
+
+
+    public void setArticles(List <News> articles) {
+
+        Articles = articles;
+    }
+}

+ 24 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/TemplateData.java

@@ -0,0 +1,24 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+public class TemplateData {
+
+    private String value;  
+    private String color;  
+  
+    public String getValue() {  
+        return value;  
+    }  
+  
+    public void setValue(String value) {  
+        this.value = value;  
+    }  
+  
+    public String getColor() {  
+        return color;  
+    }  
+  
+    public void setColor(String color) {  
+        this.color = color;  
+    }  
+	
+}

+ 47 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/TemplateMessage.java

@@ -0,0 +1,47 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+import java.util.Map;
+
+public class TemplateMessage {
+	
+	 private String touser;  
+	  
+	    private String template_id;  
+	  
+	    private String url;  
+	  
+	    private Map<String, TemplateData> data;  
+	  
+	    public String getTouser() {  
+	        return touser;  
+	    }  
+	  
+	    public void setTouser(String touser) {  
+	        this.touser = touser;  
+	    }  
+	  
+	    public String getTemplate_id() {  
+	        return template_id;  
+	    }  
+	  
+	    public void setTemplate_id(String template_id) {  
+	        this.template_id = template_id;  
+	    }  
+	  
+	    public String getUrl() {  
+	        return url;  
+	    }  
+	  
+	    public void setUrl(String url) {  
+	        this.url = url;  
+	    }  
+	  
+	    public Map<String, TemplateData> getData() {  
+	        return data;  
+	    }  
+	  
+	    public void setData(Map<String, TemplateData> data) {  
+	        this.data = data;  
+	    }  
+
+}

+ 37 - 0
src/main/java/com/izouma/awesomeadmin/dto/wx/TextMessage.java

@@ -0,0 +1,37 @@
+package com.izouma.awesomeadmin.dto.wx;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class TextMessage extends BaseMessage {
+
+    private String Content;
+
+    private String MsgId;
+
+
+    public String getContent() {
+
+        return Content;
+    }
+
+
+    public void setContent(String content) {
+
+        Content = content;
+    }
+
+
+    public String getMsgId() {
+
+        return MsgId;
+    }
+
+
+    public void setMsgId(String msgId) {
+
+        MsgId = msgId;
+    }
+}

+ 39 - 0
src/main/java/com/izouma/awesomeadmin/interceptor/GlobalInterceptor.java

@@ -0,0 +1,39 @@
+package com.izouma.awesomeadmin.interceptor;
+
+import com.izouma.awesomeadmin.shiro.AppToken;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.subject.Subject;
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Created by xiong on 2017/6/16.
+ */
+public class GlobalInterceptor extends HandlerInterceptorAdapter {
+
+    @Override
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+        Subject subject = SecurityUtils.getSubject();
+        if (!subject.isAuthenticated()) {
+            String token = request.getHeader("token");
+            if (StringUtils.isNotEmpty(token)) {
+                AppToken appToken = new AppToken(token);
+                try {
+                    subject.login(appToken);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        response.addHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
+        response.addHeader("Access-Control-Allow-Methods", "*");
+        response.addHeader("Access-Control-Max-Age", "100");
+        response.addHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
+        response.addHeader("Access-Control-Allow-Credentials", "true");
+        return super.preHandle(request, response, handler);
+    }
+
+}

+ 143 - 0
src/main/java/com/izouma/awesomeadmin/interceptor/PageInterceptor.java

@@ -0,0 +1,143 @@
+package com.izouma.awesomeadmin.interceptor;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.ibatis.executor.parameter.ParameterHandler;
+import org.apache.ibatis.executor.statement.StatementHandler;
+import org.apache.ibatis.mapping.BoundSql;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.plugin.Interceptor;
+import org.apache.ibatis.plugin.Intercepts;
+import org.apache.ibatis.plugin.Invocation;
+import org.apache.ibatis.plugin.Plugin;
+import org.apache.ibatis.plugin.Signature;
+import org.apache.ibatis.reflection.DefaultReflectorFactory;
+import org.apache.ibatis.reflection.MetaObject;
+import org.apache.ibatis.reflection.SystemMetaObject;
+
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+
+/**
+ * <p>分页拦截器 </p>
+ *
+ * @author 姓名 <br />
+ * 更新履历 <br />
+ * 日期 : 姓名: 更新内容<br />
+ * @version 1.0
+ */
+
+@Intercepts({@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class})})
+public class PageInterceptor implements Interceptor {
+
+    @Override
+    public Object intercept(Invocation invocation) throws Throwable {
+
+        StatementHandler statementHandler = (StatementHandler) invocation.getTarget();
+        MetaObject metaObjet = MetaObject.forObject(statementHandler, SystemMetaObject.DEFAULT_OBJECT_FACTORY,
+                SystemMetaObject.DEFAULT_OBJECT_WRAPPER_FACTORY, new DefaultReflectorFactory());
+        MappedStatement mappedStatement = (MappedStatement) metaObjet.getValue("delegate.mappedStatement");
+        //配置文件中SQL语句的ID
+        String id = mappedStatement.getId();
+        //检查以ByPage结尾的id
+        if (id.matches(".+ByPage$")) {
+            BoundSql bounSql = statementHandler.getBoundSql();
+            //原始的SQL语句
+            String sql = bounSql.getSql();
+            Connection connection = (Connection) invocation.getArgs()[0];
+
+            //默认mysql数据库
+            //查询总条数的SQL语句
+            String countSql = "select count(1) from (" + sql + ") aliasForPage";
+
+            Page page = new Page();
+            Map<?, ?> parameter = (Map<?, ?>) bounSql.getParameterObject();
+            if (parameter != null) {
+
+                page = (Page) parameter.get(AppConstant.PAGE);
+            }
+
+
+            if ("SqlServer".equals(getDataBaseType(connection))) {
+
+                String baseSql = sql;
+                if (sql.toUpperCase().lastIndexOf(" ORDER ") > 0) {
+
+                    baseSql = sql.substring(0, sql.toUpperCase().lastIndexOf("ORDER"));
+                }
+
+                countSql = "select count(1) from (" + baseSql + ") aliasForPage";
+
+            }
+
+
+            PreparedStatement countStatement = connection.prepareStatement(countSql);
+            ParameterHandler parameterHandler = (ParameterHandler) metaObjet.getValue("delegate.parameterHandler");
+            parameterHandler.setParameters(countStatement);
+            ResultSet rs = countStatement.executeQuery();
+            if (rs.next()) {
+                page.setTotalNumber(rs.getInt(1));
+            }
+
+            //改造后带分页查询的SQL语句
+            String pageSql = sql + " limit " + page.getDbIndex() + "," + page.getDbNumber();
+
+            if ("SqlServer".equals(getDataBaseType(connection))) {
+                if (sql.toUpperCase().lastIndexOf(" ORDER ") < 0) {
+                    sql += " ORDER BY 1 ";
+                }
+                //改造后带分页查询的SQL语句
+                pageSql = sql + " offset " + page.getDbIndex() + " row fetch next " + page.getDbNumber() + " row only ";
+
+            }
+
+            metaObjet.setValue("delegate.boundSql.sql", pageSql);
+
+        }
+        return invocation.proceed();
+    }
+
+
+    @Override
+    public Object plugin(Object target) {
+
+        return Plugin.wrap(target, this);
+    }
+
+
+    @Override
+    public void setProperties(Properties properties) {
+
+        // TODO Auto-generated method stub
+
+    }
+
+
+    /**
+     * 判断数据库类型
+     *
+     * @return
+     */
+    public static String getDataBaseType(Connection connection) {
+        //通过driverName是否包含关键字判断
+        try {
+            if (connection.getMetaData().getDriverName().toUpperCase()
+                    .indexOf("MYSQL") != -1) {
+                return "MySql";
+            } else if (connection.getMetaData().getDriverName().toUpperCase()
+                    .indexOf("SQL SERVER") != -1) {
+                //sqljdbc与sqljdbc4不同,sqlserver中间有空格
+                return "SqlServer";
+            }
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }
+        return "-1";
+    }
+
+}

+ 38 - 0
src/main/java/com/izouma/awesomeadmin/model/AccessToken.java

@@ -0,0 +1,38 @@
+package com.izouma.awesomeadmin.model;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class AccessToken implements Serializable {
+    private String accessToken;
+    private String timeStamp;    //序列化忽略的属性,无论该成员变量是否有值    @JsonIgnore
+    private String extraProperty;
+
+    public String getAccessToken() {
+        return accessToken;
+    }
+
+    public void setAccessToken(String accessToken) {
+        this.accessToken = accessToken;
+    }
+
+    public String getTimeStamp() {
+        return timeStamp;
+    }
+
+    public void setTimeStamp(String timeStamp) {
+        this.timeStamp = timeStamp;
+    }
+
+    public String getExtraProperty() {
+        return extraProperty;
+    }
+
+    public void setExtraProperty(String extraProperty) {
+        this.extraProperty = extraProperty;
+    }
+}

+ 100 - 0
src/main/java/com/izouma/awesomeadmin/model/CommonQuery.java

@@ -0,0 +1,100 @@
+package com.izouma.awesomeadmin.model;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class CommonQuery {
+
+    private String tableName;
+    /**
+     * and_,test_name_,like_,value_;or_,remark_,=_,123
+     */
+    private String advancedQuery;
+
+    /**
+     * column_name_,desc_;column_name_,asc
+     */
+    private String orderByStr;
+
+    private String databasetype;
+
+    private String searchKey;
+
+    /**
+     * column_name_,column_name_,column_name
+     */
+    private String searchColumn;
+
+    private String primaryKey;
+
+    private String dataSourceCode;
+
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
+
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
+
+    public String getOrderByStr() {
+        return orderByStr;
+    }
+
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
+
+    public String getDatabasetype() {
+        return databasetype;
+    }
+
+    public void setDatabasetype(String databasetype) {
+        this.databasetype = databasetype;
+    }
+
+    public String getSearchKey() {
+        return searchKey;
+    }
+
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
+
+    public String getSearchColumn() {
+        return searchColumn;
+    }
+
+    public void setSearchColumn(String searchColumn) {
+        this.searchColumn = searchColumn;
+    }
+
+    public String getPrimaryKey() {
+        return primaryKey;
+    }
+
+    public void setPrimaryKey(String primaryKey) {
+        this.primaryKey = primaryKey;
+    }
+
+    public String getDataSourceCode() {
+        return dataSourceCode;
+    }
+
+    public void setDataSourceCode(String dataSourceCode) {
+        this.dataSourceCode = dataSourceCode;
+    }
+}
+

+ 115 - 0
src/main/java/com/izouma/awesomeadmin/model/DataSourceInfo.java

@@ -0,0 +1,115 @@
+package com.izouma.awesomeadmin.model;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class DataSourceInfo {
+    private Integer id;
+    private String delFlag;
+    private String code;
+    private String databaseType;
+    private String url;
+    private String username;
+    private String password;
+    private String databaseName;
+    private String tableName;
+
+    private String searchKey;
+
+    /**
+     * and,test_name,like,value;or,remark,=,123
+     */
+    private String advancedQuery;
+
+    public Integer getId() {
+        return this.id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getDelFlag() {
+        return this.delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getCode() {
+        return this.code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getDatabaseType() {
+        return this.databaseType;
+    }
+
+    public void setDatabaseType(String databaseType) {
+        this.databaseType = databaseType;
+    }
+
+    public String getUrl() {
+        return this.url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getUsername() {
+        return this.username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return this.password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getDatabaseName() {
+        return this.databaseName;
+    }
+
+    public void setDatabaseName(String databaseName) {
+        this.databaseName = databaseName;
+    }
+
+    public String getSearchKey() {
+        return searchKey;
+    }
+
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
+
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
+
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+}
+

+ 186 - 0
src/main/java/com/izouma/awesomeadmin/model/DepartInfo.java

@@ -0,0 +1,186 @@
+package com.izouma.awesomeadmin.model;
+
+import java.util.*;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * depart_info 实体类
+ * Thu Apr 26 10:56:37 CST 2018  Suo Chen Cheng
+ */ 
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class DepartInfo{
+
+/**
+* 	 id
+*/
+	private Integer id;
+
+/**
+* 	 部门名称
+*/
+	private String departName;
+
+/**
+* 	 上级部门id
+*/
+	private Integer parentId;
+
+/**
+* 	 所有上级id
+*/
+	private String allParentId;
+
+/**
+* 	 描述
+*/
+	private String description;
+
+/**
+* 	 部门代码
+*/
+	private String departCode;
+
+/**
+* 	 组织代码
+*/
+	private String orgCode;
+
+/**
+* 	 类型
+*/
+	private Integer type;
+
+/**
+* 	 备注
+*/
+	private String remark;
+
+/**
+* 	 排序
+*/
+	private Integer sort;
+
+/**
+* 	 del_flag
+*/
+	private String delFlag;
+
+/**
+* 	 create_time
+*/
+	private Date createTime;
+
+/**
+* 	 权限标识
+*/
+	private String permission;
+
+	public void setId(Integer id){
+		this.id=id;
+	}
+
+	public Integer getId(){
+		return id;
+	}
+
+	public void setDepartName(String departName){
+		this.departName=departName;
+	}
+
+	public String getDepartName(){
+		return departName;
+	}
+
+	public void setParentId(Integer parentId){
+		this.parentId=parentId;
+	}
+
+	public Integer getParentId(){
+		return parentId;
+	}
+
+	public void setAllParentId(String allParentId){
+		this.allParentId=allParentId;
+	}
+
+	public String getAllParentId(){
+		return allParentId;
+	}
+
+	public void setDescription(String description){
+		this.description=description;
+	}
+
+	public String getDescription(){
+		return description;
+	}
+
+	public void setDepartCode(String departCode){
+		this.departCode=departCode;
+	}
+
+	public String getDepartCode(){
+		return departCode;
+	}
+
+	public void setOrgCode(String orgCode){
+		this.orgCode=orgCode;
+	}
+
+	public String getOrgCode(){
+		return orgCode;
+	}
+
+	public void setType(Integer type){
+		this.type=type;
+	}
+
+	public Integer getType(){
+		return type;
+	}
+
+	public void setRemark(String remark){
+		this.remark=remark;
+	}
+
+	public String getRemark(){
+		return remark;
+	}
+
+	public Integer getSort() {
+		return sort;
+	}
+
+	public void setSort(Integer sort) {
+		this.sort = sort;
+	}
+
+	public void setDelFlag(String delFlag){
+		this.delFlag=delFlag;
+	}
+
+	public String getDelFlag(){
+		return delFlag;
+	}
+
+	public void setCreateTime(Date createTime){
+		this.createTime=createTime;
+	}
+
+	public Date getCreateTime(){
+		return createTime;
+	}
+
+	public void setPermission(String permission){
+		this.permission=permission;
+	}
+
+	public String getPermission(){
+		return permission;
+	}
+
+}
+

+ 295 - 0
src/main/java/com/izouma/awesomeadmin/model/GenCode.java

@@ -0,0 +1,295 @@
+package com.izouma.awesomeadmin.model;
+
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+import java.util.List;
+
+/**
+ * gen_code_model 实体类
+ * Fri May 04 15:57:06 CST 2018  Suo Chen Cheng
+ */
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class GenCode {
+
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 表名
+     */
+    private String tableName;
+
+    /**
+     * 类名
+     */
+    private String className;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 是否生成表
+     */
+    private Boolean genTable;
+
+    /**
+     * 是否生成类
+     */
+    private Boolean genClass;
+
+    /**
+     * 是否生成列表页面
+     */
+    private Boolean genList;
+
+    /**
+     * 是否生成表单页面
+     */
+    private Boolean genForm;
+
+    /**
+     * 是否生成路由
+     */
+    private Boolean genRouter;
+
+    /**
+     * 字段表id
+     */
+    private String fieldId;
+
+    /**
+     * java生成路径
+     */
+    private String javaPath;
+
+    /**
+     * vue生成路径
+     */
+    private String viewPath;
+
+    /**
+     * 路由生成路径
+     */
+    private String routerPath;
+
+    /**
+     * 数据库类型:Mysql/SqlServer
+     */
+    private String dataBaseType;
+
+    private List<TableField> fields;    // 表字段
+    private TableField primaryField; //主键字段
+
+    private Boolean readTable;
+
+    /**
+     * 数据库CODE,使用什么数据源S
+     */
+    private String dataSourceCode;
+
+    /**
+     * 生成代码的JSON Str
+     */
+    private String genJson;
+
+    private String searchKey;
+
+    private String delFlag;
+
+    private String typeFlag;
+
+    private List<Subtable> subtables;
+
+
+    public List<TableField> getFields() {
+        return fields;
+    }
+
+    public void setFields(List<TableField> fields) {
+        this.fields = fields;
+    }
+
+    public TableField getPrimaryField() {
+        return primaryField;
+    }
+
+    public void setPrimaryField(TableField primaryField) {
+        this.primaryField = primaryField;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setClassName(String className) {
+        this.className = className;
+    }
+
+    public String getClassName() {
+        return className;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setGenTable(Boolean genTable) {
+        this.genTable = genTable;
+    }
+
+    public Boolean getGenTable() {
+        return genTable;
+    }
+
+    public void setGenClass(Boolean genClass) {
+        this.genClass = genClass;
+    }
+
+    public Boolean getGenClass() {
+        return genClass;
+    }
+
+    public void setGenList(Boolean genList) {
+        this.genList = genList;
+    }
+
+    public Boolean getGenList() {
+        return genList;
+    }
+
+    public void setGenForm(Boolean genForm) {
+        this.genForm = genForm;
+    }
+
+    public Boolean getGenForm() {
+        return genForm;
+    }
+
+    public void setFieldId(String fieldId) {
+        this.fieldId = fieldId;
+    }
+
+    public String getFieldId() {
+        return fieldId;
+    }
+
+    public String getJavaPath() {
+        return javaPath;
+    }
+
+    public void setJavaPath(String javaPath) {
+        this.javaPath = javaPath;
+    }
+
+    public String getViewPath() {
+        return viewPath;
+    }
+
+    public void setViewPath(String viewPath) {
+        this.viewPath = viewPath;
+    }
+
+    public String getDataBaseType() {
+        return dataBaseType;
+    }
+
+    public void setDataBaseType(String dataBaseType) {
+        this.dataBaseType = dataBaseType;
+    }
+
+    public Boolean getReadTable() {
+        return readTable;
+    }
+
+    public void setReadTable(Boolean readTable) {
+        this.readTable = readTable;
+    }
+
+    public String getRouterPath() {
+        return routerPath;
+    }
+
+    public void setRouterPath(String routerPath) {
+        this.routerPath = routerPath;
+    }
+
+    public Boolean getGenRouter() {
+        return genRouter;
+    }
+
+    public void setGenRouter(Boolean genRouter) {
+        this.genRouter = genRouter;
+    }
+
+    public String getDataSourceCode() {
+        return dataSourceCode;
+    }
+
+    public void setDataSourceCode(String dataSourceCode) {
+        this.dataSourceCode = dataSourceCode;
+    }
+
+    public String getGenJson() {
+        return genJson;
+    }
+
+    public void setGenJson(String genJson) {
+        this.genJson = genJson;
+    }
+
+    public String getSearchKey() {
+        return searchKey;
+    }
+
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getTypeFlag() {
+        return typeFlag;
+    }
+
+    public void setTypeFlag(String typeFlag) {
+        this.typeFlag = typeFlag;
+    }
+
+    public List<Subtable> getSubtables() {
+        return subtables;
+    }
+
+    public void setSubtables(List<Subtable> subtables) {
+        this.subtables = subtables;
+    }
+}
+

+ 121 - 0
src/main/java/com/izouma/awesomeadmin/model/GenTestTable.java

@@ -0,0 +1,121 @@
+package com.izouma.awesomeadmin.model;
+
+import java.util.*;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * gen_test_table 实体类
+ * Fri Apr 20 09:24:30 CST 2018  Suo Chen Cheng
+ */ 
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class GenTestTable{
+
+/**
+* 	 主键:id
+*/
+	private Integer id;
+
+/**
+* 	 我的:字段一
+*/
+	private String myColumn;
+
+/**
+* 	 测试:aaaxx
+*/
+	private String aaaTest;
+
+/**
+* 	 bbb标识: N 为xxx Y为yyy
+*/
+	private String bbbFlag;
+
+/**
+* 	 no_comment
+*/
+	private String noComment;
+
+/**
+* 	 创建时间
+*/
+	private Date createTime;
+
+/**
+* 	 更新时间
+*/
+	private Date updateTime;
+
+/**
+* 	 删除标识:N为未删除,Y为删除
+*/
+	private String delFlag;
+
+	public void setId(Integer id){
+		this.id=id;
+	}
+
+	public Integer getId(){
+		return id;
+	}
+
+	public void setMyColumn(String myColumn){
+		this.myColumn=myColumn;
+	}
+
+	public String getMyColumn(){
+		return myColumn;
+	}
+
+	public void setAaaTest(String aaaTest){
+		this.aaaTest=aaaTest;
+	}
+
+	public String getAaaTest(){
+		return aaaTest;
+	}
+
+	public void setBbbFlag(String bbbFlag){
+		this.bbbFlag=bbbFlag;
+	}
+
+	public String getBbbFlag(){
+		return bbbFlag;
+	}
+
+	public void setNoComment(String noComment){
+		this.noComment=noComment;
+	}
+
+	public String getNoComment(){
+		return noComment;
+	}
+
+	public void setCreateTime(Date createTime){
+		this.createTime=createTime;
+	}
+
+	public Date getCreateTime(){
+		return createTime;
+	}
+
+	public void setUpdateTime(Date updateTime){
+		this.updateTime=updateTime;
+	}
+
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+
+	public void setDelFlag(String delFlag){
+		this.delFlag=delFlag;
+	}
+
+	public String getDelFlag(){
+		return delFlag;
+	}
+
+}
+

+ 106 - 0
src/main/java/com/izouma/awesomeadmin/model/PowerInfo.java

@@ -0,0 +1,106 @@
+package com.izouma.awesomeadmin.model;
+
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+/**
+ * power_info 实体类
+ * Wed Apr 11 11:04:02 CST 2018  Suo Chen Cheng
+ */ 
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class PowerInfo{
+
+	private Integer id;
+
+	private Integer roleId;
+
+	private Integer menuId;
+
+	private Integer canAdd;
+
+	private Integer canDelete;
+
+	private Integer canUpdate;
+
+	private Integer canSelect;
+
+	private String delFlag;
+	private String roleIdStr;
+
+	public String getRoleIdStr() {
+		return roleIdStr;
+	}
+
+	public void setRoleIdStr(String roleIdStr) {
+		this.roleIdStr = roleIdStr;
+	}
+
+	public void setId(Integer id){
+		this.id=id;
+	}
+
+	public Integer getId(){
+		return id;
+	}
+
+	public void setRoleId(Integer roleId){
+		this.roleId=roleId;
+	}
+
+	public Integer getRoleId(){
+		return roleId;
+	}
+
+	public void setMenuId(Integer menuId){
+		this.menuId=menuId;
+	}
+
+	public Integer getMenuId(){
+		return menuId;
+	}
+
+	public void setCanAdd(Integer canAdd){
+		this.canAdd=canAdd;
+	}
+
+	public Integer getCanAdd(){
+		return canAdd;
+	}
+
+	public void setCanDelete(Integer canDelete){
+		this.canDelete=canDelete;
+	}
+
+	public Integer getCanDelete(){
+		return canDelete;
+	}
+
+	public void setCanUpdate(Integer canUpdate){
+		this.canUpdate=canUpdate;
+	}
+
+	public Integer getCanUpdate(){
+		return canUpdate;
+	}
+
+	public void setCanSelect(Integer canSelect){
+		this.canSelect=canSelect;
+	}
+
+	public Integer getCanSelect(){
+		return canSelect;
+	}
+
+	public void setDelFlag(String delFlag){
+		this.delFlag=delFlag;
+	}
+
+	public String getDelFlag(){
+		return delFlag;
+	}
+
+}
+

+ 163 - 0
src/main/java/com/izouma/awesomeadmin/model/QueryConfig.java

@@ -0,0 +1,163 @@
+package com.izouma.awesomeadmin.model;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+import java.util.List;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class QueryConfig {
+    private Integer id;
+    private String delFlag;
+    private String code;
+    private String tableName;
+    private String tablecolumns;
+    private String databasetype;
+
+    private String dataSourceCode;
+
+    private String modules;
+
+    private String searchKey;
+
+    /**
+     * and,test_name,like,value;or,remark,=,123
+     */
+    private String advancedQuery;
+
+    private List<TableField> fields;
+
+    private String configJson;
+
+    private String typeFlag;
+
+    private List<Subtable> subtables;
+
+    /**
+     * 子表json
+     */
+    private String subJson;
+
+    public Integer getId() {
+        return this.id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getDelFlag() {
+        return this.delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getCode() {
+        return this.code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getTableName() {
+        return this.tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public String getTablecolumns() {
+        return this.tablecolumns;
+    }
+
+    public void setTablecolumns(String tablecolumns) {
+        this.tablecolumns = tablecolumns;
+    }
+
+    public String getDatabasetype() {
+        return this.databasetype;
+    }
+
+    public void setDatabasetype(String databasetype) {
+        this.databasetype = databasetype;
+    }
+
+    public String getSearchKey() {
+        return searchKey;
+    }
+
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
+
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
+
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
+
+    public String getModules() {
+        return modules;
+    }
+
+    public void setModules(String modules) {
+        this.modules = modules;
+    }
+
+    public String getDataSourceCode() {
+        return dataSourceCode;
+    }
+
+    public void setDataSourceCode(String dataSourceCode) {
+        this.dataSourceCode = dataSourceCode;
+    }
+
+    public List<TableField> getFields() {
+        return fields;
+    }
+
+    public void setFields(List<TableField> fields) {
+        this.fields = fields;
+    }
+
+    public String getConfigJson() {
+        return configJson;
+    }
+
+    public void setConfigJson(String configJson) {
+        this.configJson = configJson;
+    }
+
+    public String getTypeFlag() {
+        return typeFlag;
+    }
+
+    public void setTypeFlag(String typeFlag) {
+        this.typeFlag = typeFlag;
+    }
+
+    public List<Subtable> getSubtables() {
+        return subtables;
+    }
+
+    public void setSubtables(List<Subtable> subtables) {
+        this.subtables = subtables;
+    }
+
+    public String getSubJson() {
+        return subJson;
+    }
+
+    public void setSubJson(String subJson) {
+        this.subJson = subJson;
+    }
+}
+

部分文件因文件數量過多而無法顯示