suochencheng 7 lat temu
commit
f6589d8aae
100 zmienionych plików z 12581 dodań i 0 usunięć
  1. 6 0
      .gitignore
  2. 6 0
      README.md
  3. 1 0
      log.txt
  4. 998 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. 296 0
      src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java
  10. 36 0
      src/main/java/com/izouma/awesomeadmin/constant/RongConstant.java
  11. 17 0
      src/main/java/com/izouma/awesomeadmin/container/DateConverter.java
  12. 26 0
      src/main/java/com/izouma/awesomeadmin/container/Lifecycle.java
  13. 70 0
      src/main/java/com/izouma/awesomeadmin/container/StartupListener.java
  14. 29 0
      src/main/java/com/izouma/awesomeadmin/dao/AccessTokenMapper.java
  15. 21 0
      src/main/java/com/izouma/awesomeadmin/dao/AccessTokenMapper.xml
  16. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/AlipayTempMapper.java
  17. 527 0
      src/main/java/com/izouma/awesomeadmin/dao/AlipayTempMapper.xml
  18. 27 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQueryMapper.java
  19. 189 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQueryMapper.xml
  20. 27 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQuerySqlServerMapper.java
  21. 182 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQuerySqlServerMapper.xml
  22. 36 0
      src/main/java/com/izouma/awesomeadmin/dao/DataSourceInfoMapper.java
  23. 327 0
      src/main/java/com/izouma/awesomeadmin/dao/DataSourceInfoMapper.xml
  24. 51 0
      src/main/java/com/izouma/awesomeadmin/dao/DepartInfoMapper.java
  25. 341 0
      src/main/java/com/izouma/awesomeadmin/dao/DepartInfoMapper.xml
  26. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/GenCodeMapper.java
  27. 265 0
      src/main/java/com/izouma/awesomeadmin/dao/GenCodeMapper.xml
  28. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/PowerInfoMapper.java
  29. 224 0
      src/main/java/com/izouma/awesomeadmin/dao/PowerInfoMapper.xml
  30. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/QueryConfigMapper.java
  31. 363 0
      src/main/java/com/izouma/awesomeadmin/dao/QueryConfigMapper.xml
  32. 26 0
      src/main/java/com/izouma/awesomeadmin/dao/RongYunTokenMapper.java
  33. 95 0
      src/main/java/com/izouma/awesomeadmin/dao/RongYunTokenMapper.xml
  34. 51 0
      src/main/java/com/izouma/awesomeadmin/dao/SuperUserMapper.java
  35. 88 0
      src/main/java/com/izouma/awesomeadmin/dao/SuperUserMapper.xml
  36. 14 0
      src/main/java/com/izouma/awesomeadmin/dao/SysAppTokenMapper.java
  37. 18 0
      src/main/java/com/izouma/awesomeadmin/dao/SysAppTokenMapper.xml
  38. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/SysDataruleMapper.java
  39. 153 0
      src/main/java/com/izouma/awesomeadmin/dao/SysDataruleMapper.xml
  40. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/SysMenuMapper.java
  41. 386 0
      src/main/java/com/izouma/awesomeadmin/dao/SysMenuMapper.xml
  42. 47 0
      src/main/java/com/izouma/awesomeadmin/dao/SysRoleMapper.java
  43. 372 0
      src/main/java/com/izouma/awesomeadmin/dao/SysRoleMapper.xml
  44. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/TableFieldMapper.java
  45. 494 0
      src/main/java/com/izouma/awesomeadmin/dao/TableFieldMapper.xml
  46. 44 0
      src/main/java/com/izouma/awesomeadmin/dao/UserInfoMapper.java
  47. 708 0
      src/main/java/com/izouma/awesomeadmin/dao/UserInfoMapper.xml
  48. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/WxpayTempMapper.java
  49. 573 0
      src/main/java/com/izouma/awesomeadmin/dao/WxpayTempMapper.xml
  50. 14 0
      src/main/java/com/izouma/awesomeadmin/datasource/DataSource.java
  51. 67 0
      src/main/java/com/izouma/awesomeadmin/datasource/DataSourceAspect.java
  52. 79 0
      src/main/java/com/izouma/awesomeadmin/datasource/DynamicDataSource.java
  53. 20 0
      src/main/java/com/izouma/awesomeadmin/datasource/DynamicDataSourceHolder.java
  54. 144 0
      src/main/java/com/izouma/awesomeadmin/dto/Page.java
  55. 70 0
      src/main/java/com/izouma/awesomeadmin/dto/Result.java
  56. 87 0
      src/main/java/com/izouma/awesomeadmin/dto/TreeNode.java
  57. 233 0
      src/main/java/com/izouma/awesomeadmin/dto/WxPayRefundData.java
  58. 293 0
      src/main/java/com/izouma/awesomeadmin/dto/WxPaySendData.java
  59. 32 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/AccessToken.java
  60. 69 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/BaseMessage.java
  61. 54 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/CustomServiceMessage.java
  62. 18 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/Image.java
  63. 18 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/ImageMessage.java
  64. 74 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/Music.java
  65. 18 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/MusicMessage.java
  66. 58 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/News.java
  67. 25 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/NewsMessage.java
  68. 24 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/TemplateData.java
  69. 47 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/TemplateMessage.java
  70. 37 0
      src/main/java/com/izouma/awesomeadmin/dto/wx/TextMessage.java
  71. 67 0
      src/main/java/com/izouma/awesomeadmin/interceptor/GlobalInterceptor.java
  72. 143 0
      src/main/java/com/izouma/awesomeadmin/interceptor/PageInterceptor.java
  73. 38 0
      src/main/java/com/izouma/awesomeadmin/model/AccessToken.java
  74. 179 0
      src/main/java/com/izouma/awesomeadmin/model/AlipayTemp.java
  75. 100 0
      src/main/java/com/izouma/awesomeadmin/model/CommonQuery.java
  76. 115 0
      src/main/java/com/izouma/awesomeadmin/model/DataSourceInfo.java
  77. 186 0
      src/main/java/com/izouma/awesomeadmin/model/DepartInfo.java
  78. 295 0
      src/main/java/com/izouma/awesomeadmin/model/GenCode.java
  79. 106 0
      src/main/java/com/izouma/awesomeadmin/model/PowerInfo.java
  80. 163 0
      src/main/java/com/izouma/awesomeadmin/model/QueryConfig.java
  81. 64 0
      src/main/java/com/izouma/awesomeadmin/model/RongYunToken.java
  82. 55 0
      src/main/java/com/izouma/awesomeadmin/model/Subtable.java
  83. 101 0
      src/main/java/com/izouma/awesomeadmin/model/SuperUser.java
  84. 66 0
      src/main/java/com/izouma/awesomeadmin/model/SysDatarule.java
  85. 224 0
      src/main/java/com/izouma/awesomeadmin/model/SysMenu.java
  86. 177 0
      src/main/java/com/izouma/awesomeadmin/model/SysRole.java
  87. 374 0
      src/main/java/com/izouma/awesomeadmin/model/TableField.java
  88. 328 0
      src/main/java/com/izouma/awesomeadmin/model/UserInfo.java
  89. 195 0
      src/main/java/com/izouma/awesomeadmin/model/WxpayTemp.java
  90. 27 0
      src/main/java/com/izouma/awesomeadmin/service/AlipayTempService.java
  91. 29 0
      src/main/java/com/izouma/awesomeadmin/service/CommonQueryService.java
  92. 27 0
      src/main/java/com/izouma/awesomeadmin/service/DataSourceInfoService.java
  93. 36 0
      src/main/java/com/izouma/awesomeadmin/service/DepartInfoService.java
  94. 29 0
      src/main/java/com/izouma/awesomeadmin/service/GenCodeService.java
  95. 65 0
      src/main/java/com/izouma/awesomeadmin/service/ImageFileService.java
  96. 278 0
      src/main/java/com/izouma/awesomeadmin/service/OSSFileService.java
  97. 32 0
      src/main/java/com/izouma/awesomeadmin/service/PowerInfoService.java
  98. 27 0
      src/main/java/com/izouma/awesomeadmin/service/QueryConfigService.java
  99. 11 0
      src/main/java/com/izouma/awesomeadmin/service/RongYunTokenService.java
  100. 53 0
      src/main/java/com/izouma/awesomeadmin/service/SuperUserService.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)

+ 1 - 0
log.txt

@@ -0,0 +1 @@
+

+ 998 - 0
pom.xml

@@ -0,0 +1,998 @@
+<?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>4.0.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
+            <version>1.1.0</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>
+
+
+        <dependency>
+            <groupId>com.alipay.sdk</groupId>
+            <artifactId>alipay-sdk-java</artifactId>
+            <version>3.3.49.ALL</version>
+        </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>

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

@@ -0,0 +1,296 @@
+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_NATIVE = "NATIVE";
+
+    /**
+     * 交易类型 公众号H5
+     */
+    String TRADE_TYPE_JSAPI = "JSAPI";
+
+    /**
+     * 交易类型 APP
+     */
+    String TRADE_TYPE_APP = "APP";
+
+    /**
+     * 设备号 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 PayMode {
+
+        /**
+         * 支付宝
+         */
+        Integer ALIPAY = 0;
+
+        /**
+         * 微信
+         */
+        Integer WEI_XIN = 1;
+
+        /**
+         * 电子币
+         */
+        Integer COIN = 2;
+    }
+
+    public interface InergralUpdateType {
+
+        /**
+         * 产品抵扣
+         */
+        Integer DISCOUNT = 0;
+
+        /**
+         * 任务
+         */
+        Integer TASK = 1;
+
+        /**
+         * 充值
+         */
+        Integer RECHARGE = 2;
+    }
+
+    public interface OrderStatus {
+
+        /**
+         * 下单,待付款
+         */
+        Integer NO_PAY = 0;
+
+        /**
+         * 支付完成,待上传原图、代发货
+         */
+        Integer PAY_OVER = 1;
+
+        /**
+         * 待修图、已发货
+         */
+        Integer WAIT_REPAIR = 2;
+
+        /**
+         * 修图完成待验收、
+         */
+        Integer ACCEPT = 3;
+
+        /**
+         * 验收不通过,待返修
+         */
+        Integer REWORK = 4;
+
+
+        /**
+         * 验收完成待评论、已收货待评论
+         */
+        Integer FINISH = 5;
+
+        /**
+         * 结束
+         */
+        Integer END = 6;
+
+
+        /**
+         * 退款中
+         */
+        Integer REFUNDING = 7;
+
+        /**
+         * 已经取消
+         */
+        Integer CANCEL = 8;
+
+
+        /**
+         * 退款失败
+         */
+        Integer REFUND_FAIL = 9;
+
+        /**
+         * 退款成功
+         */
+        Integer REFUND_SUCCESS = 10;
+
+
+    }
+
+    /**
+     * <p>货币类型。</p>
+     *
+     * @author 姓名 <br />
+     * 更新履历 <br />
+     * 日期 : 姓名: 更新内容<br />
+     * @version 1.0
+     */
+    public interface CoinType {
+
+        /**
+         * 充值
+         */
+        Integer RECHARGE = 0;
+
+        /**
+         * 消费
+         */
+        Integer CONSUMPTION = 1;
+
+        /**
+         * 兑换
+         */
+        Integer EXCHANGE = 2;
+
+        /**
+         * 提现
+         */
+        Integer CASH = 3;
+
+        /**
+         * 税收
+         */
+        Integer TAXES = 4;
+
+
+        /**
+         * 销售
+         */
+        Integer SALE = 5;
+
+        /**
+         * 返还
+         */
+        Integer FAN_HUAN = 6;
+
+
+        /**
+         * 退款
+         */
+        Integer REFUND = 7;
+
+        /**
+         * 赠送
+         */
+        Integer SONG = 8;
+
+    }
+
+    public interface Aliapi {
+
+        /**
+         * 交易创建,等待买家付款
+         */
+        String WAIT_BUYER_PAY = "WAIT_BUYER_PAY";
+
+        /**
+         * 未付款交易超时关闭,或支付完成后全额退款
+         */
+        String TRADE_CLOSED = "TRADE_CLOSED";
+
+        /**
+         * 交易支付成功
+         */
+        String TRADE_SUCCESS = "TRADE_SUCCESS";
+
+        /**
+         * 交易结束,不可退款
+         */
+        String TRADE_FINISHED = "TRADE_FINISHED";
+
+        /**
+         * typeFlag, 购买,订单付款
+         */
+        Integer BUY = 0;
+
+        /**
+         * typeFlag,充值
+         */
+        Integer RECHARGE = 1;
+
+        /**
+         * 押金
+         */
+        Integer CASH_PLEDGE = 2;
+
+    }
+
+    /**
+     * 商品类型
+     */
+    public interface ProductType {
+
+        /**
+         * 修图
+         */
+        String IMAGE = "0";
+
+        /**
+         * 实体商品
+         */
+        String PHYSICAL = "1";
+    }
+}

+ 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>

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/AlipayTempMapper.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.AlipayTemp;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.AlipayTempMapper")
+public interface AlipayTempMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(AlipayTemp record);
+
+    AlipayTemp selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(AlipayTemp record);
+
+    List<AlipayTemp> queryAllAlipayTemp(AlipayTemp record);
+
+    List<AlipayTemp> queryAlipayTempByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    AlipayTemp queryAlipayTemp(AlipayTemp record);
+
+    List<AlipayTemp> query(AlipayTemp record);
+}
+

Plik diff jest za duży
+ 527 - 0
src/main/java/com/izouma/awesomeadmin/dao/AlipayTempMapper.xml


+ 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>

+ 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>
+

+ 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);
+}

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

@@ -0,0 +1,95 @@
+<?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="VARCHAR"/>
+        <result column="token" property="token" jdbcType="VARCHAR"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+      id, user_id, token, type_flag
+    </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>
+            <if test="typeFlag != null">
+                type_flag,
+            </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>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </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>
+

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

@@ -0,0 +1,44 @@
+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 querySingleUserInfo(UserInfo record);
+
+    UserInfo login(Map<String, Object> parameter);
+
+    List<String> findDepartLeader(String userId);
+
+    List<String> findUserByRoleName(String roleName);
+
+    int updatePassword(UserInfo record);
+
+}
+

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

@@ -0,0 +1,708 @@
+<?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"/>
+        <result column="money_coin" property="moneyCoin" jdbcType="DECIMAL"/>
+        <result column="money_point" property="moneyPoint" jdbcType="DECIMAL"/>
+        <result column="contacter" property="contacter" jdbcType="VARCHAR"/>
+        <result column="contact_phone" property="contactPhone" jdbcType="VARCHAR"/>
+        <result column="company_name" property="companyName" jdbcType="VARCHAR"/>
+        <result column="company_type" property="companyType" jdbcType="VARCHAR"/>
+        <result column="admin_flag" property="adminFlag" jdbcType="CHAR"/>
+        <result column="cash_pledge" property="cashPledge" jdbcType="INTEGER"/>
+        <result column="approve_flag" property="approveFlag" jdbcType="CHAR"/>
+        <result column="store_flag" property="storeFlag" jdbcType="CHAR"/>
+        <result column="company_flag" property="companyFlag" jdbcType="CHAR"/>
+        <result column="approve_step" property="approveStep" jdbcType="INTEGER"/>
+        <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, money_coin, money_point,
+        contacter, contact_phone, company_name, company_type, admin_flag, cash_pledge,
+        approve_flag, store_flag, company_flag, approve_step
+    </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>
+            <if test="moneyCoin != null">
+                money_coin,
+            </if>
+            <if test="moneyPoint != null">
+                money_point,
+            </if>
+            <if test="contacter != null">
+                contacter,
+            </if>
+            <if test="contactPhone != null">
+                contact_phone,
+            </if>
+            <if test="companyName != null">
+                company_name,
+            </if>
+            <if test="companyType != null">
+                company_type,
+            </if>
+            <if test="adminFlag != null">
+                admin_flag,
+            </if>
+            <if test="cashPledge != null">
+                cash_pledge,
+            </if>
+            <if test="approveFlag != null">
+                approve_flag,
+            </if>
+            <if test="storeFlag != null">
+                store_flag,
+            </if>
+            <if test="companyFlag != null">
+                company_flag,
+            </if>
+            <if test="approveStep != null">
+                approve_step,
+            </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>
+            <if test="moneyCoin != null">
+                #{moneyCoin},
+            </if>
+            <if test="moneyPoint != null">
+                #{moneyPoint},
+            </if>
+            <if test="contacter != null">
+                #{contacter},
+            </if>
+            <if test="contactPhone != null">
+                #{contactPhone},
+            </if>
+            <if test="companyName != null">
+                #{companyName},
+            </if>
+            <if test="companyType != null">
+                #{companyType},
+            </if>
+            <if test="adminFlag != null">
+                #{adminFlag},
+            </if>
+            <if test="cashPledge != null">
+                #{cashPledge},
+            </if>
+            <if test="approveFlag != null">
+                #{approveFlag},
+            </if>
+            <if test="storeFlag != null">
+                #{storeFlag},
+            </if>
+            <if test="companyFlag != null">
+                #{companyFlag},
+            </if>
+            <if test="approveStep != null">
+                #{approveStep},
+            </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>
+            <if test="moneyCoin != null">
+                money_coin = #{moneyCoin},
+            </if>
+            <if test="moneyPoint != null">
+                money_point = #{moneyPoint},
+            </if>
+            <if test="contacter != null">
+                contacter = #{contacter},
+            </if>
+            <if test="contactPhone != null">
+                contact_phone = #{contactPhone},
+            </if>
+            <if test="companyName != null">
+                company_name = #{companyName},
+            </if>
+            <if test="companyType != null">
+                company_type = #{companyType},
+            </if>
+            <if test="adminFlag != null">
+                admin_flag = #{adminFlag},
+            </if>
+            <if test="cashPledge != null">
+                cash_pledge = #{cashPledge},
+            </if>
+            <if test="approveFlag != null">
+                approve_flag = #{approveFlag},
+            </if>
+            <if test="storeFlag != null">
+                store_flag = #{storeFlag},
+            </if>
+            <if test="companyFlag != null">
+                company_flag = #{companyFlag},
+            </if>
+            <if test="approveStep != null">
+                approve_step = #{approveStep},
+            </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>
+            <if test="record.contacter != null and !&quot;&quot;.equals(record.contacter)">
+                and contacter = #{record.contacter}
+            </if>
+            <if test="record.contactPhone != null and !&quot;&quot;.equals(record.contactPhone)">
+                and contact_phone = #{record.contactPhone}
+            </if>
+            <if test="record.companyName != null and !&quot;&quot;.equals(record.companyName)">
+                and company_name = #{record.companyName}
+            </if>
+            <if test="record.companyType != null and !&quot;&quot;.equals(record.companyType)">
+                and company_type = #{record.companyType}
+            </if>
+            <if test="record.adminFlag != null and !&quot;&quot;.equals(record.adminFlag)">
+                and admin_flag = #{record.adminFlag}
+            </if>
+            <if test="record.cashPledge != null and !&quot;&quot;.equals(record.cashPledge)">
+                and cash_pledge = #{record.cashPledge}
+            </if>
+            <if test="record.approveFlag != null and !&quot;&quot;.equals(record.approveFlag)">
+                and approve_flag = #{record.approveFlag}
+            </if>
+            <if test="record.storeFlag != null and !&quot;&quot;.equals(record.storeFlag)">
+                and store_flag = #{record.storeFlag}
+            </if>
+            <if test="record.companyFlag != null and !&quot;&quot;.equals(record.companyFlag)">
+                and company_flag = #{record.companyFlag}
+            </if>
+            <if test="record.approveStep != null and !&quot;&quot;.equals(record.approveStep)">
+                and approve_step = #{record.approveStep}
+            </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>
+
+            <if test="contacter != null and !&quot;&quot;.equals(contacter)">
+                and contacter = #{contacter}
+            </if>
+            <if test="contactPhone != null and !&quot;&quot;.equals(contactPhone)">
+                and contact_phone = #{contactPhone}
+            </if>
+            <if test="companyName != null and !&quot;&quot;.equals(companyName)">
+                and company_name = #{companyName}
+            </if>
+            <if test="companyType != null and !&quot;&quot;.equals(companyType)">
+                and company_type = #{companyType}
+            </if>
+            <if test="adminFlag != null and !&quot;&quot;.equals(adminFlag)">
+                and admin_flag = #{adminFlag}
+            </if>
+            <if test="cashPledge != null and !&quot;&quot;.equals(cashPledge)">
+                and cash_pledge = #{cashPledge}
+            </if>
+            <if test="approveFlag != null and !&quot;&quot;.equals(approveFlag)">
+                and approve_flag = #{approveFlag}
+            </if>
+            <if test="storeFlag != null and !&quot;&quot;.equals(storeFlag)">
+                and store_flag = #{storeFlag}
+            </if>
+            <if test="companyFlag != null and !&quot;&quot;.equals(companyFlag)">
+                and company_flag = #{companyFlag}
+            </if>
+            <if test="approveStep != null and !&quot;&quot;.equals(approveStep)">
+                and approve_step = #{approveStep}
+            </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="querySingleUserInfo" 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>
+        LIMIT 1
+    </select>
+    <select id="login" resultMap="BaseResultMap" parameterType="java.util.Map">
+        SELECT
+        <include refid="Base_Column_List"/>
+        from sys_user
+        WHERE (username = #{username} or phone = #{username} or mail = #{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>
+
+    <update id="updatePassword" parameterType="com.izouma.awesomeadmin.model.UserInfo">
+        update sys_user
+        <set>
+            <if test="password != null">
+                password = #{password,jdbcType=VARCHAR},
+            </if>
+        </set>
+        <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="phone != null and !&quot;&quot;.equals(phone)">
+                and phone = #{phone}
+            </if>
+            <if test="mail != null and !&quot;&quot;.equals(mail)">
+                and mail = #{mail}
+            </if>
+        </where>
+
+    </update>
+
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/WxpayTempMapper.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.WxpayTemp;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.WxpayTempMapper")
+public interface WxpayTempMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(WxpayTemp record);
+
+    WxpayTemp selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(WxpayTemp record);
+
+    List<WxpayTemp> queryAllWxpayTemp(WxpayTemp record);
+
+    List<WxpayTemp> queryWxpayTempByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    WxpayTemp queryWxpayTemp(WxpayTemp record);
+
+    List<WxpayTemp> query(WxpayTemp record);
+}
+

Plik diff jest za duży
+ 573 - 0
src/main/java/com/izouma/awesomeadmin/dao/WxpayTempMapper.xml


+ 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 +
+                '}';
+    }
+
+}  

+ 233 - 0
src/main/java/com/izouma/awesomeadmin/dto/WxPayRefundData.java

@@ -0,0 +1,233 @@
+package com.izouma.awesomeadmin.dto;
+
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+@JsonAutoDetect
+// 表明忽略为null的属性
+@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
+public class WxPayRefundData {
+
+    /**
+     * 公众账号ID
+     */
+    private String appid;
+
+    /**
+     * 商户号
+     */
+    private String mch_id;
+
+    /**
+     * 设备号
+     */
+    private String device_info;
+
+    /**
+     * 随机字符串
+     */
+    private String nonce_str;
+
+    /**
+     * 签名
+     */
+    private String sign;
+
+    /**
+     * 微信订单号
+     */
+    private String transaction_id;
+
+    /**
+     * 商户订单号
+     */
+    private String out_trade_no;
+
+    /**
+     * 商户退款单号
+     */
+    private String out_refund_no;
+
+    /**
+     * 订单金额
+     */
+    private int total_fee;
+
+    /**
+     * 退款金额
+     */
+    private int refund_fee;
+
+    /**
+     * 货币种类
+     */
+    private String refund_fee_type;
+
+    /**
+     * 操作员
+     */
+    private String op_user_id;
+
+    /**
+     * 退款资金来源
+     */
+    private String refund_account;
+
+
+    public String getAppid() {
+
+        return appid;
+    }
+
+
+    public void setAppid(String appid) {
+
+        this.appid = appid;
+    }
+
+
+    public String getMch_id() {
+
+        return mch_id;
+    }
+
+
+    public void setMch_id(String mch_id) {
+
+        this.mch_id = mch_id;
+    }
+
+
+    public String getDevice_info() {
+
+        return device_info;
+    }
+
+
+    public void setDevice_info(String device_info) {
+
+        this.device_info = device_info;
+    }
+
+
+    public String getNonce_str() {
+
+        return nonce_str;
+    }
+
+
+    public void setNonce_str(String nonce_str) {
+
+        this.nonce_str = nonce_str;
+    }
+
+
+    public String getSign() {
+
+        return sign;
+    }
+
+
+    public void setSign(String sign) {
+
+        this.sign = sign;
+    }
+
+
+    public String getTransaction_id() {
+
+        return transaction_id;
+    }
+
+
+    public void setTransaction_id(String transaction_id) {
+
+        this.transaction_id = transaction_id;
+    }
+
+
+    public String getOut_trade_no() {
+
+        return out_trade_no;
+    }
+
+
+    public void setOut_trade_no(String out_trade_no) {
+
+        this.out_trade_no = out_trade_no;
+    }
+
+
+    public String getOut_refund_no() {
+
+        return out_refund_no;
+    }
+
+
+    public void setOut_refund_no(String out_refund_no) {
+
+        this.out_refund_no = out_refund_no;
+    }
+
+
+    public int getTotal_fee() {
+
+        return total_fee;
+    }
+
+
+    public void setTotal_fee(int total_fee) {
+
+        this.total_fee = total_fee;
+    }
+
+
+    public int getRefund_fee() {
+
+        return refund_fee;
+    }
+
+
+    public void setRefund_fee(int refund_fee) {
+
+        this.refund_fee = refund_fee;
+    }
+
+
+    public String getRefund_fee_type() {
+
+        return refund_fee_type;
+    }
+
+
+    public void setRefund_fee_type(String refund_fee_type) {
+
+        this.refund_fee_type = refund_fee_type;
+    }
+
+
+    public String getOp_user_id() {
+
+        return op_user_id;
+    }
+
+
+    public void setOp_user_id(String op_user_id) {
+
+        this.op_user_id = op_user_id;
+    }
+
+
+    public String getRefund_account() {
+
+        return refund_account;
+    }
+
+
+    public void setRefund_account(String refund_account) {
+
+        this.refund_account = refund_account;
+    }
+
+}

+ 293 - 0
src/main/java/com/izouma/awesomeadmin/dto/WxPaySendData.java

@@ -0,0 +1,293 @@
+package com.izouma.awesomeadmin.dto;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+import java.util.Date;
+
+@JsonAutoDetect
+// 表明忽略为null的属性
+@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
+public class WxPaySendData {
+
+    private String appid;
+
+    private String mch_id;
+
+    private String sub_appid;
+
+    private String sub_mch_id;
+
+    private String device_info;
+
+    private String nonce_str;
+
+    private String sign;
+
+    private String body;
+
+    private Date createDate;
+
+    private String detail;
+
+    private String attach;
+
+    private String out_trade_no;
+
+    private String fee_type;
+
+    private int total_fee;
+
+    private String spbill_create_ip;
+
+    private String time_start;
+
+    private String time_expire;
+
+    private String notify_url;
+
+    private String trade_type;
+
+    private String openid;
+
+
+    public String getAppid() {
+
+        return appid;
+    }
+
+
+    public void setAppid(String appid) {
+
+        this.appid = appid;
+    }
+
+
+    public String getMch_id() {
+
+        return mch_id;
+    }
+
+
+    public void setMch_id(String mch_id) {
+
+        this.mch_id = mch_id;
+    }
+
+
+    public String getSub_appid() {
+
+        return sub_appid;
+    }
+
+
+    public void setSub_appid(String sub_appid) {
+
+        this.sub_appid = sub_appid;
+    }
+
+
+    public String getSub_mch_id() {
+
+        return sub_mch_id;
+    }
+
+
+    public void setSub_mch_id(String sub_mch_id) {
+
+        this.sub_mch_id = sub_mch_id;
+    }
+
+
+    public String getDevice_info() {
+
+        return device_info;
+    }
+
+
+    public void setDevice_info(String device_info) {
+
+        this.device_info = device_info;
+    }
+
+
+    public String getNonce_str() {
+
+        return nonce_str;
+    }
+
+
+    public void setNonce_str(String nonce_str) {
+
+        this.nonce_str = nonce_str;
+    }
+
+
+    public String getSign() {
+
+        return sign;
+    }
+
+
+    public void setSign(String sign) {
+
+        this.sign = sign;
+    }
+
+
+    public String getBody() {
+
+        return body;
+    }
+
+
+    public void setBody(String body) {
+
+        this.body = body;
+    }
+
+
+    public Date getCreateDate() {
+
+        return createDate;
+    }
+
+
+    public void setCreateDate(Date createDate) {
+
+        this.createDate = createDate;
+    }
+
+
+    public String getDetail() {
+
+        return detail;
+    }
+
+
+    public void setDetail(String detail) {
+
+        this.detail = detail;
+    }
+
+
+    public String getAttach() {
+
+        return attach;
+    }
+
+
+    public void setAttach(String attach) {
+
+        this.attach = attach;
+    }
+
+
+    public String getOut_trade_no() {
+
+        return out_trade_no;
+    }
+
+
+    public void setOut_trade_no(String out_trade_no) {
+
+        this.out_trade_no = out_trade_no;
+    }
+
+
+    public String getFee_type() {
+
+        return fee_type;
+    }
+
+
+    public void setFee_type(String fee_type) {
+
+        this.fee_type = fee_type;
+    }
+
+
+    public int getTotal_fee() {
+
+        return total_fee;
+    }
+
+
+    public void setTotal_fee(int total_fee) {
+
+        this.total_fee = total_fee;
+    }
+
+
+    public String getSpbill_create_ip() {
+
+        return spbill_create_ip;
+    }
+
+
+    public void setSpbill_create_ip(String spbill_create_ip) {
+
+        this.spbill_create_ip = spbill_create_ip;
+    }
+
+
+    public String getTime_start() {
+
+        return time_start;
+    }
+
+
+    public void setTime_start(String time_start) {
+
+        this.time_start = time_start;
+    }
+
+
+    public String getTime_expire() {
+
+        return time_expire;
+    }
+
+
+    public void setTime_expire(String time_expire) {
+
+        this.time_expire = time_expire;
+    }
+
+
+    public String getNotify_url() {
+
+        return notify_url;
+    }
+
+
+    public void setNotify_url(String notify_url) {
+
+        this.notify_url = notify_url;
+    }
+
+
+    public String getTrade_type() {
+
+        return trade_type;
+    }
+
+
+    public void setTrade_type(String trade_type) {
+
+        this.trade_type = trade_type;
+    }
+
+
+    public String getOpenid() {
+
+        return openid;
+    }
+
+
+    public void setOpenid(String openid) {
+
+        this.openid = openid;
+    }
+
+}

+ 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;
+    }
+}

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

@@ -0,0 +1,67 @@
+package com.izouma.awesomeadmin.interceptor;
+
+import com.izouma.awesomeadmin.shiro.AppToken;
+import com.izouma.awesomeadmin.util.PropertiesFileLoader;
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.Jwt;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.security.Keys;
+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.crypto.SecretKey;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Base64;
+import java.util.Date;
+
+/**
+ * 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 (!request.getRequestURI().startsWith("/auth/") && !subject.isAuthenticated() && !request.getRequestURI().startsWith("/admin")) {
+//            try {
+//                String token = request.getHeader("api_token");
+//                SecretKey key = Keys.hmacShaKeyFor(Base64.getDecoder().decode(PropertiesFileLoader.getProperties("jwtsecret").getBytes()));
+//                Jwt jwt = Jwts.parser()
+//                        .setSigningKey(key)
+//                        .parse(token);
+//                Claims claims = (Claims) jwt.getBody();
+//                if (claims.getExpiration() != null) {
+//                    if (claims.getExpiration().before(new Date())) {
+//                        response.setStatus(403);
+//                        return false;
+//                    }
+//                }
+//            } catch (Exception e) {
+//                response.setStatus(403);
+//                return false;
+//            }
+//        }
+
+        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, token");
+        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;
+    }
+}

+ 179 - 0
src/main/java/com/izouma/awesomeadmin/model/AlipayTemp.java

@@ -0,0 +1,179 @@
+package com.izouma.awesomeadmin.model;
+
+import java.math.BigDecimal;
+import java.util.*;
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class AlipayTemp{
+    private Integer id;
+    private String delFlag;
+    private Date updateTime;
+    private String updateUser;
+    private Date createTime;
+    private String createUser;
+    private String orderId;
+    private String tradeStatus;
+    private BigDecimal totalAmount;
+    private String outTradeNo;
+    private String refundNo;
+    private BigDecimal refundAmount;
+    private Integer typeFlag;
+    private BigDecimal coin;
+    private BigDecimal point;
+    private BigDecimal cash;
+
+private String searchKey;
+
+/**
+* and,test_name,like,value;or,remark,=,123
+*/
+private String advancedQuery;
+
+/**
+* column_name_,desc_;column_name_,asc
+*/
+private String orderByStr;
+
+    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 Date getUpdateTime(){
+        return this.updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime){
+        this.updateTime = updateTime;
+    }
+    public String getUpdateUser(){
+        return this.updateUser;
+    }
+
+    public void setUpdateUser(String updateUser){
+        this.updateUser = updateUser;
+    }
+    public Date getCreateTime(){
+        return this.createTime;
+    }
+
+    public void setCreateTime(Date createTime){
+        this.createTime = createTime;
+    }
+    public String getCreateUser(){
+        return this.createUser;
+    }
+
+    public void setCreateUser(String createUser){
+        this.createUser = createUser;
+    }
+    public String getOrderId(){
+        return this.orderId;
+    }
+
+    public void setOrderId(String orderId){
+        this.orderId = orderId;
+    }
+    public String getTradeStatus(){
+        return this.tradeStatus;
+    }
+
+    public void setTradeStatus(String tradeStatus){
+        this.tradeStatus = tradeStatus;
+    }
+    public BigDecimal getTotalAmount(){
+        return this.totalAmount;
+    }
+
+    public void setTotalAmount(BigDecimal totalAmount){
+        this.totalAmount = totalAmount;
+    }
+    public String getOutTradeNo(){
+        return this.outTradeNo;
+    }
+
+    public void setOutTradeNo(String outTradeNo){
+        this.outTradeNo = outTradeNo;
+    }
+    public String getRefundNo(){
+        return this.refundNo;
+    }
+
+    public void setRefundNo(String refundNo){
+        this.refundNo = refundNo;
+    }
+    public BigDecimal getRefundAmount(){
+        return this.refundAmount;
+    }
+
+    public void setRefundAmount(BigDecimal refundAmount){
+        this.refundAmount = refundAmount;
+    }
+    public Integer getTypeFlag(){
+        return this.typeFlag;
+    }
+
+    public void setTypeFlag(Integer typeFlag){
+        this.typeFlag = typeFlag;
+    }
+    public BigDecimal getCoin(){
+        return this.coin;
+    }
+
+    public void setCoin(BigDecimal coin){
+        this.coin = coin;
+    }
+    public BigDecimal getPoint(){
+        return this.point;
+    }
+
+    public void setPoint(BigDecimal point){
+        this.point = point;
+    }
+    public BigDecimal getCash(){
+        return this.cash;
+    }
+
+    public void setCash(BigDecimal cash){
+        this.cash = cash;
+    }
+
+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 getOrderByStr() {
+    return orderByStr;
+}
+
+public void setOrderByStr(String orderByStr) {
+    this.orderByStr = orderByStr;
+}
+
+}
+

+ 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;
+    }
+}
+

+ 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;
+    }
+}
+

+ 64 - 0
src/main/java/com/izouma/awesomeadmin/model/RongYunToken.java

@@ -0,0 +1,64 @@
+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 RongYunToken {
+
+    private Long id;
+
+    private String userId;
+
+    private String token;
+
+    private Integer typeFlag;
+
+
+    public Long getId() {
+
+        return id;
+    }
+
+
+    public void setId(Long id) {
+
+        this.id = id;
+    }
+
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getToken() {
+
+        return token;
+    }
+
+
+    public void setToken(String token) {
+
+        this.token = token;
+    }
+
+    public Integer getTypeFlag() {
+        return typeFlag;
+    }
+
+    public void setTypeFlag(Integer typeFlag) {
+        this.typeFlag = typeFlag;
+    }
+
+    @Override
+    public String toString() {
+
+        return "RongYunToken [id=" + id + ", userId=" + userId + ", token=" + token + "]";
+    }
+
+}

+ 55 - 0
src/main/java/com/izouma/awesomeadmin/model/Subtable.java

@@ -0,0 +1,55 @@
+package com.izouma.awesomeadmin.model;
+
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * table_field 实体类
+ * Fri May 04 13:38:24 CST 2018  Suo Chen Cheng
+ */
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class Subtable {
+
+    private String name;
+
+    private String column;
+
+    private String subColumn;
+
+    private String subCode;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getColumn() {
+        return column;
+    }
+
+    public void setColumn(String column) {
+        this.column = column;
+    }
+
+    public String getSubColumn() {
+        return subColumn;
+    }
+
+    public void setSubColumn(String subColumn) {
+        this.subColumn = subColumn;
+    }
+
+    public String getSubCode() {
+        return subCode;
+    }
+
+    public void setSubCode(String subCode) {
+        this.subCode = subCode;
+    }
+}
+

+ 101 - 0
src/main/java/com/izouma/awesomeadmin/model/SuperUser.java

@@ -0,0 +1,101 @@
+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 SuperUser {
+
+    private Integer userId;
+
+    private String  userName;
+
+    private Integer power;
+
+    private String  password;
+
+    private String  profile;
+
+    private String  delFlag;
+
+
+    public String getDelFlag() {
+
+        return delFlag;
+    }
+
+
+    public void setDelFlag(String delFlag) {
+
+        this.delFlag = delFlag;
+    }
+
+
+    public Integer getUserId() {
+
+        return userId;
+    }
+
+
+    public void setUserId(Integer userId) {
+
+        this.userId = userId;
+    }
+
+
+    public String getUserName() {
+
+        return userName;
+    }
+
+
+    public void setUserName(String userName) {
+
+        this.userName = userName;
+    }
+
+
+    public Integer getPower() {
+
+        return power;
+    }
+
+
+    public void setPower(Integer power) {
+
+        this.power = power;
+    }
+
+
+    public String getPassword() {
+
+        return password;
+    }
+
+
+    public void setPassword(String password) {
+
+        this.password = password;
+    }
+
+
+    public String getProfile() {
+
+        return profile;
+    }
+
+
+    public void setProfile(String profile) {
+
+        this.profile = profile;
+    }
+
+
+    @Override
+    public String toString() {
+
+        return "SuperUser [userId=" + userId + ", userName=" + userName + ", power=" + power + ", password=" + password + ", profile=" + profile
+                + ", delFlag=" + delFlag + "]";
+    }
+}

+ 66 - 0
src/main/java/com/izouma/awesomeadmin/model/SysDatarule.java

@@ -0,0 +1,66 @@
+package com.izouma.awesomeadmin.model;
+
+import java.util.*;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * sys_datarule 实体类
+ * Tue Apr 17 10:44:06 CST 2018  Suo Chen Cheng
+ */ 
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class SysDatarule{
+
+	private Integer id;
+
+	private String dataruleName;
+
+	private Date createDate;
+
+	private String delFlag;
+	private String permission;
+
+	public String getPermission() {
+		return permission;
+	}
+
+	public void setPermission(String permission) {
+		this.permission = permission;
+	}
+
+	public void setId(Integer id){
+		this.id=id;
+	}
+
+	public Integer getId(){
+		return id;
+	}
+
+	public void setDataruleName(String dataruleName){
+		this.dataruleName=dataruleName;
+	}
+
+	public String getDataruleName(){
+		return dataruleName;
+	}
+
+	public void setCreateDate(Date createDate){
+		this.createDate=createDate;
+	}
+
+	public Date getCreateDate(){
+		return createDate;
+	}
+
+	public void setDelFlag(String delFlag){
+		this.delFlag=delFlag;
+	}
+
+	public String getDelFlag(){
+		return delFlag;
+	}
+
+}
+

+ 224 - 0
src/main/java/com/izouma/awesomeadmin/model/SysMenu.java

@@ -0,0 +1,224 @@
+package com.izouma.awesomeadmin.model;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * sys_menu 实体类
+ * Tue Apr 10 18:09:44 CST 2018  Suo Chen Cheng
+ */
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class SysMenu implements Cloneable {
+
+    private Integer id;
+
+    private Integer parentId;
+
+    private String parentIds;
+
+    private String name;
+
+    private BigDecimal sort;
+
+    private String href;
+
+    private String target;
+
+    private String icon;
+
+    private String isShow;
+
+    private String permission;
+
+    private String createBy;
+
+    private Date createDate;
+
+    private String updateBy;
+
+    private Date updateDate;
+
+    private String remarks;
+
+    private String delFlag;
+
+    private String menuType;
+
+    private List<SysMenu> children;
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setParentId(Integer parentId) {
+        this.parentId = parentId;
+    }
+
+    public Integer getParentId() {
+        return parentId;
+    }
+
+    public void setParentIds(String parentIds) {
+        this.parentIds = parentIds;
+    }
+
+    public String getParentIds() {
+        return parentIds;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setSort(BigDecimal sort) {
+        this.sort = sort;
+    }
+
+    public BigDecimal getSort() {
+        return sort;
+    }
+
+    public void setHref(String href) {
+        this.href = href;
+    }
+
+    public String getHref() {
+        return href;
+    }
+
+    public void setTarget(String target) {
+        this.target = target;
+    }
+
+    public String getTarget() {
+        return target;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    public String getIcon() {
+        return icon;
+    }
+
+    public void setIsShow(String isShow) {
+        this.isShow = isShow;
+    }
+
+    public String getIsShow() {
+        return isShow;
+    }
+
+    public void setPermission(String permission) {
+        this.permission = permission;
+    }
+
+    public String getPermission() {
+        return permission;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateDate(Date createDate) {
+        this.createDate = createDate;
+    }
+
+    public Date getCreateDate() {
+        return createDate;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateDate(Date updateDate) {
+        this.updateDate = updateDate;
+    }
+
+    public Date getUpdateDate() {
+        return updateDate;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setMenuType(String menuType) {
+        this.menuType = menuType;
+    }
+
+    public String getMenuType() {
+        return menuType;
+    }
+
+    public List<SysMenu> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<SysMenu> children) {
+        this.children = children;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof SysMenu) {
+            return Objects.equals(this.id, ((SysMenu) obj).getId());
+        }
+        return super.equals(obj);
+    }
+
+    @Override
+    public int hashCode() {
+        return this.id.hashCode();
+    }
+
+    @Override
+    public SysMenu clone() {
+        SysMenu menu = null;
+        try {
+            menu = (SysMenu) super.clone();
+        } catch (CloneNotSupportedException e) {
+            e.printStackTrace();
+        }
+        return menu;
+    }
+}
+

+ 177 - 0
src/main/java/com/izouma/awesomeadmin/model/SysRole.java

@@ -0,0 +1,177 @@
+package com.izouma.awesomeadmin.model;
+
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+import java.util.Date;
+
+/**
+ * sys_role 实体类
+ * Tue Apr 10 18:09:56 CST 2018  Suo Chen Cheng
+ */ 
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class SysRole{
+
+	private Integer id;
+
+	private String officeId;
+
+	private String name;
+
+	private String enname;
+
+	private String roleType;
+
+	private String isSys;
+
+	private String useable;
+
+	private String createBy;
+
+	private Date createDate;
+
+	private String updateBy;
+
+	private Date updateDate;
+
+	private String remarks;
+
+	private String delFlag;
+	private String idStr;
+
+	private String menuIds;
+	private String permission;
+
+	public String getMenuIds() {
+		return menuIds;
+	}
+
+	public void setMenuIds(String menuIds) {
+		this.menuIds = menuIds;
+	}
+
+	public String getPermission() {
+		return permission;
+	}
+
+	public void setPermission(String permission) {
+		this.permission = permission;
+	}
+
+	public String getIdStr() {
+		return idStr;
+	}
+
+	public void setIdStr(String idStr) {
+		this.idStr = idStr;
+	}
+
+	public void setId(Integer id){
+		this.id=id;
+	}
+
+	public Integer getId(){
+		return id;
+	}
+
+	public void setOfficeId(String officeId){
+		this.officeId=officeId;
+	}
+
+	public String getOfficeId(){
+		return officeId;
+	}
+
+	public void setName(String name){
+		this.name=name;
+	}
+
+	public String getName(){
+		return name;
+	}
+
+	public void setEnname(String enname){
+		this.enname=enname;
+	}
+
+	public String getEnname(){
+		return enname;
+	}
+
+	public void setRoleType(String roleType){
+		this.roleType=roleType;
+	}
+
+	public String getRoleType(){
+		return roleType;
+	}
+
+	public void setIsSys(String isSys){
+		this.isSys=isSys;
+	}
+
+	public String getIsSys(){
+		return isSys;
+	}
+
+	public void setUseable(String useable){
+		this.useable=useable;
+	}
+
+	public String getUseable(){
+		return useable;
+	}
+
+	public void setCreateBy(String createBy){
+		this.createBy=createBy;
+	}
+
+	public String getCreateBy(){
+		return createBy;
+	}
+
+	public void setCreateDate(Date createDate){
+		this.createDate=createDate;
+	}
+
+	public Date getCreateDate(){
+		return createDate;
+	}
+
+	public void setUpdateBy(String updateBy){
+		this.updateBy=updateBy;
+	}
+
+	public String getUpdateBy(){
+		return updateBy;
+	}
+
+	public void setUpdateDate(Date updateDate){
+		this.updateDate=updateDate;
+	}
+
+	public Date getUpdateDate(){
+		return updateDate;
+	}
+
+	public void setRemarks(String remarks){
+		this.remarks=remarks;
+	}
+
+	public String getRemarks(){
+		return remarks;
+	}
+
+	public void setDelFlag(String delFlag){
+		this.delFlag=delFlag;
+	}
+
+	public String getDelFlag(){
+		return delFlag;
+	}
+
+}
+

+ 374 - 0
src/main/java/com/izouma/awesomeadmin/model/TableField.java

@@ -0,0 +1,374 @@
+package com.izouma.awesomeadmin.model;
+
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * table_field 实体类
+ * Fri May 04 13:38:24 CST 2018  Suo Chen Cheng
+ */
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class TableField {
+
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 字段名
+     */
+    private String name;
+
+    /**
+     * 驼峰式名字
+     */
+    private String modelName;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 数据类型(数据库)
+     */
+    private String jdbcType;
+
+    /**
+     * java类型
+     */
+    private String javaType;
+
+    /**
+     * 长度
+     */
+    private Integer length;
+
+    /**
+     * 小数长度
+     */
+    private Integer decimalPlaces;
+
+    /**
+     * 默认值
+     */
+    private String defaultValue;
+
+    /**
+     * 非空
+     */
+    private Boolean notNull;
+
+    /**
+     * 主键
+     */
+    private Boolean primaryKey;
+
+    /**
+     * 自增
+     */
+    private Boolean autoIncrease;
+
+    /**
+     * 在列表中显示
+     */
+    private Boolean showInList;
+
+    /**
+     * 在表单中显示
+     */
+    private Boolean showInForm;
+
+    /**
+     * 可以搜索
+     */
+    private Boolean searchable;
+
+    /**
+     * 可以排序
+     */
+    private Boolean sortable;
+
+    /**
+     * 表单类型
+     */
+    private String formType;
+
+    /**
+     * 搜索方式
+     */
+    private String searchMethod;
+
+    /**
+     * 表单必填
+     */
+    private Boolean required;
+
+    /**
+     * 表单验证
+     */
+    private Boolean validate;
+
+    /**
+     * 最短长度
+     */
+    private Integer minLength;
+
+    /**
+     * 最大长度
+     */
+    private Integer maxLength;
+
+    /**
+     * 最小值
+     */
+    private String min;
+
+    /**
+     * 最大值
+     */
+    private String max;
+
+    /**
+     * 验证类型
+     */
+    private String validatorType;
+
+    /**
+     * xml里jdbcType
+     */
+    private String sqlType;
+
+    private Boolean apiFlag;
+
+    private String optionsValue;
+
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setJdbcType(String jdbcType) {
+        this.jdbcType = jdbcType;
+    }
+
+    public String getJdbcType() {
+        return jdbcType;
+    }
+
+    public void setJavaType(String javaType) {
+        this.javaType = javaType;
+    }
+
+    public String getJavaType() {
+        return javaType;
+    }
+
+    public void setLength(Integer length) {
+        this.length = length;
+    }
+
+    public Integer getLength() {
+        return length;
+    }
+
+    public void setDecimalPlaces(Integer decimalPlaces) {
+        this.decimalPlaces = decimalPlaces;
+    }
+
+    public Integer getDecimalPlaces() {
+        return decimalPlaces;
+    }
+
+    public void setDefaultValue(String defaultValue) {
+        this.defaultValue = defaultValue;
+    }
+
+    public String getDefaultValue() {
+        return defaultValue;
+    }
+
+    public void setNotNull(Boolean notNull) {
+        this.notNull = notNull;
+    }
+
+    public Boolean getNotNull() {
+        return notNull;
+    }
+
+    public void setPrimaryKey(Boolean primaryKey) {
+        this.primaryKey = primaryKey;
+    }
+
+    public Boolean getPrimaryKey() {
+        return primaryKey;
+    }
+
+    public void setAutoIncrease(Boolean autoIncrease) {
+        this.autoIncrease = autoIncrease;
+    }
+
+    public Boolean getAutoIncrease() {
+        return autoIncrease;
+    }
+
+    public void setShowInList(Boolean showInList) {
+        this.showInList = showInList;
+    }
+
+    public Boolean getShowInList() {
+        return showInList;
+    }
+
+    public void setShowInForm(Boolean showInForm) {
+        this.showInForm = showInForm;
+    }
+
+    public Boolean getShowInForm() {
+        return showInForm;
+    }
+
+    public void setSearchable(Boolean searchable) {
+        this.searchable = searchable;
+    }
+
+    public Boolean getSearchable() {
+        return searchable;
+    }
+
+    public void setFormType(String formType) {
+        this.formType = formType;
+    }
+
+    public String getFormType() {
+        return formType;
+    }
+
+    public void setSearchMethod(String searchMethod) {
+        this.searchMethod = searchMethod;
+    }
+
+    public String getSearchMethod() {
+        return searchMethod;
+    }
+
+    public void setRequired(Boolean required) {
+        this.required = required;
+    }
+
+    public Boolean getRequired() {
+        return required;
+    }
+
+    public void setValidate(Boolean validate) {
+        this.validate = validate;
+    }
+
+    public Boolean getValidate() {
+        return validate;
+    }
+
+    public void setMinLength(Integer minLength) {
+        this.minLength = minLength;
+    }
+
+    public Integer getMinLength() {
+        return minLength;
+    }
+
+    public void setMaxLength(Integer maxLength) {
+        this.maxLength = maxLength;
+    }
+
+    public Integer getMaxLength() {
+        return maxLength;
+    }
+
+    public void setMin(String min) {
+        this.min = min;
+    }
+
+    public String getMin() {
+        return min;
+    }
+
+    public void setMax(String max) {
+        this.max = max;
+    }
+
+    public String getMax() {
+        return max;
+    }
+
+    public void setValidatorType(String validatorType) {
+        this.validatorType = validatorType;
+    }
+
+    public String getValidatorType() {
+        return validatorType;
+    }
+
+    public String getSqlType() {
+        return sqlType;
+    }
+
+    public void setSqlType(String sqlType) {
+        this.sqlType = sqlType;
+    }
+
+    public String getModelName() {
+        return modelName;
+    }
+
+    public void setModelName(String modelName) {
+        this.modelName = modelName;
+    }
+
+    public Boolean getSortable() {
+        return sortable;
+    }
+
+    public void setSortable(Boolean sortable) {
+        this.sortable = sortable;
+    }
+
+    public Boolean getApiFlag() {
+        return apiFlag;
+    }
+
+    public void setApiFlag(Boolean apiFlag) {
+        this.apiFlag = apiFlag;
+    }
+
+    public String getOptionsValue() {
+        return optionsValue;
+    }
+
+    public void setOptionsValue(String optionsValue) {
+        this.optionsValue = optionsValue;
+    }
+}
+

+ 328 - 0
src/main/java/com/izouma/awesomeadmin/model/UserInfo.java

@@ -0,0 +1,328 @@
+package com.izouma.awesomeadmin.model;
+
+import java.util.*;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * user_info 实体类
+ * Tue Apr 17 10:32:49 CST 2018  Suo Chen Cheng
+ */
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class UserInfo {
+
+    private Integer id;
+
+    private String username;
+
+    private String nickname;
+
+    private String password;
+
+    private String icon;
+
+    private Date birthday;
+
+    private String sex;
+
+    private String openId;
+
+    private String unionId;
+
+    private String phone;
+
+    private String mail;
+
+    private String country;
+
+    private String province;
+
+    private String city;
+
+    private String district;
+
+    private String roleId;
+
+    private Date createTime;
+
+    private String delFlag;
+
+    private String departId;
+
+    private Double moneyCoin;
+
+    private Double moneyPoint;
+
+    private String contacter;
+
+    private String contactPhone;
+
+    private String companyName;
+
+    private String companyType;
+
+    private String adminFlag;
+
+    private Integer cashPledge;
+
+    private String approveFlag;
+
+    private String storeFlag;
+
+    private String companyFlag;
+
+    private Integer approveStep;
+
+
+    public String getDepartId() {
+        return departId;
+    }
+
+    public void setDepartId(String departId) {
+        this.departId = departId;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+
+    public String getNickname() {
+        return nickname;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    public String getIcon() {
+        return icon;
+    }
+
+    public void setBirthday(Date birthday) {
+        this.birthday = birthday;
+    }
+
+    public Date getBirthday() {
+        return birthday;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    public String getSex() {
+        return sex;
+    }
+
+    public void setOpenId(String openId) {
+        this.openId = openId;
+    }
+
+    public String getOpenId() {
+        return openId;
+    }
+
+    public void setUnionId(String unionId) {
+        this.unionId = unionId;
+    }
+
+    public String getUnionId() {
+        return unionId;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setMail(String mail) {
+        this.mail = mail;
+    }
+
+    public String getMail() {
+        return mail;
+    }
+
+    public void setCountry(String country) {
+        this.country = country;
+    }
+
+    public String getCountry() {
+        return country;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setDistrict(String district) {
+        this.district = district;
+    }
+
+    public String getDistrict() {
+        return district;
+    }
+
+    public void setRoleId(String roleId) {
+        this.roleId = roleId;
+    }
+
+    public String getRoleId() {
+        return roleId;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public Double getMoneyCoin() {
+        return moneyCoin;
+    }
+
+    public void setMoneyCoin(Double moneyCoin) {
+        this.moneyCoin = moneyCoin;
+    }
+
+    public Double getMoneyPoint() {
+        return moneyPoint;
+    }
+
+    public void setMoneyPoint(Double moneyPoint) {
+        this.moneyPoint = moneyPoint;
+    }
+
+    public String getContacter() {
+        return contacter;
+    }
+
+    public void setContacter(String contacter) {
+        this.contacter = contacter;
+    }
+
+    public String getContactPhone() {
+        return contactPhone;
+    }
+
+    public void setContactPhone(String contactPhone) {
+        this.contactPhone = contactPhone;
+    }
+
+    public String getCompanyName() {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName) {
+        this.companyName = companyName;
+    }
+
+    public String getCompanyType() {
+        return companyType;
+    }
+
+    public void setCompanyType(String companyType) {
+        this.companyType = companyType;
+    }
+
+    public String getAdminFlag() {
+        return adminFlag;
+    }
+
+    public void setAdminFlag(String adminFlag) {
+        this.adminFlag = adminFlag;
+    }
+
+    public Integer getCashPledge() {
+        return cashPledge;
+    }
+
+    public void setCashPledge(Integer cashPledge) {
+        this.cashPledge = cashPledge;
+    }
+
+    public String getApproveFlag() {
+        return approveFlag;
+    }
+
+    public void setApproveFlag(String approveFlag) {
+        this.approveFlag = approveFlag;
+    }
+
+    public String getStoreFlag() {
+        return storeFlag;
+    }
+
+    public void setStoreFlag(String storeFlag) {
+        this.storeFlag = storeFlag;
+    }
+
+    public String getCompanyFlag() {
+        return companyFlag;
+    }
+
+    public void setCompanyFlag(String companyFlag) {
+        this.companyFlag = companyFlag;
+    }
+
+    public Integer getApproveStep() {
+        return approveStep;
+    }
+
+    public void setApproveStep(Integer approveStep) {
+        this.approveStep = approveStep;
+    }
+
+}
+

+ 195 - 0
src/main/java/com/izouma/awesomeadmin/model/WxpayTemp.java

@@ -0,0 +1,195 @@
+package com.izouma.awesomeadmin.model;
+
+import java.math.BigDecimal;
+import java.util.*;
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class WxpayTemp{
+    private Integer id;
+    private String delFlag;
+    private Date updateTime;
+    private String updateUser;
+    private Date createTime;
+    private String createUser;
+    private String orderId;
+    private String userId;
+    private BigDecimal totalAmount;
+    private String outTradeNo;
+    private String transactionId;
+    private Integer typeFlag;
+    private String outRefundNo;
+    private BigDecimal refundAmount;
+    private BigDecimal coin;
+    private BigDecimal point;
+    private BigDecimal cash;
+    private String openId;
+
+private String searchKey;
+
+/**
+* and,test_name,like,value;or,remark,=,123
+*/
+private String advancedQuery;
+
+/**
+* column_name_,desc_;column_name_,asc
+*/
+private String orderByStr;
+
+    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 Date getUpdateTime(){
+        return this.updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime){
+        this.updateTime = updateTime;
+    }
+    public String getUpdateUser(){
+        return this.updateUser;
+    }
+
+    public void setUpdateUser(String updateUser){
+        this.updateUser = updateUser;
+    }
+    public Date getCreateTime(){
+        return this.createTime;
+    }
+
+    public void setCreateTime(Date createTime){
+        this.createTime = createTime;
+    }
+    public String getCreateUser(){
+        return this.createUser;
+    }
+
+    public void setCreateUser(String createUser){
+        this.createUser = createUser;
+    }
+    public String getOrderId(){
+        return this.orderId;
+    }
+
+    public void setOrderId(String orderId){
+        this.orderId = orderId;
+    }
+    public String getUserId(){
+        return this.userId;
+    }
+
+    public void setUserId(String userId){
+        this.userId = userId;
+    }
+    public BigDecimal getTotalAmount(){
+        return this.totalAmount;
+    }
+
+    public void setTotalAmount(BigDecimal totalAmount){
+        this.totalAmount = totalAmount;
+    }
+    public String getOutTradeNo(){
+        return this.outTradeNo;
+    }
+
+    public void setOutTradeNo(String outTradeNo){
+        this.outTradeNo = outTradeNo;
+    }
+    public String getTransactionId(){
+        return this.transactionId;
+    }
+
+    public void setTransactionId(String transactionId){
+        this.transactionId = transactionId;
+    }
+    public Integer getTypeFlag(){
+        return this.typeFlag;
+    }
+
+    public void setTypeFlag(Integer typeFlag){
+        this.typeFlag = typeFlag;
+    }
+    public String getOutRefundNo(){
+        return this.outRefundNo;
+    }
+
+    public void setOutRefundNo(String outRefundNo){
+        this.outRefundNo = outRefundNo;
+    }
+    public BigDecimal getRefundAmount(){
+        return this.refundAmount;
+    }
+
+    public void setRefundAmount(BigDecimal refundAmount){
+        this.refundAmount = refundAmount;
+    }
+    public BigDecimal getCoin(){
+        return this.coin;
+    }
+
+    public void setCoin(BigDecimal coin){
+        this.coin = coin;
+    }
+    public BigDecimal getPoint(){
+        return this.point;
+    }
+
+    public void setPoint(BigDecimal point){
+        this.point = point;
+    }
+    public BigDecimal getCash(){
+        return this.cash;
+    }
+
+    public void setCash(BigDecimal cash){
+        this.cash = cash;
+    }
+    public String getOpenId(){
+        return this.openId;
+    }
+
+    public void setOpenId(String openId){
+        this.openId = openId;
+    }
+
+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 getOrderByStr() {
+    return orderByStr;
+}
+
+public void setOrderByStr(String orderByStr) {
+    this.orderByStr = orderByStr;
+}
+
+}
+

+ 27 - 0
src/main/java/com/izouma/awesomeadmin/service/AlipayTempService.java

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.AlipayTemp;
+
+
+/**
+*  service接口类
+*/
+public interface AlipayTempService{
+
+    List<AlipayTemp> getAlipayTempList(AlipayTemp record);
+
+    List<AlipayTemp> getAlipayTempByPage(Page page, AlipayTemp record);
+
+    AlipayTemp getAlipayTempById(String id);
+
+    AlipayTemp getAlipayTemp(AlipayTemp record);
+
+    boolean createAlipayTemp(AlipayTemp record);
+
+    boolean deleteAlipayTemp(String id);
+
+    boolean updateAlipayTemp(AlipayTemp record);
+}
+

+ 29 - 0
src/main/java/com/izouma/awesomeadmin/service/CommonQueryService.java

@@ -0,0 +1,29 @@
+package com.izouma.awesomeadmin.service;
+
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.CommonQuery;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * service接口类
+ */
+public interface CommonQueryService {
+
+
+    List<Map> getTableListByPage(Page page, CommonQuery record);
+
+    List<Map> getTableListAll(CommonQuery record);
+
+    Map selectByPrimaryKey(CommonQuery record);
+
+    boolean create(Map<String, Object> parameter);
+
+
+    boolean update(Map<String, Object> parameter);
+
+    boolean delete(CommonQuery record);
+}
+

+ 27 - 0
src/main/java/com/izouma/awesomeadmin/service/DataSourceInfoService.java

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.DataSourceInfo;
+
+
+/**
+*  service接口类
+*/
+public interface DataSourceInfoService{
+
+    List<DataSourceInfo> getDataSourceInfoList(DataSourceInfo record);
+
+    List<DataSourceInfo> getDataSourceInfoByPage(Page page, DataSourceInfo record);
+
+    DataSourceInfo getDataSourceInfoById(String id);
+
+    DataSourceInfo getDataSourceInfo(DataSourceInfo record);
+
+    boolean createDataSourceInfo(DataSourceInfo record);
+
+    boolean deleteDataSourceInfo(String id);
+
+    boolean updateDataSourceInfo(DataSourceInfo record);
+}
+

+ 36 - 0
src/main/java/com/izouma/awesomeadmin/service/DepartInfoService.java

@@ -0,0 +1,36 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.List;
+
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.dto.TreeNode;
+import com.izouma.awesomeadmin.model.DepartInfo;
+import com.izouma.awesomeadmin.model.UserInfo;
+
+/**
+ * depart_info service接口类
+ * Thu Apr 26 10:56:37 CST 2018  Suo Chen Cheng
+ */
+public interface DepartInfoService {
+
+    List<DepartInfo> getDepartInfoList(DepartInfo record);
+
+    List<DepartInfo> getDepartInfoByPage(Page page, DepartInfo record);
+
+    DepartInfo getDepartInfoById(String id);
+
+    DepartInfo getDepartInfo(DepartInfo record);
+
+    boolean createDepartInfo(DepartInfo record);
+
+    boolean deleteDepartInfo(String id);
+
+    boolean updateDepartInfo(DepartInfo record);
+
+    List<DepartInfo> getParentList(Integer id);
+
+    List<TreeNode> getDepartTree(boolean all, Integer userId);
+
+    List<UserInfo> getDepartUsers(Integer departId);
+}
+

+ 29 - 0
src/main/java/com/izouma/awesomeadmin/service/GenCodeService.java

@@ -0,0 +1,29 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.List;
+
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.GenCode;
+
+/**
+ * gen_code_model service接口类
+ * Fri May 04 15:57:06 CST 2018  Suo Chen Cheng
+ */ 
+public interface GenCodeService {
+
+	List <GenCode> getGenCodeList(GenCode record);
+
+	List <GenCode> getGenCodeByPage(Page page, GenCode record);
+
+	GenCode getGenCodeById(String id);
+
+	GenCode getGenCode(GenCode record);
+
+	boolean createGenCode(GenCode record);
+
+	boolean deleteGenCode(String id);
+
+	boolean updateGenCode(GenCode record);
+
+}
+

+ 65 - 0
src/main/java/com/izouma/awesomeadmin/service/ImageFileService.java

@@ -0,0 +1,65 @@
+package com.izouma.awesomeadmin.service;
+
+import java.io.InputStream;
+
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Service;
+
+import com.aliyun.oss.OSSClient;
+import com.aliyun.oss.model.OSSObject;
+import com.aliyun.oss.model.ObjectMetadata;
+import com.aliyun.oss.model.PutObjectResult;
+import com.izouma.awesomeadmin.util.PropertiesFileLoader;
+
+@Service
+public class ImageFileService {
+
+    /**
+     * 日志对象
+     */
+    private static Logger logger = Logger.getLogger(ImageFileService.class);
+
+
+    public String UpLoadImage(InputStream fin, String path) {
+
+        logger.info("UpLoadImage :上传照片 开始  : fin:" + fin + "; phth: " + path);
+        // TODO Auto-generated method stub
+        String aliid = PropertiesFileLoader.getDefaultProperties("aliossid", "");
+        String alikey = PropertiesFileLoader.getDefaultProperties("aliosskey", "");
+        String aliossendpoit = PropertiesFileLoader.getDefaultProperties("aliossendpoit", "");
+        String bucketname = PropertiesFileLoader.getDefaultProperties("alibucketname", "izouma");
+        OSSClient client = new OSSClient(aliossendpoit, aliid, alikey);
+        OSSObject object = null;
+        logger.info("UpLoadImage :上传照片  : aliid:" + aliid + "; alikey: " + alikey + "; aliossendpoit : " + aliossendpoit + "; bucketname:"
+                + bucketname);
+        if (path.startsWith("/")) {
+            return "invalid path";
+        }
+        @SuppressWarnings("unused")
+        PutObjectResult result = client.putObject(bucketname, path, fin, new ObjectMetadata());
+
+        try {
+            object = client.getObject(bucketname, path);
+        } catch (Exception r) {
+            logger.error("UpLoadImage: 上传照片异常 ", r);
+        }
+        // 如果不设置content-length, 默认为chunked编码。
+        if (object != null) {
+            return "file exist";
+        }
+
+        return "success";
+    }
+
+
+    public static String GetRealImagePath(String Path) {
+
+        // TODO Auto-generated method stub
+        if (Path == null || "".equals(Path) || Path.startsWith("images")) {
+            return Path;
+        }
+        String aliossendpoit = PropertiesFileLoader.getDefaultProperties("aliImageSever", "");
+        return aliossendpoit + "/" + Path;
+    }
+
+}

+ 278 - 0
src/main/java/com/izouma/awesomeadmin/service/OSSFileService.java

@@ -0,0 +1,278 @@
+package com.izouma.awesomeadmin.service;
+
+import com.aliyun.oss.OSSClient;
+import com.aliyun.oss.model.OSSObject;
+import com.aliyun.oss.model.ObjectMetadata;
+import com.izouma.awesomeadmin.util.ImagesUtil;
+import com.izouma.awesomeadmin.util.PropertiesFileLoader;
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Random;
+import java.util.zip.Adler32;
+import java.util.zip.CheckedOutputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+
+@Service
+public class OSSFileService {
+
+    /**
+     * 日志对象
+     */
+    private static Logger logger = Logger.getLogger(OSSFileService.class);
+    private static final String projectName = PropertiesFileLoader.getProperties("projectname");
+
+    public String upload(InputStream fin, String path) {
+        if (path.startsWith("/")) {
+            path = path.replaceFirst("\\\\/", "");
+        }
+        path = projectName + "/" + path;
+
+        String aliid = PropertiesFileLoader.getDefaultProperties("aliossid", "");
+        String alikey = PropertiesFileLoader.getDefaultProperties("aliosskey", "");
+        String aliossendpoit = PropertiesFileLoader.getDefaultProperties("aliossendpoit", "");
+        String bucketname = PropertiesFileLoader.getDefaultProperties("alibucketname", "");
+        logger.info(String.format("OSS上传:\naliid: %s\nalikey: %s\naliossendpoit: %s\nbucketname: %s\npath: %s", aliid, alikey, aliossendpoit, bucketname, path));
+
+        OSSClient client = new OSSClient(aliossendpoit, aliid, alikey);
+        OSSObject object = null;
+        try {
+            client.putObject(bucketname, path, fin, new ObjectMetadata());
+            object = client.getObject(bucketname, path);
+        } catch (Exception r) {
+            logger.error("OSS上传异常:", r);
+        }
+        // 如果不设置content-length, 默认为chunked编码。
+        if (object != null) {
+            return getFullPath(path);
+        }
+        return null;
+    }
+
+
+    private static String getFullPath(String Path) {
+        if (Path == null || "".equals(Path)) {
+            return Path;
+        }
+        String aliossendpoit = PropertiesFileLoader.getDefaultProperties("aliImageSever", "");
+        return aliossendpoit + "/" + Path;
+    }
+
+
+    public String uploadImg(String base64) throws UnsupportedEncodingException {
+        try {
+            logger.info("uploadIcon:上传图片");
+
+            if (base64 == null) {
+                return null;
+            }
+            Random random = new Random();
+            StringBuilder randomCode = new StringBuilder();
+            for (int i = 0; i < 8; i++) {
+                randomCode.append(Integer.toString(random.nextInt(36), 36));
+            }
+            try {
+                String path = String.format("images/%s-%s.jpg", new SimpleDateFormat("yyyy-MM-dd-hh-mm-ss").format(new Date()), randomCode);
+                return upload(ImagesUtil.GenerateImage(base64), path);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            logger.error("上传图片异常");
+        }
+        return null;
+    }
+
+
+    /**
+     * @param objectName 不包含 bucketname 的 path
+     */
+    public void deleteObject(String objectName) {
+
+        if (StringUtils.isNotEmpty(objectName)) {
+            String aliid = PropertiesFileLoader.getDefaultProperties("aliossid", "");
+            String alikey = PropertiesFileLoader.getDefaultProperties("aliosskey", "");
+            String aliossendpoit = PropertiesFileLoader.getDefaultProperties("aliossendpoit", "");
+            String bucketname = PropertiesFileLoader.getDefaultProperties("alibucketname", "");
+            logger.info(String.format("OSS 删除:\naliid: %s\nalikey: %s\naliossendpoit: %s\nbucketname: %s\npath: %s", aliid, alikey, aliossendpoit, bucketname, objectName));
+
+            OSSClient client = new OSSClient(aliossendpoit, aliid, alikey);
+            // 删除文件。
+            client.deleteObject(bucketname, objectName);
+
+            // 关闭OSSClient。
+            client.shutdown();
+        }
+    }
+
+
+    /**
+     * 批量下载图片
+     *
+     * @param keyList  ossfileName 逗号分隔。
+     * @param zipName  压缩包名称
+     * @param request
+     * @param response
+     * @return
+     */
+    public HttpServletResponse zipFilesDown(List<String> keyList, String zipName, HttpServletRequest request, HttpServletResponse response) {
+
+        String accessKeyId = PropertiesFileLoader.getDefaultProperties("aliossid", "");
+        String accessKeySecret = PropertiesFileLoader.getDefaultProperties("aliosskey", "");
+        String endpoint = PropertiesFileLoader.getDefaultProperties("aliossendpoit", "");
+        String bucketName = PropertiesFileLoader.getDefaultProperties("alibucketname", "");
+
+        // endpoint以杭州为例,其它region请按实际情况填写
+        // 云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用RAM子账号进行API访问或日常运维,请登录 https://ram.console.aliyun.com 创建
+        try {
+            // 初始化
+            OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);
+            String fileName = zipName + ".zip";
+            // 创建临时文件
+            File zipFile = File.createTempFile(zipName, ".zip");
+            FileOutputStream f = new FileOutputStream(zipFile);
+            /**
+             * 作用是为任何OutputStream产生校验和
+             * 第一个参数是制定产生校验和的输出流,第二个参数是指定Checksum的类型 (Adler32(较快)和CRC32两种)
+             */
+            CheckedOutputStream csum = new CheckedOutputStream(f, new Adler32());
+            // 用于将数据压缩成Zip文件格式
+            ZipOutputStream zos = new ZipOutputStream(csum);
+
+            for (String ossfile : keyList) {
+                try {
+                    // 获取Object,返回结果为OSSObject对象
+                    OSSObject ossObject = ossClient.getObject(bucketName, ossfile);
+                    // 读去Object内容  返回
+                    InputStream inputStream = ossObject.getObjectContent();
+                    // 对于每一个要被存放到压缩包的文件,都必须调用ZipOutputStream对象的putNextEntry()方法,确保压缩包里面文件不同名
+
+                    zos.putNextEntry(new ZipEntry(ossfile.split("/")[ossfile.split("/").length - 1]));
+                    int bytesRead = 0;
+                    // 向压缩文件中输出数据
+                    while ((bytesRead = inputStream.read()) != -1) {
+                        zos.write(bytesRead);
+                    }
+                    inputStream.close();
+                    zos.closeEntry(); // 当前文件写完,定位为写入下一条项目
+                } catch (Exception e) {
+                    logger.error("ossfile, 压缩失败", e);
+                }
+            }
+            zos.close();
+            String header = request.getHeader("User-Agent").toUpperCase();
+            if (header.contains("MSIE") || header.contains("TRIDENT") || header.contains("EDGE")) {
+                fileName = URLEncoder.encode(fileName, "utf-8");
+                fileName = fileName.replace("+", "%20");    //IE下载文件名空格变+号问题
+            } else {
+                fileName = new String(fileName.getBytes(), "ISO8859-1");
+            }
+            response.reset();
+            response.setContentType("text/plain");
+            response.setContentType("application/octet-stream; charset=utf-8");
+            response.setHeader("Location", fileName);
+            response.setHeader("Cache-Control", "max-age=0");
+            response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
+
+            FileInputStream fis = new FileInputStream(zipFile);
+            BufferedInputStream buff = new BufferedInputStream(fis);
+            BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
+            byte[] car = new byte[1024];
+            int l = 0;
+            while (l < zipFile.length()) {
+                int j = buff.read(car, 0, 1024);
+                l += j;
+                out.write(car, 0, j);
+            }
+            // 关闭流
+            fis.close();
+            buff.close();
+            out.close();
+
+            ossClient.shutdown();
+            // 删除临时文件
+            zipFile.delete();
+        } catch (Exception e) {
+            logger.error("压缩失败", e);
+        }
+        return response;
+    }
+
+    /**
+     * 单张图片下载
+     *
+     * @param key
+     * @param request
+     * @param response
+     * @return
+     */
+    public HttpServletResponse singleFileDown(String key, HttpServletRequest request, HttpServletResponse response) {
+
+        String accessKeyId = PropertiesFileLoader.getDefaultProperties("aliossid", "");
+        String accessKeySecret = PropertiesFileLoader.getDefaultProperties("aliosskey", "");
+        String endpoint = PropertiesFileLoader.getDefaultProperties("aliossendpoit", "");
+        String bucketName = PropertiesFileLoader.getDefaultProperties("alibucketname", "");
+
+        // endpoint以杭州为例,其它region请按实际情况填写
+        // 云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用RAM子账号进行API访问或日常运维,请登录 https://ram.console.aliyun.com 创建
+        try {
+            // 初始化
+            OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);
+
+            // 获取Object,返回结果为OSSObject对象
+            OSSObject ossObject = ossClient.getObject(bucketName, key);
+            // 读去Object内容  返回
+            InputStream inputStream = ossObject.getObjectContent();
+            // 对于每一个要被存放到压缩包的文件,都必须调用ZipOutputStream对象的putNextEntry()方法,确保压缩包里面文件不同名
+            String fileName = key.split("/")[key.split("/").length - 1];
+
+            String header = request.getHeader("User-Agent").toUpperCase();
+            if (header.contains("MSIE") || header.contains("TRIDENT") || header.contains("EDGE")) {
+                fileName = URLEncoder.encode(fileName, "utf-8");
+                fileName = fileName.replace("+", "%20");    //IE下载文件名空格变+号问题
+            } else {
+                fileName = new String(fileName.getBytes(), "ISO8859-1");
+            }
+            response.reset();
+            response.setContentType("text/plain");
+            response.setContentType("application/octet-stream; charset=utf-8");
+            response.setHeader("Location", fileName);
+            response.setHeader("Cache-Control", "max-age=0");
+            response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
+
+            BufferedInputStream buff = new BufferedInputStream(inputStream);
+            BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
+            byte[] car = new byte[1024];
+            int l = 0;
+
+            while ((l = inputStream.read(car)) != -1) {
+                if (car.length != 0) {
+                    out.write(car, 0, l);
+                }
+            }
+
+            // 关闭流
+            inputStream.close();
+            buff.close();
+            out.close();
+
+            ossClient.shutdown();
+        } catch (Exception e) {
+            logger.error("下载图片失败", e);
+        }
+        return response;
+    }
+
+
+}

+ 32 - 0
src/main/java/com/izouma/awesomeadmin/service/PowerInfoService.java

@@ -0,0 +1,32 @@
+package com.izouma.awesomeadmin.service;
+
+
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.PowerInfo;
+
+import java.util.List;
+
+/**
+ * power_info service接口类
+ * Wed Apr 11 11:04:02 CST 2018  Suo Chen Cheng
+ */ 
+public interface PowerInfoService {
+
+	List<PowerInfo> getPowerInfoList(PowerInfo record);
+
+	List<PowerInfo> getPowerInfoByPage(Page page, PowerInfo record);
+
+	PowerInfo getPowerInfoById(String id);
+
+	PowerInfo getPowerInfo(PowerInfo record);
+
+	boolean createPowerInfo(PowerInfo record);
+
+	boolean deletePowerInfo(String id);
+
+	boolean updatePowerInfo(PowerInfo record);
+
+	boolean deletePowerInfoByRoleId(String roleId);
+
+}
+

+ 27 - 0
src/main/java/com/izouma/awesomeadmin/service/QueryConfigService.java

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.QueryConfig;
+
+
+/**
+*  service接口类
+*/
+public interface QueryConfigService{
+
+    List<QueryConfig> getQueryConfigList(QueryConfig record);
+
+    List<QueryConfig> getQueryConfigByPage(Page page, QueryConfig record);
+
+    QueryConfig getQueryConfigById(String id);
+
+    QueryConfig getQueryConfig(QueryConfig record);
+
+    boolean createQueryConfig(QueryConfig record);
+
+    boolean deleteQueryConfig(String id);
+
+    boolean updateQueryConfig(QueryConfig record);
+}
+

+ 11 - 0
src/main/java/com/izouma/awesomeadmin/service/RongYunTokenService.java

@@ -0,0 +1,11 @@
+package com.izouma.awesomeadmin.service;
+
+import com.izouma.awesomeadmin.model.RongYunToken;
+
+public interface RongYunTokenService {
+
+    Boolean saveRongToken(RongYunToken rongYunToken);
+
+
+    RongYunToken getRongToken(String rongKey);
+}

+ 53 - 0
src/main/java/com/izouma/awesomeadmin/service/SuperUserService.java

@@ -0,0 +1,53 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.SuperUser;
+
+public interface SuperUserService {
+
+    /**
+     * 
+     * <p>获取所有用户记录。</p>
+     *
+     * @return tblUser list
+     */
+    List <SuperUser> getSuperUserList();
+
+
+    /**
+     * 
+     * <p>获取所有用户记录。</p>
+     *
+     * @return tblUser list
+     */
+    List <SuperUser> getSuperUserByPage(Page page);
+
+
+    /**
+     * 
+     * <p>根据id获取指定用户详细信息。</p>
+     *
+     * @param id
+     * @return
+     */
+    SuperUser getSuperUserById(String id);
+
+
+    boolean updateSuperUserInfo(HttpServletRequest request);
+
+
+    boolean createUser(SuperUser superUser);
+
+
+    boolean deleteUser(String userId);
+
+
+    boolean updateUser(SuperUser superUser);
+
+
+    SuperUser UserLogin(String userName, String password);
+}

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików