Sfoglia il codice sorgente

fxi 修改包名称

fengxiaolei 2 anni fa
parent
commit
f8d81652e9
100 ha cambiato i file con 5616 aggiunte e 24 eliminazioni
  1. 24 24
      pom.xml
  2. 134 0
      product-center-manage-admin/pom.xml
  3. 30 0
      product-center-manage-admin/src/main/java/com/product/center/manage/RuoYiApplication.java
  4. 18 0
      product-center-manage-admin/src/main/java/com/product/center/manage/RuoYiServletInitializer.java
  5. 174 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/common/CommonController.java
  6. 98 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoDialogController.java
  7. 301 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoFormController.java
  8. 35 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoIconController.java
  9. 335 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoOperateController.java
  10. 53 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoReportController.java
  11. 848 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoTableController.java
  12. 116 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/domain/CustomerModel.java
  13. 99 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/domain/GoodsModel.java
  14. 153 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/domain/UserOperateModel.java
  15. 91 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/CacheController.java
  16. 27 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/DruidController.java
  17. 33 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/ServerController.java
  18. 104 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/SysLogininforController.java
  19. 92 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/SysOperlogController.java
  20. 94 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/SysUserOnlineController.java
  21. 94 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysCaptchaController.java
  22. 162 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysConfigController.java
  23. 189 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysDeptController.java
  24. 130 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysDictDataController.java
  25. 191 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysDictTypeController.java
  26. 190 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysIndexController.java
  27. 85 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysLoginController.java
  28. 209 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysMenuController.java
  29. 116 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysNoticeController.java
  30. 163 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysPostController.java
  31. 198 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysProfileController.java
  32. 47 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysRegisterController.java
  33. 335 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysRoleController.java
  34. 342 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysUserController.java
  35. 27 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/tool/BuildController.java
  36. 24 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/tool/SwaggerController.java
  37. 187 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/tool/TestController.java
  38. 68 0
      product-center-manage-admin/src/main/java/com/product/center/manage/web/core/config/SwaggerConfig.java
  39. 0 0
      product-center-manage-admin/src/main/resources/application-druid.yml
  40. 0 0
      product-center-manage-admin/src/main/resources/application.yml
  41. 0 0
      product-center-manage-admin/src/main/resources/banner.txt
  42. 0 0
      product-center-manage-admin/src/main/resources/ehcache/ehcache-shiro.xml
  43. 0 0
      product-center-manage-admin/src/main/resources/logback.xml
  44. 0 0
      product-center-manage-admin/src/main/resources/mybatis/mybatis-config.xml
  45. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/beautifyhtml/beautifyhtml.js
  46. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/blockUI/jquery.blockUI.js
  47. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.css
  48. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.js
  49. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.css
  50. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.js
  51. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading-sm.gif
  52. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading.gif
  53. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.css
  54. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.js
  55. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.css
  56. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.js
  57. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.css
  58. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js
  59. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js
  60. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js
  61. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js
  62. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.css
  63. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.min.js
  64. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.js
  65. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/clear.png
  66. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/loading.gif
  67. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js
  68. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/tableExport.min.js
  69. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js
  70. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.js
  71. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js
  72. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-columns/jquery.dragtable.js
  73. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js
  74. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/jquery.tablednd.js
  75. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js
  76. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/resizable/jquery.resizableColumns.min.js
  77. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.js
  78. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.min.js
  79. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.js
  80. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js
  81. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/cropper/cropper.css
  82. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/cropper/cropper.js
  83. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/cropper/cropper.min.css
  84. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/cropper/cropper.min.js
  85. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/cxselect/jquery.cxselect.js
  86. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/cxselect/jquery.cxselect.min.js
  87. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.css
  88. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.js
  89. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.css
  90. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.js
  91. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.css
  92. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.js
  93. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.min.css
  94. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.min.js
  95. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/flot/curvedLines.js
  96. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.js
  97. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.pie.js
  98. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.resize.js
  99. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.spline.js
  100. 0 0
      product-center-manage-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.symbol.js

+ 24 - 24
pom.xml

@@ -3,14 +3,14 @@
         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.ruoyi</groupId>
-    <artifactId>ruoyi</artifactId>
+    <groupId>com.product.center.manage</groupId>
+    <artifactId>product-center-manage</artifactId>
     <version>4.7.5</version>
 
-    <name>ruoyi</name>
+    <name>product-center-manage</name>
     <url>http://www.ruoyi.vip</url>
     <description>若依管理系统</description>
-    
+
     <properties>
         <ruoyi.version>4.7.5</ruoyi.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -36,7 +36,7 @@
     <!-- 依赖声明 -->
     <dependencyManagement>
         <dependencies>
-        
+
             <!-- SpringBoot的依赖配置-->
             <dependency>
                 <groupId>org.springframework.boot</groupId>
@@ -45,14 +45,14 @@
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
-            
+
             <!-- 阿里数据库连接池 -->
             <dependency>
                 <groupId>com.alibaba</groupId>
                 <artifactId>druid-spring-boot-starter</artifactId>
                 <version>${druid.version}</version>
             </dependency>
-            
+
             <!-- 验证码 -->
             <dependency>
                 <groupId>com.github.penggle</groupId>
@@ -166,36 +166,36 @@
 
             <!-- 定时任务-->
             <dependency>
-                <groupId>com.ruoyi</groupId>
-                <artifactId>ruoyi-quartz</artifactId>
+                <groupId>com.product.center.manage</groupId>
+                <artifactId>product-center-manage-quartz</artifactId>
                 <version>${ruoyi.version}</version>
             </dependency>
 
             <!-- 代码生成-->
             <dependency>
-                <groupId>com.ruoyi</groupId>
-                <artifactId>ruoyi-generator</artifactId>
+                <groupId>com.product.center.manage</groupId>
+                <artifactId>product-center-manage-generator</artifactId>
                 <version>${ruoyi.version}</version>
             </dependency>
 
             <!-- 核心模块-->
             <dependency>
-                <groupId>com.ruoyi</groupId>
-                <artifactId>ruoyi-framework</artifactId>
+                <groupId>com.product.center.manage</groupId>
+                <artifactId>product-center-manage-framework</artifactId>
                 <version>${ruoyi.version}</version>
             </dependency>
 
             <!-- 系统模块-->
             <dependency>
-                <groupId>com.ruoyi</groupId>
-                <artifactId>ruoyi-system</artifactId>
+                <groupId>com.product.center.manage</groupId>
+                <artifactId>product-center-manage-system</artifactId>
                 <version>${ruoyi.version}</version>
             </dependency>
 
             <!-- 通用工具-->
             <dependency>
-                <groupId>com.ruoyi</groupId>
-                <artifactId>ruoyi-common</artifactId>
+                <groupId>com.product.center.manage</groupId>
+                <artifactId>product-center-manage-common</artifactId>
                 <version>${ruoyi.version}</version>
             </dependency>
 
@@ -203,12 +203,12 @@
     </dependencyManagement>
 
     <modules>
-        <module>ruoyi-admin</module>
-        <module>ruoyi-framework</module>
-        <module>ruoyi-system</module>
-        <module>ruoyi-quartz</module>
-        <module>ruoyi-generator</module>
-        <module>ruoyi-common</module>
+        <module>product-center-manage-admin</module>
+        <module>product-center-manage-framework</module>
+        <module>product-center-manage-system</module>
+        <module>product-center-manage-quartz</module>
+        <module>product-center-manage-generator</module>
+        <module>product-center-manage-common</module>
     </modules>
     <packaging>pom</packaging>
 
@@ -257,4 +257,4 @@
         </pluginRepository>
     </pluginRepositories>
 
-</project>
+</project>

+ 134 - 0
product-center-manage-admin/pom.xml

@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>com.product.center.manage</groupId>
+        <artifactId>product-center-manage</artifactId>
+        <version>4.7.5</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+    <artifactId>product-center-manage-admin</artifactId>
+
+    <description>
+        web服务入口
+    </description>
+
+    <dependencies>
+
+        <!-- SpringBoot集成thymeleaf模板 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-thymeleaf</artifactId>
+        </dependency>
+
+        <!-- spring-boot-devtools -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <optional>true</optional> <!-- 表示依赖不会传递 -->
+        </dependency>
+
+        <!-- swagger3-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-boot-starter</artifactId>
+        </dependency>
+
+        <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+
+        <!-- Mysql驱动包 -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+
+        <!-- 核心模块-->
+        <dependency>
+            <groupId>com.product.center.manage</groupId>
+            <artifactId>product-center-manage-framework</artifactId>
+        </dependency>
+
+        <!-- 定时任务-->
+        <dependency>
+            <groupId>com.product.center.manage</groupId>
+            <artifactId>product-center-manage-quartz</artifactId>
+        </dependency>
+
+        <!-- 代码生成-->
+        <dependency>
+            <groupId>com.product.center.manage</groupId>
+            <artifactId>product-center-manage-generator</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.1.1.RELEASE</version>
+                <configuration>
+                    <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.0.0</version>
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                    <warName>${project.artifactId}</warName>
+                </configuration>
+            </plugin>
+            <!-- YUI Compressor (CSS/JS压缩)
+            <plugin>
+                <groupId>net.alchim31.maven</groupId>
+                <artifactId>yuicompressor-maven-plugin</artifactId>
+                <version>1.5.1</version>
+                <executions>
+                    <execution>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>compress</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <encoding>UTF-8</encoding>
+                    <jswarn>false</jswarn>
+                    <nosuffix>true</nosuffix>
+                    <linebreakpos>50000</linebreakpos>
+                    <sourceDirectory>src/main/resources/static</sourceDirectory>
+                    <force>true</force>
+                    <includes>
+                        <include>**/*.js</include>
+                        <include>**/*.css</include>
+                    </includes>
+                    <excludes>
+                        <exclude>**/*.min.js</exclude>
+                        <exclude>**/*.min.css</exclude>
+                        <exclude>**/fileinput.js</exclude>
+                        <exclude>**/bootstrap-table/**</exclude>
+                    </excludes>
+                </configuration>
+            </plugin> -->
+        </plugins>
+        <finalName>${project.artifactId}</finalName>
+    </build>
+
+</project>

+ 30 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/RuoYiApplication.java

@@ -0,0 +1,30 @@
+package com.product.center.manage;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+
+/**
+ * 启动程序
+ *
+ * @author ruoyi
+ */
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+public class RuoYiApplication
+{
+    public static void main(String[] args)
+    {
+        // System.setProperty("spring.devtools.restart.enabled", "false");
+        SpringApplication.run(RuoYiApplication.class, args);
+        System.out.println("(♥◠‿◠)ノ゙  若依启动成功   ლ(´ڡ`ლ)゙  \n" +
+                " .-------.       ____     __        \n" +
+                " |  _ _   \\      \\   \\   /  /    \n" +
+                " | ( ' )  |       \\  _. /  '       \n" +
+                " |(_ o _) /        _( )_ .'         \n" +
+                " | (_,_).' __  ___(_ o _)'          \n" +
+                " |  |\\ \\  |  ||   |(_,_)'         \n" +
+                " |  | \\ `'   /|   `-'  /           \n" +
+                " |  |  \\    /  \\      /           \n" +
+                " ''-'   `'-'    `-..-'              ");
+    }
+}

+ 18 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/RuoYiServletInitializer.java

@@ -0,0 +1,18 @@
+package com.product.center.manage;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+/**
+ * web容器中进行部署
+ *
+ * @author ruoyi
+ */
+public class RuoYiServletInitializer extends SpringBootServletInitializer
+{
+    @Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
+    {
+        return application.sources(RuoYiApplication.class);
+    }
+}

+ 174 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/common/CommonController.java

@@ -0,0 +1,174 @@
+package com.product.center.manage.web.controller.common;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.product.center.manage.common.config.RuoYiConfig;
+import com.product.center.manage.common.config.ServerConfig;
+import com.product.center.manage.common.constant.Constants;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.utils.StringUtils;
+import com.product.center.manage.common.utils.file.FileUploadUtils;
+import com.product.center.manage.common.utils.file.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import com.product.center.manage.common.config.RuoYiConfig;
+import com.product.center.manage.common.config.ServerConfig;
+import com.product.center.manage.common.constant.Constants;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.utils.StringUtils;
+import com.product.center.manage.common.utils.file.FileUploadUtils;
+import com.product.center.manage.common.utils.file.FileUtils;
+
+/**
+ * 通用请求处理
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/common")
+public class CommonController
+{
+    private static final Logger log = LoggerFactory.getLogger(CommonController.class);
+
+    @Autowired
+    private ServerConfig serverConfig;
+
+    private static final String FILE_DELIMETER = ",";
+
+    /**
+     * 通用下载请求
+     *
+     * @param fileName 文件名称
+     * @param delete 是否删除
+     */
+    @GetMapping("/download")
+    public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
+    {
+        try
+        {
+            if (!FileUtils.checkAllowDownload(fileName))
+            {
+                throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
+            }
+            String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
+            String filePath = RuoYiConfig.getDownloadPath() + fileName;
+
+            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+            FileUtils.setAttachmentResponseHeader(response, realFileName);
+            FileUtils.writeBytes(filePath, response.getOutputStream());
+            if (delete)
+            {
+                FileUtils.deleteFile(filePath);
+            }
+        }
+        catch (Exception e)
+        {
+            log.error("下载文件失败", e);
+        }
+    }
+
+    /**
+     * 通用上传请求(单个)
+     */
+    @PostMapping("/upload")
+    @ResponseBody
+    public AjaxResult uploadFile(MultipartFile file) throws Exception
+    {
+        try
+        {
+            // 上传文件路径
+            String filePath = RuoYiConfig.getUploadPath();
+            // 上传并返回新文件名称
+            String fileName = FileUploadUtils.upload(filePath, file);
+            String url = serverConfig.getUrl() + fileName;
+            AjaxResult ajax = AjaxResult.success();
+            ajax.put("url", url);
+            ajax.put("fileName", fileName);
+            ajax.put("newFileName", FileUtils.getName(fileName));
+            ajax.put("originalFilename", file.getOriginalFilename());
+            return ajax;
+        }
+        catch (Exception e)
+        {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 通用上传请求(多个)
+     */
+    @PostMapping("/uploads")
+    @ResponseBody
+    public AjaxResult uploadFiles(List<MultipartFile> files) throws Exception
+    {
+        try
+        {
+            // 上传文件路径
+            String filePath = RuoYiConfig.getUploadPath();
+            List<String> urls = new ArrayList<String>();
+            List<String> fileNames = new ArrayList<String>();
+            List<String> newFileNames = new ArrayList<String>();
+            List<String> originalFilenames = new ArrayList<String>();
+            for (MultipartFile file : files)
+            {
+                // 上传并返回新文件名称
+                String fileName = FileUploadUtils.upload(filePath, file);
+                String url = serverConfig.getUrl() + fileName;
+                urls.add(url);
+                fileNames.add(fileName);
+                newFileNames.add(FileUtils.getName(fileName));
+                originalFilenames.add(file.getOriginalFilename());
+            }
+            AjaxResult ajax = AjaxResult.success();
+            ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
+            ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
+            ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
+            ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
+            return ajax;
+        }
+        catch (Exception e)
+        {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 本地资源通用下载
+     */
+    @GetMapping("/download/resource")
+    public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
+            throws Exception
+    {
+        try
+        {
+            if (!FileUtils.checkAllowDownload(resource))
+            {
+                throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
+            }
+            // 本地资源路径
+            String localPath = RuoYiConfig.getProfile();
+            // 数据库资源地址
+            String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
+            // 下载名称
+            String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
+            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+            FileUtils.setAttachmentResponseHeader(response, downloadName);
+            FileUtils.writeBytes(downloadPath, response.getOutputStream());
+        }
+        catch (Exception e)
+        {
+            log.error("下载文件失败", e);
+        }
+    }
+}

+ 98 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoDialogController.java

@@ -0,0 +1,98 @@
+package com.product.center.manage.web.controller.demo.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * 模态窗口
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/demo/modal")
+public class DemoDialogController
+{
+    private String prefix = "demo/modal";
+
+    /**
+     * 模态窗口
+     */
+    @GetMapping("/dialog")
+    public String dialog()
+    {
+        return prefix + "/dialog";
+    }
+
+    /**
+     * 弹层组件
+     */
+    @GetMapping("/layer")
+    public String layer()
+    {
+        return prefix + "/layer";
+    }
+
+    /**
+     * 表单
+     */
+    @GetMapping("/form")
+    public String form()
+    {
+        return prefix + "/form";
+    }
+
+    /**
+     * 表格
+     */
+    @GetMapping("/table")
+    public String table()
+    {
+        return prefix + "/table";
+    }
+
+    /**
+     * 表格check
+     */
+    @GetMapping("/check")
+    public String check()
+    {
+        return prefix + "/table/check";
+    }
+
+    /**
+     * 表格radio
+     */
+    @GetMapping("/radio")
+    public String radio()
+    {
+        return prefix + "/table/radio";
+    }
+
+    /**
+     * 表格回传父窗体
+     */
+    @GetMapping("/parent")
+    public String parent()
+    {
+        return prefix + "/table/parent";
+    }
+
+    /**
+     * 多层窗口frame1
+     */
+    @GetMapping("/frame1")
+    public String frame1()
+    {
+        return prefix + "/table/frame1";
+    }
+
+    /**
+     * 多层窗口frame2
+     */
+    @GetMapping("/frame2")
+    public String frame2()
+    {
+        return prefix + "/table/frame2";
+    }
+}

File diff suppressed because it is too large
+ 301 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoFormController.java


+ 35 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoIconController.java

@@ -0,0 +1,35 @@
+package com.product.center.manage.web.controller.demo.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * 图标相关
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/demo/icon")
+public class DemoIconController
+{
+    private String prefix = "demo/icon";
+
+    /**
+     * FontAwesome图标
+     */
+    @GetMapping("/fontawesome")
+    public String fontAwesome()
+    {
+        return prefix + "/fontawesome";
+    }
+
+    /**
+     * Glyphicons图标
+     */
+    @GetMapping("/glyphicons")
+    public String glyphicons()
+    {
+        return prefix + "/glyphicons";
+    }
+}

+ 335 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoOperateController.java

@@ -0,0 +1,335 @@
+package com.product.center.manage.web.controller.demo.controller;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.page.PageDomain;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.core.text.Convert;
+import com.product.center.manage.common.exception.ServiceException;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.web.controller.demo.domain.CustomerModel;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.page.PageDomain;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.core.page.TableSupport;
+import com.product.center.manage.common.core.text.Convert;
+import com.product.center.manage.common.exception.ServiceException;
+import com.product.center.manage.common.utils.StringUtils;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.web.controller.demo.domain.CustomerModel;
+import com.product.center.manage.web.controller.demo.domain.UserOperateModel;
+
+/**
+ * 操作控制
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/demo/operate")
+public class DemoOperateController extends BaseController
+{
+    private String prefix = "demo/operate";
+
+    private final static Map<Integer, UserOperateModel> users = new LinkedHashMap<Integer, UserOperateModel>();
+    {
+        users.put(1, new UserOperateModel(1, "1000001", "测试1", "0", "15888888888", "ry@qq.com", 150.0, "0"));
+        users.put(2, new UserOperateModel(2, "1000002", "测试2", "1", "15666666666", "ry@qq.com", 180.0, "1"));
+        users.put(3, new UserOperateModel(3, "1000003", "测试3", "0", "15666666666", "ry@qq.com", 110.0, "1"));
+        users.put(4, new UserOperateModel(4, "1000004", "测试4", "1", "15666666666", "ry@qq.com", 220.0, "1"));
+        users.put(5, new UserOperateModel(5, "1000005", "测试5", "0", "15666666666", "ry@qq.com", 140.0, "1"));
+        users.put(6, new UserOperateModel(6, "1000006", "测试6", "1", "15666666666", "ry@qq.com", 330.0, "1"));
+        users.put(7, new UserOperateModel(7, "1000007", "测试7", "0", "15666666666", "ry@qq.com", 160.0, "1"));
+        users.put(8, new UserOperateModel(8, "1000008", "测试8", "1", "15666666666", "ry@qq.com", 170.0, "1"));
+        users.put(9, new UserOperateModel(9, "1000009", "测试9", "0", "15666666666", "ry@qq.com", 180.0, "1"));
+        users.put(10, new UserOperateModel(10, "1000010", "测试10", "0", "15666666666", "ry@qq.com", 210.0, "1"));
+        users.put(11, new UserOperateModel(11, "1000011", "测试11", "1", "15666666666", "ry@qq.com", 110.0, "1"));
+        users.put(12, new UserOperateModel(12, "1000012", "测试12", "0", "15666666666", "ry@qq.com", 120.0, "1"));
+        users.put(13, new UserOperateModel(13, "1000013", "测试13", "1", "15666666666", "ry@qq.com", 380.0, "1"));
+        users.put(14, new UserOperateModel(14, "1000014", "测试14", "0", "15666666666", "ry@qq.com", 280.0, "1"));
+        users.put(15, new UserOperateModel(15, "1000015", "测试15", "0", "15666666666", "ry@qq.com", 570.0, "1"));
+        users.put(16, new UserOperateModel(16, "1000016", "测试16", "1", "15666666666", "ry@qq.com", 260.0, "1"));
+        users.put(17, new UserOperateModel(17, "1000017", "测试17", "1", "15666666666", "ry@qq.com", 210.0, "1"));
+        users.put(18, new UserOperateModel(18, "1000018", "测试18", "1", "15666666666", "ry@qq.com", 340.0, "1"));
+        users.put(19, new UserOperateModel(19, "1000019", "测试19", "1", "15666666666", "ry@qq.com", 160.0, "1"));
+        users.put(20, new UserOperateModel(20, "1000020", "测试20", "1", "15666666666", "ry@qq.com", 220.0, "1"));
+        users.put(21, new UserOperateModel(21, "1000021", "测试21", "1", "15666666666", "ry@qq.com", 120.0, "1"));
+        users.put(22, new UserOperateModel(22, "1000022", "测试22", "1", "15666666666", "ry@qq.com", 130.0, "1"));
+        users.put(23, new UserOperateModel(23, "1000023", "测试23", "1", "15666666666", "ry@qq.com", 490.0, "1"));
+        users.put(24, new UserOperateModel(24, "1000024", "测试24", "1", "15666666666", "ry@qq.com", 570.0, "1"));
+        users.put(25, new UserOperateModel(25, "1000025", "测试25", "1", "15666666666", "ry@qq.com", 250.0, "1"));
+        users.put(26, new UserOperateModel(26, "1000026", "测试26", "1", "15666666666", "ry@qq.com", 250.0, "1"));
+    }
+
+    /**
+     * 表格
+     */
+    @GetMapping("/table")
+    public String table()
+    {
+        return prefix + "/table";
+    }
+
+    /**
+     * 其他
+     */
+    @GetMapping("/other")
+    public String other()
+    {
+        return prefix + "/other";
+    }
+
+    /**
+     * 查询数据
+     */
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(UserOperateModel userModel)
+    {
+        TableDataInfo rspData = new TableDataInfo();
+        List<UserOperateModel> userList = new ArrayList<UserOperateModel>(users.values());
+        // 查询条件过滤
+        if (StringUtils.isNotEmpty(userModel.getSearchValue()))
+        {
+            userList.clear();
+            for (Map.Entry<Integer, UserOperateModel> entry : users.entrySet())
+            {
+                if (entry.getValue().getUserName().equals(userModel.getSearchValue()))
+                {
+                    userList.add(entry.getValue());
+                }
+            }
+        }
+        else if (StringUtils.isNotEmpty(userModel.getUserName()))
+        {
+            userList.clear();
+            for (Map.Entry<Integer, UserOperateModel> entry : users.entrySet())
+            {
+                if (entry.getValue().getUserName().equals(userModel.getUserName()))
+                {
+                    userList.add(entry.getValue());
+                }
+            }
+        }
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
+        {
+            rspData.setRows(userList);
+            rspData.setTotal(userList.size());
+            return rspData;
+        }
+        Integer pageNum = (pageDomain.getPageNum() - 1) * 10;
+        Integer pageSize = pageDomain.getPageNum() * 10;
+        if (pageSize > userList.size())
+        {
+            pageSize = userList.size();
+        }
+        rspData.setRows(userList.subList(pageNum, pageSize));
+        rspData.setTotal(userList.size());
+        return rspData;
+    }
+
+    /**
+     * 新增用户
+     */
+    @GetMapping("/add")
+    public String add(ModelMap mmap)
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存用户
+     */
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(UserOperateModel user)
+    {
+        Integer userId = users.size() + 1;
+        user.setUserId(userId);
+        return AjaxResult.success(users.put(userId, user));
+    }
+
+    /**
+     * 新增保存主子表信息
+     */
+    @PostMapping("/customer/add")
+    @ResponseBody
+    public AjaxResult addSave(CustomerModel customerModel)
+    {
+        System.out.println(customerModel.toString());
+        return AjaxResult.success();
+    }
+
+    /**
+     * 修改用户
+     */
+    @GetMapping("/edit/{userId}")
+    public String edit(@PathVariable("userId") Integer userId, ModelMap mmap)
+    {
+        mmap.put("user", users.get(userId));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存用户
+     */
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(UserOperateModel user)
+    {
+        return AjaxResult.success(users.put(user.getUserId(), user));
+    }
+
+    /**
+     * 导出
+     */
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(UserOperateModel user)
+    {
+        List<UserOperateModel> list = new ArrayList<UserOperateModel>(users.values());
+        ExcelUtil<UserOperateModel> util = new ExcelUtil<UserOperateModel>(UserOperateModel.class);
+        return util.exportExcel(list, "用户数据");
+    }
+
+    /**
+     * 下载模板
+     */
+    @GetMapping("/importTemplate")
+    @ResponseBody
+    public AjaxResult importTemplate()
+    {
+        ExcelUtil<UserOperateModel> util = new ExcelUtil<UserOperateModel>(UserOperateModel.class);
+        return util.importTemplateExcel("用户数据");
+    }
+
+    /**
+     * 导入数据
+     */
+    @PostMapping("/importData")
+    @ResponseBody
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
+    {
+        ExcelUtil<UserOperateModel> util = new ExcelUtil<UserOperateModel>(UserOperateModel.class);
+        List<UserOperateModel> userList = util.importExcel(file.getInputStream());
+        String message = importUser(userList, updateSupport);
+        return AjaxResult.success(message);
+    }
+
+    /**
+     * 删除用户
+     */
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        Integer[] userIds = Convert.toIntArray(ids);
+        for (Integer userId : userIds)
+        {
+            users.remove(userId);
+        }
+        return AjaxResult.success();
+    }
+
+    /**
+     * 查看详细
+     */
+    @GetMapping("/detail/{userId}")
+    public String detail(@PathVariable("userId") Integer userId, ModelMap mmap)
+    {
+        mmap.put("user", users.get(userId));
+        return prefix + "/detail";
+    }
+
+    @PostMapping("/clean")
+    @ResponseBody
+    public AjaxResult clean()
+    {
+        users.clear();
+        return success();
+    }
+
+    /**
+     * 导入用户数据
+     *
+     * @param userList 用户数据列表
+     * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
+     * @return 结果
+     */
+    public String importUser(List<UserOperateModel> userList, Boolean isUpdateSupport)
+    {
+        if (StringUtils.isNull(userList) || userList.size() == 0)
+        {
+            throw new ServiceException("导入用户数据不能为空!");
+        }
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        for (UserOperateModel user : userList)
+        {
+            try
+            {
+                // 验证是否存在这个用户
+                boolean userFlag = false;
+                for (Map.Entry<Integer, UserOperateModel> entry : users.entrySet())
+                {
+                    if (entry.getValue().getUserName().equals(user.getUserName()))
+                    {
+                        userFlag = true;
+                        break;
+                    }
+                }
+                if (!userFlag)
+                {
+                    Integer userId = users.size() + 1;
+                    user.setUserId(userId);
+                    users.put(userId, user);
+                    successNum++;
+                    successMsg.append("<br/>" + successNum + "、用户 " + user.getUserName() + " 导入成功");
+                }
+                else if (isUpdateSupport)
+                {
+                    users.put(user.getUserId(), user);
+                    successNum++;
+                    successMsg.append("<br/>" + successNum + "、用户 " + user.getUserName() + " 更新成功");
+                }
+                else
+                {
+                    failureNum++;
+                    failureMsg.append("<br/>" + failureNum + "、用户 " + user.getUserName() + " 已存在");
+                }
+            }
+            catch (Exception e)
+            {
+                failureNum++;
+                String msg = "<br/>" + failureNum + "、账号 " + user.getUserName() + " 导入失败:";
+                failureMsg.append(msg + e.getMessage());
+            }
+        }
+        if (failureNum > 0)
+        {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        }
+        else
+        {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        return successMsg.toString();
+    }
+}

+ 53 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoReportController.java

@@ -0,0 +1,53 @@
+package com.product.center.manage.web.controller.demo.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * 报表
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/demo/report")
+public class DemoReportController
+{
+    private String prefix = "demo/report";
+
+    /**
+     * 百度ECharts
+     */
+    @GetMapping("/echarts")
+    public String echarts()
+    {
+        return prefix + "/echarts";
+    }
+
+    /**
+     * 图表插件
+     */
+    @GetMapping("/peity")
+    public String peity()
+    {
+        return prefix + "/peity";
+    }
+
+    /**
+     * 线状图插件
+     */
+    @GetMapping("/sparkline")
+    public String sparkline()
+    {
+        return prefix + "/sparkline";
+    }
+
+    /**
+     * 图表组合
+     */
+    @GetMapping("/metrics")
+    public String metrics()
+    {
+        return prefix + "/metrics";
+    }
+}

+ 848 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/controller/DemoTableController.java

@@ -0,0 +1,848 @@
+package com.product.center.manage.web.controller.demo.controller;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
+import com.product.center.manage.common.core.text.Convert;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.product.center.manage.common.annotation.Excel;
+import com.product.center.manage.common.annotation.Excel.ColumnType;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.page.PageDomain;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.core.page.TableSupport;
+import com.product.center.manage.common.core.text.Convert;
+import com.product.center.manage.common.utils.DateUtils;
+import com.product.center.manage.common.utils.StringUtils;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+
+/**
+ * 表格相关
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/demo/table")
+public class DemoTableController extends BaseController
+{
+    private String prefix = "demo/table";
+
+    private final static List<UserTableModel> users = new ArrayList<UserTableModel>();
+    {
+        users.add(new UserTableModel(1, "1000001", "测试1", "0", "15888888888", "ry@qq.com", 150.0, "0"));
+        users.add(new UserTableModel(2, "1000002", "测试2", "1", "15666666666", "ry@qq.com", 180.0, "1"));
+        users.add(new UserTableModel(3, "1000003", "测试3", "0", "15666666666", "ry@qq.com", 110.0, "1"));
+        users.add(new UserTableModel(4, "1000004", "测试4", "1", "15666666666", "ry@qq.com", 220.0, "1"));
+        users.add(new UserTableModel(5, "1000005", "测试5", "0", "15666666666", "ry@qq.com", 140.0, "1"));
+        users.add(new UserTableModel(6, "1000006", "测试6", "1", "15666666666", "ry@qq.com", 330.0, "1"));
+        users.add(new UserTableModel(7, "1000007", "测试7", "0", "15666666666", "ry@qq.com", 160.0, "1"));
+        users.add(new UserTableModel(8, "1000008", "测试8", "1", "15666666666", "ry@qq.com", 170.0, "1"));
+        users.add(new UserTableModel(9, "1000009", "测试9", "0", "15666666666", "ry@qq.com", 180.0, "1"));
+        users.add(new UserTableModel(10, "1000010", "测试10", "0", "15666666666", "ry@qq.com", 210.0, "1"));
+        users.add(new UserTableModel(11, "1000011", "测试11", "1", "15666666666", "ry@qq.com", 110.0, "1"));
+        users.add(new UserTableModel(12, "1000012", "测试12", "0", "15666666666", "ry@qq.com", 120.0, "1"));
+        users.add(new UserTableModel(13, "1000013", "测试13", "1", "15666666666", "ry@qq.com", 380.0, "1"));
+        users.add(new UserTableModel(14, "1000014", "测试14", "0", "15666666666", "ry@qq.com", 280.0, "1"));
+        users.add(new UserTableModel(15, "1000015", "测试15", "0", "15666666666", "ry@qq.com", 570.0, "1"));
+        users.add(new UserTableModel(16, "1000016", "测试16", "1", "15666666666", "ry@qq.com", 260.0, "1"));
+        users.add(new UserTableModel(17, "1000017", "测试17", "1", "15666666666", "ry@qq.com", 210.0, "1"));
+        users.add(new UserTableModel(18, "1000018", "测试18", "1", "15666666666", "ry@qq.com", 340.0, "1"));
+        users.add(new UserTableModel(19, "1000019", "测试19", "1", "15666666666", "ry@qq.com", 160.0, "1"));
+        users.add(new UserTableModel(20, "1000020", "测试20", "1", "15666666666", "ry@qq.com", 220.0, "1"));
+        users.add(new UserTableModel(21, "1000021", "测试21", "1", "15666666666", "ry@qq.com", 120.0, "1"));
+        users.add(new UserTableModel(22, "1000022", "测试22", "1", "15666666666", "ry@qq.com", 130.0, "1"));
+        users.add(new UserTableModel(23, "1000023", "测试23", "1", "15666666666", "ry@qq.com", 490.0, "1"));
+        users.add(new UserTableModel(24, "1000024", "测试24", "1", "15666666666", "ry@qq.com", 570.0, "1"));
+        users.add(new UserTableModel(25, "1000025", "测试25", "1", "15666666666", "ry@qq.com", 250.0, "1"));
+        users.add(new UserTableModel(26, "1000026", "测试26", "1", "15666666666", "ry@qq.com", 250.0, "1"));
+    }
+
+    private final static List<AreaModel> areas = new ArrayList<AreaModel>();
+    {
+        areas.add(new AreaModel(1, 0, "广东省", "440000", "GDS", "GuangDongSheng", 1));
+        areas.add(new AreaModel(2, 0, "湖南省", "430000", "HNS", "HuNanSheng", 1));
+        areas.add(new AreaModel(3, 0, "河南省", "410000", "HNS", "HeNanSheng", 0));
+        areas.add(new AreaModel(4, 0, "湖北省", "420000", "HBS", "HuBeiSheng", 0));
+        areas.add(new AreaModel(5, 0, "辽宁省", "210000", "LNS", "LiaoNingSheng", 0));
+        areas.add(new AreaModel(6, 0, "山东省", "370000", "SDS", "ShanDongSheng", 0));
+        areas.add(new AreaModel(7, 0, "陕西省", "610000", "SXS", "ShanXiSheng", 0));
+        areas.add(new AreaModel(8, 0, "贵州省", "520000", "GZS", "GuiZhouSheng", 0));
+        areas.add(new AreaModel(9,  0, "上海市", "310000", "SHS", "ShangHaiShi", 0));
+        areas.add(new AreaModel(10, 0, "重庆市", "500000", "CQS", "ChongQingShi", 0));
+        areas.add(new AreaModel(11, 0, "若依省", "666666", "YYS", "RuoYiSheng", 0));
+        areas.add(new AreaModel(12, 0, "安徽省", "340000", "AHS", "AnHuiSheng", 0));
+        areas.add(new AreaModel(13, 0, "福建省", "350000", "FJS", "FuJianSheng", 0));
+        areas.add(new AreaModel(14, 0, "海南省", "460000", "HNS", "HaiNanSheng", 0));
+        areas.add(new AreaModel(15, 0, "江苏省", "320000", "JSS", "JiangSuSheng", 0));
+        areas.add(new AreaModel(16, 0, "青海省", "630000", "QHS", "QingHaiSheng", 0));
+        areas.add(new AreaModel(17, 0, "广西壮族自治区", "450000", "GXZZZZQ", "GuangXiZhuangZuZiZhiQu", 0));
+        areas.add(new AreaModel(18, 0, "宁夏回族自治区", "640000", "NXHZZZQ", "NingXiaHuiZuZiZhiQu", 0));
+        areas.add(new AreaModel(19, 0, "内蒙古自治区", "150000", "NMGZZQ", "NeiMengGuZiZhiQu", 0));
+        areas.add(new AreaModel(20, 0, "新疆维吾尔自治区", "650000", "XJWWEZZQ", "XinJiangWeiWuErZiZhiQu", 0));
+        areas.add(new AreaModel(21, 0, "江西省", "360000", "JXS", "JiangXiSheng", 0));
+        areas.add(new AreaModel(22, 0, "浙江省", "330000", "ZJS", "ZheJiangSheng", 0));
+        areas.add(new AreaModel(23, 0, "河北省", "130000", "HBS", "HeBeiSheng", 0));
+        areas.add(new AreaModel(24, 0, "天津市", "120000", "TJS", "TianJinShi", 0));
+        areas.add(new AreaModel(25, 0, "山西省", "140000", "SXS", "ShanXiSheng", 0));
+        areas.add(new AreaModel(26, 0, "台湾省", "710000", "TWS", "TaiWanSheng", 0));
+        areas.add(new AreaModel(27, 0, "甘肃省", "620000", "GSS", "GanSuSheng", 0));
+        areas.add(new AreaModel(28, 0, "四川省", "510000", "SCS", "SiChuanSheng", 0));
+        areas.add(new AreaModel(29, 0, "云南省", "530000", "YNS", "YunNanSheng", 0));
+        areas.add(new AreaModel(30, 0, "北京市", "110000", "BJS", "BeiJingShi", 0));
+        areas.add(new AreaModel(31, 0, "香港特别行政区", "810000", "XGTBXZQ", "XiangGangTeBieXingZhengQu", 0));
+        areas.add(new AreaModel(32, 0, "澳门特别行政区", "820000", "AMTBXZQ", "AoMenTeBieXingZhengQu", 0));
+
+        areas.add(new AreaModel(100, 1, "深圳市", "440300", "SZS", "ShenZhenShi", 1));
+        areas.add(new AreaModel(101, 1, "广州市", "440100", "GZS", "GuangZhouShi", 0));
+        areas.add(new AreaModel(102, 1, "东莞市", "441900", "DGS", "DongGuanShi", 0));
+        areas.add(new AreaModel(103, 2, "长沙市", "410005", "CSS", "ChangShaShi", 1));
+        areas.add(new AreaModel(104, 2, "岳阳市", "414000", "YYS", "YueYangShi", 0));
+
+        areas.add(new AreaModel(1000, 100, "龙岗区", "518172", "LGQ", "LongGangQu", 0));
+        areas.add(new AreaModel(1001, 100, "南山区", "518051", "NSQ", "NanShanQu", 0));
+        areas.add(new AreaModel(1002, 100, "宝安区", "518101", "BAQ", "BaoAnQu", 0));
+        areas.add(new AreaModel(1003, 100, "福田区", "518081", "FTQ", "FuTianQu", 0));
+        areas.add(new AreaModel(1004, 103, "天心区", "410004", "TXQ", "TianXinQu", 0));
+        areas.add(new AreaModel(1005, 103, "开福区", "410008", "KFQ", "KaiFuQu", 0));
+        areas.add(new AreaModel(1006, 103, "芙蓉区", "410011", "FRQ", "FuRongQu", 0));
+        areas.add(new AreaModel(1007, 103, "雨花区", "410011", "YHQ", "YuHuaQu", 0));
+    }
+
+    private final static List<UserTableColumn> columns = new ArrayList<UserTableColumn>();
+    {
+        columns.add(new UserTableColumn("用户ID", "userId"));
+        columns.add(new UserTableColumn("用户编号", "userCode"));
+        columns.add(new UserTableColumn("用户姓名", "userName"));
+        columns.add(new UserTableColumn("用户手机", "userPhone"));
+        columns.add(new UserTableColumn("用户邮箱", "userEmail"));
+        columns.add(new UserTableColumn("用户状态", "status"));
+    }
+
+    /**
+     * 搜索相关
+     */
+    @GetMapping("/search")
+    public String search()
+    {
+        return prefix + "/search";
+    }
+
+    /**
+     * 数据汇总
+     */
+    @GetMapping("/footer")
+    public String footer()
+    {
+        return prefix + "/footer";
+    }
+
+    /**
+     * 组合表头
+     */
+    @GetMapping("/groupHeader")
+    public String groupHeader()
+    {
+        return prefix + "/groupHeader";
+    }
+
+    /**
+     * 表格导出
+     */
+    @GetMapping("/export")
+    public String export()
+    {
+        return prefix + "/export";
+    }
+
+    /**
+     * 表格导出选择列
+     */
+    @GetMapping("/exportSelected")
+    public String exportSelected()
+    {
+        return prefix + "/exportSelected";
+    }
+
+    /**
+     * 导出数据
+     */
+    @PostMapping("/exportData")
+    @ResponseBody
+    public AjaxResult exportSelected(UserTableModel userModel, String userIds)
+    {
+        List<UserTableModel> userList = new ArrayList<UserTableModel>(Arrays.asList(new UserTableModel[users.size()]));
+        Collections.copy(userList, users);
+
+        // 条件过滤
+        if (StringUtils.isNotEmpty(userIds))
+        {
+            userList.clear();
+            for (Long userId : Convert.toLongArray(userIds))
+            {
+                for (UserTableModel user : users)
+                {
+                    if (user.getUserId() == userId)
+                    {
+                        userList.add(user);
+                    }
+                }
+            }
+        }
+        ExcelUtil<UserTableModel> util = new ExcelUtil<UserTableModel>(UserTableModel.class);
+        return util.exportExcel(userList, "用户数据");
+    }
+
+    /**
+     * 翻页记住选择
+     */
+    @GetMapping("/remember")
+    public String remember()
+    {
+        return prefix + "/remember";
+    }
+
+    /**
+     * 跳转至指定页
+     */
+    @GetMapping("/pageGo")
+    public String pageGo()
+    {
+        return prefix + "/pageGo";
+    }
+
+    /**
+     * 自定义查询参数
+     */
+    @GetMapping("/params")
+    public String params()
+    {
+        return prefix + "/params";
+    }
+
+    /**
+     * 多表格
+     */
+    @GetMapping("/multi")
+    public String multi()
+    {
+        return prefix + "/multi";
+    }
+
+    /**
+     * 点击按钮加载表格
+     */
+    @GetMapping("/button")
+    public String button()
+    {
+        return prefix + "/button";
+    }
+
+    /**
+     * 直接加载表格数据
+     */
+    @GetMapping("/data")
+    public String data(ModelMap mmap)
+    {
+        mmap.put("users", users);
+        return prefix + "/data";
+    }
+
+    /**
+     * 表格冻结列
+     */
+    @GetMapping("/fixedColumns")
+    public String fixedColumns()
+    {
+        return prefix + "/fixedColumns";
+    }
+
+    /**
+     * 自定义触发事件
+     */
+    @GetMapping("/event")
+    public String event()
+    {
+        return prefix + "/event";
+    }
+
+    /**
+     * 表格细节视图
+     */
+    @GetMapping("/detail")
+    public String detail()
+    {
+        return prefix + "/detail";
+    }
+
+    /**
+     * 表格父子视图
+     */
+    @GetMapping("/child")
+    public String child()
+    {
+        return prefix + "/child";
+    }
+
+    /**
+     * 表格图片预览
+     */
+    @GetMapping("/image")
+    public String image()
+    {
+        return prefix + "/image";
+    }
+
+    /**
+     * 动态增删改查
+     */
+    @GetMapping("/curd")
+    public String curd()
+    {
+        return prefix + "/curd";
+    }
+
+    /**
+     * 表格行拖拽操作
+     */
+    @GetMapping("/reorderRows")
+    public String reorderRows()
+    {
+        return prefix + "/reorderRows";
+    }
+
+    /**
+     * 表格列拖拽操作
+     */
+    @GetMapping("/reorderColumns")
+    public String reorderColumns()
+    {
+        return prefix + "/reorderColumns";
+    }
+
+    /**
+     * 表格列宽拖动
+     */
+    @GetMapping("/resizable")
+    public String resizable()
+    {
+        return prefix + "/resizable";
+    }
+
+    /**
+     * 表格行内编辑操作
+     */
+    @GetMapping("/editable")
+    public String editable()
+    {
+        return prefix + "/editable";
+    }
+
+    /**
+     * 主子表提交
+     */
+    @GetMapping("/subdata")
+    public String subdata()
+    {
+        return prefix + "/subdata";
+    }
+
+    /**
+     * 表格自动刷新
+     */
+    @GetMapping("/refresh")
+    public String refresh()
+    {
+        return prefix + "/refresh";
+    }
+
+    /**
+     * 表格打印配置
+     */
+    @GetMapping("/print")
+    public String print()
+    {
+        return prefix + "/print";
+    }
+
+    /**
+     * 表格标题格式化
+     */
+    @GetMapping("/headerStyle")
+    public String headerStyle()
+    {
+        return prefix + "/headerStyle";
+    }
+
+    /**
+     * 表格动态列
+     */
+    @GetMapping("/dynamicColumns")
+    public String dynamicColumns()
+    {
+        return prefix + "/dynamicColumns";
+    }
+
+    /**
+     * 自定义视图分页
+     */
+    @GetMapping("/customView")
+    public String customView()
+    {
+        return prefix + "/customView";
+    }
+
+    /**
+     * 异步加载表格树
+     */
+    @GetMapping("/asynTree")
+    public String asynTree()
+    {
+        return prefix + "/asynTree";
+    }
+
+    /**
+     * 表格其他操作
+     */
+    @GetMapping("/other")
+    public String other()
+    {
+        return prefix + "/other";
+    }
+
+    /**
+     * 动态获取列
+     */
+    @PostMapping("/ajaxColumns")
+    @ResponseBody
+    public AjaxResult ajaxColumns(UserTableColumn userColumn)
+    {
+        List<UserTableColumn> columnList = new ArrayList<UserTableColumn>(Arrays.asList(new UserTableColumn[columns.size()]));
+        Collections.copy(columnList, columns);
+        if (userColumn != null && "userBalance".equals(userColumn.getField()))
+        {
+            columnList.add(new UserTableColumn("用户余额", "userBalance"));
+        }
+        return AjaxResult.success(columnList);
+    }
+
+    /**
+     * 查询数据
+     */
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(UserTableModel userModel)
+    {
+        TableDataInfo rspData = new TableDataInfo();
+        List<UserTableModel> userList = new ArrayList<UserTableModel>(Arrays.asList(new UserTableModel[users.size()]));
+        Collections.copy(userList, users);
+        // 查询条件过滤
+        if (StringUtils.isNotEmpty(userModel.getUserName()))
+        {
+            userList.clear();
+            for (UserTableModel user : users)
+            {
+                if (user.getUserName().equals(userModel.getUserName()))
+                {
+                    userList.add(user);
+                }
+            }
+        }
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
+        {
+            rspData.setRows(userList);
+            rspData.setTotal(userList.size());
+            return rspData;
+        }
+        Integer pageNum = (pageDomain.getPageNum() - 1) * 10;
+        Integer pageSize = pageDomain.getPageNum() * 10;
+        if (pageSize > userList.size())
+        {
+            pageSize = userList.size();
+        }
+        rspData.setRows(userList.subList(pageNum, pageSize));
+        rspData.setTotal(userList.size());
+        return rspData;
+    }
+
+    /**
+     * 查询树表数据
+     */
+    @PostMapping("/tree/list")
+    @ResponseBody
+    public TableDataInfo treeList(AreaModel areaModel)
+    {
+        TableDataInfo rspData = new TableDataInfo();
+        List<AreaModel> areaList = new ArrayList<AreaModel>(Arrays.asList(new AreaModel[areas.size()]));
+        // 默认查询条件 parentId 0
+        Collections.copy(areaList, areas);
+        areaList.clear();
+        if (StringUtils.isNotEmpty(areaModel.getAreaName()))
+        {
+            for (AreaModel area : areas)
+            {
+                if (area.getParentId() == 0 && area.getAreaName().equals(areaModel.getAreaName()))
+                {
+                    areaList.add(area);
+                }
+            }
+        }
+        else
+        {
+            for (AreaModel area : areas)
+            {
+                if (area.getParentId() == 0)
+                {
+                    areaList.add(area);
+                }
+            }
+        }
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = (pageDomain.getPageNum() - 1) * 10;
+        Integer pageSize = pageDomain.getPageNum() * 10;
+        if (pageSize > areaList.size())
+        {
+            pageSize = areaList.size();
+        }
+        rspData.setRows(areaList.subList(pageNum, pageSize));
+        rspData.setTotal(areaList.size());
+        return rspData;
+    }
+
+    /**
+     * 查询树表子节点数据
+     */
+    @PostMapping("/tree/listChild")
+    @ResponseBody
+    public List<AreaModel> listChild(AreaModel areaModel)
+    {
+        List<AreaModel> areaList = new ArrayList<AreaModel>(Arrays.asList(new AreaModel[areas.size()]));
+        // 查询条件 parentId
+        Collections.copy(areaList, areas);
+        areaList.clear();
+        if (StringUtils.isNotEmpty(areaModel.getAreaName()))
+        {
+            for (AreaModel area : areas)
+            {
+                if (area.getParentId().intValue() == areaModel.getParentId().intValue() && area.getAreaName().equals(areaModel.getAreaName()))
+                {
+                    areaList.add(area);
+                }
+            }
+        }
+        else
+        {
+            for (AreaModel area : areas)
+            {
+                if (area.getParentId().intValue() == areaModel.getParentId().intValue())
+                {
+                    areaList.add(area);
+                }
+            }
+        }
+        return areaList;
+    }
+}
+
+class UserTableColumn
+{
+    /** 表头 */
+    private String title;
+    /** 字段 */
+    private String field;
+
+    public UserTableColumn()
+    {
+
+    }
+
+    public UserTableColumn(String title, String field)
+    {
+        this.title = title;
+        this.field = field;
+    }
+
+    public String getTitle()
+    {
+        return title;
+    }
+
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+
+    public String getField()
+    {
+        return field;
+    }
+
+    public void setField(String field)
+    {
+        this.field = field;
+    }
+}
+
+class UserTableModel
+{
+    /** 用户ID */
+    private int userId;
+
+    /** 用户编号 */
+    @Excel(name = "用户编号", cellType = ColumnType.NUMERIC)
+    private String userCode;
+
+    /** 用户姓名 */
+    @Excel(name = "用户姓名")
+    private String userName;
+
+    /** 用户性别 */
+    private String userSex;
+
+    /** 用户手机 */
+    @Excel(name = "用户手机")
+    private String userPhone;
+
+    /** 用户邮箱 */
+    @Excel(name = "用户邮箱")
+    private String userEmail;
+
+    /** 用户余额 */
+    @Excel(name = "用户余额", cellType = ColumnType.NUMERIC)
+    private double userBalance;
+
+    /** 用户状态(0正常 1停用) */
+    private String status;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    public UserTableModel()
+    {
+
+    }
+
+    public UserTableModel(int userId, String userCode, String userName, String userSex, String userPhone,
+            String userEmail, double userBalance, String status)
+    {
+        this.userId = userId;
+        this.userCode = userCode;
+        this.userName = userName;
+        this.userSex = userSex;
+        this.userPhone = userPhone;
+        this.userEmail = userEmail;
+        this.userBalance = userBalance;
+        this.status = status;
+        this.createTime = DateUtils.getNowDate();
+    }
+
+    public int getUserId()
+    {
+        return userId;
+    }
+
+    public void setUserId(int userId)
+    {
+        this.userId = userId;
+    }
+
+    public String getUserCode()
+    {
+        return userCode;
+    }
+
+    public void setUserCode(String userCode)
+    {
+        this.userCode = userCode;
+    }
+
+    public String getUserName()
+    {
+        return userName;
+    }
+
+    public void setUserName(String userName)
+    {
+        this.userName = userName;
+    }
+
+    public String getUserSex()
+    {
+        return userSex;
+    }
+
+    public void setUserSex(String userSex)
+    {
+        this.userSex = userSex;
+    }
+
+    public String getUserPhone()
+    {
+        return userPhone;
+    }
+
+    public void setUserPhone(String userPhone)
+    {
+        this.userPhone = userPhone;
+    }
+
+    public String getUserEmail()
+    {
+        return userEmail;
+    }
+
+    public void setUserEmail(String userEmail)
+    {
+        this.userEmail = userEmail;
+    }
+
+    public double getUserBalance()
+    {
+        return userBalance;
+    }
+
+    public void setUserBalance(double userBalance)
+    {
+        this.userBalance = userBalance;
+    }
+
+    public String getStatus()
+    {
+        return status;
+    }
+
+    public void setStatus(String status)
+    {
+        this.status = status;
+    }
+
+    public Date getCreateTime()
+    {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime)
+    {
+        this.createTime = createTime;
+    }
+}
+class AreaModel
+{
+    /** 编号 */
+    private Long id;
+
+    /** 父编号 */
+    private Long parentId;
+
+    /** 区域名称 */
+    private String areaName;
+
+    /** 区域代码 */
+    private String areaCode;
+
+    /** 名称首字母 */
+    private String simplePy;
+
+    /** 名称全拼 */
+    private String pinYin;
+
+    /** 是否有子节点(0无 1有) */
+    private Integer isTreeLeaf = 1;
+
+    public AreaModel()
+    {
+
+    }
+
+    public AreaModel(int id, int parentId, String areaName, String areaCode, String simplePy, String pinYin, Integer isTreeLeaf)
+    {
+        this.id = Long.valueOf(id);
+        this.parentId = Long.valueOf(parentId);
+        this.areaName = areaName;
+        this.areaCode = areaCode;
+        this.simplePy = simplePy;
+        this.pinYin = pinYin;
+        this.isTreeLeaf = isTreeLeaf;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getParentId()
+    {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId)
+    {
+        this.parentId = parentId;
+    }
+
+    public String getAreaName()
+    {
+        return areaName;
+    }
+
+    public void setAreaName(String areaName)
+    {
+        this.areaName = areaName;
+    }
+
+    public String getAreaCode()
+    {
+        return areaCode;
+    }
+
+    public void setAreaCode(String areaCode)
+    {
+        this.areaCode = areaCode;
+    }
+
+    public String getSimplePy()
+    {
+        return simplePy;
+    }
+
+    public void setSimplePy(String simplePy)
+    {
+        this.simplePy = simplePy;
+    }
+
+    public String getPinYin()
+    {
+        return pinYin;
+    }
+
+    public void setPinYin(String pinYin)
+    {
+        this.pinYin = pinYin;
+    }
+
+    public Integer getIsTreeLeaf()
+    {
+        return isTreeLeaf;
+    }
+
+    public void setIsTreeLeaf(Integer isTreeLeaf)
+    {
+        this.isTreeLeaf = isTreeLeaf;
+    }
+}

+ 116 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/domain/CustomerModel.java

@@ -0,0 +1,116 @@
+package com.product.center.manage.web.controller.demo.domain;
+
+import java.util.List;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 客户测试信息
+ *
+ * @author ruoyi
+ */
+public class CustomerModel
+{
+    /**
+     * 客户姓名
+     */
+    private String name;
+
+    /**
+     * 客户手机
+     */
+    private String phonenumber;
+
+    /**
+     * 客户性别
+     */
+    private String sex;
+
+    /**
+     * 客户生日
+     */
+    private String birthday;
+
+    /**
+     * 客户描述
+     */
+    private String remark;
+
+    /**
+     * 商品信息
+     */
+    private List<GoodsModel> goods;
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public String getPhonenumber()
+    {
+        return phonenumber;
+    }
+
+    public void setPhonenumber(String phonenumber)
+    {
+        this.phonenumber = phonenumber;
+    }
+
+
+    public String getSex()
+    {
+        return sex;
+    }
+
+    public void setSex(String sex)
+    {
+        this.sex = sex;
+    }
+
+    public String getBirthday()
+    {
+        return birthday;
+    }
+
+    public void setBirthday(String birthday)
+    {
+        this.birthday = birthday;
+    }
+
+    public String getRemark()
+    {
+        return remark;
+    }
+
+    public void setRemark(String remark)
+    {
+        this.remark = remark;
+    }
+
+    public List<GoodsModel> getGoods()
+    {
+        return goods;
+    }
+
+    public void setGoods(List<GoodsModel> goods)
+    {
+        this.goods = goods;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("name", getName())
+            .append("phonenumber", getPhonenumber())
+            .append("sex", getSex())
+            .append("birthday", getBirthday())
+            .append("goods", getGoods())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 99 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/domain/GoodsModel.java

@@ -0,0 +1,99 @@
+package com.product.center.manage.web.controller.demo.domain;
+
+import java.util.Date;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 商品测试信息
+ *
+ * @author ruoyi
+ */
+public class GoodsModel
+{
+    /**
+     * 商品名称
+     */
+    private String name;
+
+    /**
+     * 商品重量
+     */
+    private Integer weight;
+
+    /**
+     * 商品价格
+     */
+    private Double price;
+
+    /**
+     * 商品日期
+     */
+    private Date date;
+
+    /**
+     * 商品种类
+     */
+    private String type;
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public Integer getWeight()
+    {
+        return weight;
+    }
+
+    public void setWeight(Integer weight)
+    {
+        this.weight = weight;
+    }
+
+    public Double getPrice()
+    {
+        return price;
+    }
+
+    public void setPrice(Double price)
+    {
+        this.price = price;
+    }
+
+    public Date getDate()
+    {
+        return date;
+    }
+
+    public void setDate(Date date)
+    {
+        this.date = date;
+    }
+
+    public String getType()
+    {
+        return type;
+    }
+
+    public void setType(String type)
+    {
+        this.type = type;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("name", getName())
+            .append("weight", getWeight())
+            .append("price", getPrice())
+            .append("date", getDate())
+            .append("type", getType())
+            .toString();
+    }
+}

+ 153 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/demo/domain/UserOperateModel.java

@@ -0,0 +1,153 @@
+package com.product.center.manage.web.controller.demo.domain;
+
+import java.util.Date;
+
+import com.product.center.manage.common.annotation.Excel;
+import com.product.center.manage.common.core.domain.BaseEntity;
+import com.product.center.manage.common.utils.DateUtils;
+import com.product.center.manage.common.annotation.Excel;
+import com.product.center.manage.common.annotation.Excel.Type;
+import com.product.center.manage.common.core.domain.BaseEntity;
+import com.product.center.manage.common.utils.DateUtils;
+
+public class UserOperateModel extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    private int userId;
+
+    @Excel(name = "用户编号")
+    private String userCode;
+
+    @Excel(name = "用户姓名")
+    private String userName;
+
+    @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
+    private String userSex;
+
+    @Excel(name = "用户手机")
+    private String userPhone;
+
+    @Excel(name = "用户邮箱")
+    private String userEmail;
+
+    @Excel(name = "用户余额")
+    private double userBalance;
+
+    @Excel(name = "用户状态", readConverterExp = "0=正常,1=停用")
+    private String status;
+
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT)
+    private Date createTime;
+
+    public UserOperateModel()
+    {
+
+    }
+
+    public UserOperateModel(int userId, String userCode, String userName, String userSex, String userPhone,
+            String userEmail, double userBalance, String status)
+    {
+        this.userId = userId;
+        this.userCode = userCode;
+        this.userName = userName;
+        this.userSex = userSex;
+        this.userPhone = userPhone;
+        this.userEmail = userEmail;
+        this.userBalance = userBalance;
+        this.status = status;
+        this.createTime = DateUtils.getNowDate();
+    }
+
+    public int getUserId()
+    {
+        return userId;
+    }
+
+    public void setUserId(int userId)
+    {
+        this.userId = userId;
+    }
+
+    public String getUserCode()
+    {
+        return userCode;
+    }
+
+    public void setUserCode(String userCode)
+    {
+        this.userCode = userCode;
+    }
+
+    public String getUserName()
+    {
+        return userName;
+    }
+
+    public void setUserName(String userName)
+    {
+        this.userName = userName;
+    }
+
+    public String getUserSex()
+    {
+        return userSex;
+    }
+
+    public void setUserSex(String userSex)
+    {
+        this.userSex = userSex;
+    }
+
+    public String getUserPhone()
+    {
+        return userPhone;
+    }
+
+    public void setUserPhone(String userPhone)
+    {
+        this.userPhone = userPhone;
+    }
+
+    public String getUserEmail()
+    {
+        return userEmail;
+    }
+
+    public void setUserEmail(String userEmail)
+    {
+        this.userEmail = userEmail;
+    }
+
+    public double getUserBalance()
+    {
+        return userBalance;
+    }
+
+    public void setUserBalance(double userBalance)
+    {
+        this.userBalance = userBalance;
+    }
+
+    public String getStatus()
+    {
+        return status;
+    }
+
+    public void setStatus(String status)
+    {
+        this.status = status;
+    }
+
+    @Override
+    public Date getCreateTime()
+    {
+        return createTime;
+    }
+
+    @Override
+    public void setCreateTime(Date createTime)
+    {
+        this.createTime = createTime;
+    }
+}

+ 91 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/CacheController.java

@@ -0,0 +1,91 @@
+package com.product.center.manage.web.controller.monitor;
+
+import com.product.center.manage.framework.web.service.CacheService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.framework.web.service.CacheService;
+
+/**
+ * 缓存监控
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/cache")
+public class CacheController extends BaseController
+{
+    private String prefix = "monitor/cache";
+
+    @Autowired
+    private CacheService cacheService;
+
+    @RequiresPermissions("monitor:cache:view")
+    @GetMapping()
+    public String cache(ModelMap mmap)
+    {
+        mmap.put("cacheNames", cacheService.getCacheNames());
+        return prefix + "/cache";
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @PostMapping("/getNames")
+    public String getCacheNames(String fragment, ModelMap mmap)
+    {
+        mmap.put("cacheNames", cacheService.getCacheNames());
+        return prefix + "/cache::" + fragment;
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @PostMapping("/getKeys")
+    public String getCacheKeys(String fragment, String cacheName, ModelMap mmap)
+    {
+        mmap.put("cacheName", cacheName);
+        mmap.put("cacheKeys", cacheService.getCacheKeys(cacheName));
+        return prefix + "/cache::" + fragment;
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @PostMapping("/getValue")
+    public String getCacheValue(String fragment, String cacheName, String cacheKey, ModelMap mmap)
+    {
+        mmap.put("cacheName", cacheName);
+        mmap.put("cacheKey", cacheKey);
+        mmap.put("cacheValue", cacheService.getCacheValue(cacheName, cacheKey));
+        return prefix + "/cache::" + fragment;
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @PostMapping("/clearCacheName")
+    @ResponseBody
+    public AjaxResult clearCacheName(String cacheName, ModelMap mmap)
+    {
+        cacheService.clearCacheName(cacheName);
+        return AjaxResult.success();
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @PostMapping("/clearCacheKey")
+    @ResponseBody
+    public AjaxResult clearCacheKey(String cacheName, String cacheKey, ModelMap mmap)
+    {
+        cacheService.clearCacheKey(cacheName, cacheKey);
+        return AjaxResult.success();
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @GetMapping("/clearAll")
+    @ResponseBody
+    public AjaxResult clearAll(ModelMap mmap)
+    {
+        cacheService.clearAll();
+        return AjaxResult.success();
+    }
+}

+ 27 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/DruidController.java

@@ -0,0 +1,27 @@
+package com.product.center.manage.web.controller.monitor;
+
+import com.product.center.manage.common.core.controller.BaseController;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.product.center.manage.common.core.controller.BaseController;
+
+/**
+ * druid 监控
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/data")
+public class DruidController extends BaseController
+{
+    private String prefix = "/druid";
+
+    @RequiresPermissions("monitor:data:view")
+    @GetMapping()
+    public String index()
+    {
+        return redirect(prefix + "/index.html");
+    }
+}

+ 33 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/ServerController.java

@@ -0,0 +1,33 @@
+package com.product.center.manage.web.controller.monitor;
+
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.framework.web.domain.Server;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.framework.web.domain.Server;
+
+/**
+ * 服务器监控
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/server")
+public class ServerController extends BaseController
+{
+    private String prefix = "monitor/server";
+
+    @RequiresPermissions("monitor:server:view")
+    @GetMapping()
+    public String server(ModelMap mmap) throws Exception
+    {
+        Server server = new Server();
+        server.copyTo();
+        mmap.put("server", server);
+        return prefix + "/server";
+    }
+}

+ 104 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/SysLogininforController.java

@@ -0,0 +1,104 @@
+package com.product.center.manage.web.controller.monitor;
+
+import java.util.List;
+
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.framework.shiro.service.SysPasswordService;
+import com.product.center.manage.system.domain.SysLogininfor;
+import com.product.center.manage.system.service.ISysLogininforService;
+import com.product.center.manage.framework.shiro.service.SysPasswordService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.system.domain.SysLogininfor;
+import com.product.center.manage.system.service.ISysLogininforService;
+
+/**
+ * 系统访问记录
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/logininfor")
+public class SysLogininforController extends BaseController
+{
+    private String prefix = "monitor/logininfor";
+
+    @Autowired
+    private ISysLogininforService logininforService;
+
+    @Autowired
+    private SysPasswordService passwordService;
+
+    @RequiresPermissions("monitor:logininfor:view")
+    @GetMapping()
+    public String logininfor()
+    {
+        return prefix + "/logininfor";
+    }
+
+    @RequiresPermissions("monitor:logininfor:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysLogininfor logininfor)
+    {
+        startPage();
+        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
+        return getDataTable(list);
+    }
+
+    @Log(title = "登录日志", businessType = BusinessType.EXPORT)
+    @RequiresPermissions("monitor:logininfor:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysLogininfor logininfor)
+    {
+        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
+        ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
+        return util.exportExcel(list, "登录日志");
+    }
+
+    @RequiresPermissions("monitor:logininfor:remove")
+    @Log(title = "登录日志", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(logininforService.deleteLogininforByIds(ids));
+    }
+
+    @RequiresPermissions("monitor:logininfor:remove")
+    @Log(title = "登录日志", businessType = BusinessType.CLEAN)
+    @PostMapping("/clean")
+    @ResponseBody
+    public AjaxResult clean()
+    {
+        logininforService.cleanLogininfor();
+        return success();
+    }
+
+    @RequiresPermissions("monitor:logininfor:unlock")
+    @Log(title = "账户解锁", businessType = BusinessType.OTHER)
+    @PostMapping("/unlock")
+    @ResponseBody
+    public AjaxResult unlock(String loginName)
+    {
+        passwordService.clearLoginRecordCache(loginName);
+        return success();
+    }
+}

+ 92 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/SysOperlogController.java

@@ -0,0 +1,92 @@
+package com.product.center.manage.web.controller.monitor;
+
+import java.util.List;
+
+import com.product.center.manage.common.core.page.TableDataInfo;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.system.domain.SysOperLog;
+import com.product.center.manage.system.service.ISysOperLogService;
+
+/**
+ * 操作日志记录
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/operlog")
+public class SysOperlogController extends BaseController
+{
+    private String prefix = "monitor/operlog";
+
+    @Autowired
+    private ISysOperLogService operLogService;
+
+    @RequiresPermissions("monitor:operlog:view")
+    @GetMapping()
+    public String operlog()
+    {
+        return prefix + "/operlog";
+    }
+
+    @RequiresPermissions("monitor:operlog:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysOperLog operLog)
+    {
+        startPage();
+        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
+        return getDataTable(list);
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.EXPORT)
+    @RequiresPermissions("monitor:operlog:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysOperLog operLog)
+    {
+        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
+        ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
+        return util.exportExcel(list, "操作日志");
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.DELETE)
+    @RequiresPermissions("monitor:operlog:remove")
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(operLogService.deleteOperLogByIds(ids));
+    }
+
+    @RequiresPermissions("monitor:operlog:detail")
+    @GetMapping("/detail/{operId}")
+    public String detail(@PathVariable("operId") Long operId, ModelMap mmap)
+    {
+        mmap.put("operLog", operLogService.selectOperLogById(operId));
+        return prefix + "/detail";
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.CLEAN)
+    @RequiresPermissions("monitor:operlog:remove")
+    @PostMapping("/clean")
+    @ResponseBody
+    public AjaxResult clean()
+    {
+        operLogService.cleanOperLog();
+        return success();
+    }
+}

+ 94 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/monitor/SysUserOnlineController.java

@@ -0,0 +1,94 @@
+package com.product.center.manage.web.controller.monitor;
+
+import java.util.List;
+
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.core.text.Convert;
+import com.product.center.manage.common.utils.ShiroUtils;
+import com.product.center.manage.framework.shiro.session.OnlineSession;
+import com.product.center.manage.framework.shiro.session.OnlineSessionDAO;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.core.text.Convert;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.enums.OnlineStatus;
+import com.product.center.manage.common.utils.ShiroUtils;
+import com.product.center.manage.framework.shiro.session.OnlineSession;
+import com.product.center.manage.framework.shiro.session.OnlineSessionDAO;
+import com.product.center.manage.system.domain.SysUserOnline;
+import com.product.center.manage.system.service.ISysUserOnlineService;
+
+/**
+ * 在线用户监控
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/online")
+public class SysUserOnlineController extends BaseController
+{
+    private String prefix = "monitor/online";
+
+    @Autowired
+    private ISysUserOnlineService userOnlineService;
+
+    @Autowired
+    private OnlineSessionDAO onlineSessionDAO;
+
+    @RequiresPermissions("monitor:online:view")
+    @GetMapping()
+    public String online()
+    {
+        return prefix + "/online";
+    }
+
+    @RequiresPermissions("monitor:online:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysUserOnline userOnline)
+    {
+        startPage();
+        List<SysUserOnline> list = userOnlineService.selectUserOnlineList(userOnline);
+        return getDataTable(list);
+    }
+
+    @RequiresPermissions(value = { "monitor:online:batchForceLogout", "monitor:online:forceLogout" }, logical = Logical.OR)
+    @Log(title = "在线用户", businessType = BusinessType.FORCE)
+    @PostMapping("/batchForceLogout")
+    @ResponseBody
+    public AjaxResult batchForceLogout(String ids)
+    {
+        for (String sessionId : Convert.toStrArray(ids))
+        {
+            SysUserOnline online = userOnlineService.selectOnlineById(sessionId);
+            if (online == null)
+            {
+                return error("用户已下线");
+            }
+            OnlineSession onlineSession = (OnlineSession) onlineSessionDAO.readSession(online.getSessionId());
+            if (onlineSession == null)
+            {
+                return error("用户已下线");
+            }
+            if (sessionId.equals(ShiroUtils.getSessionId()))
+            {
+                return error("当前登录用户无法强退");
+            }
+            onlineSessionDAO.delete(onlineSession);
+            online.setStatus(OnlineStatus.off_line);
+            userOnlineService.saveOnline(online);
+            userOnlineService.removeUserCache(online.getLoginName(), sessionId);
+        }
+        return success();
+    }
+}

+ 94 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysCaptchaController.java

@@ -0,0 +1,94 @@
+package com.product.center.manage.web.controller.system;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import javax.annotation.Resource;
+import javax.imageio.ImageIO;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import com.product.center.manage.common.core.controller.BaseController;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.ModelAndView;
+import com.google.code.kaptcha.Constants;
+import com.google.code.kaptcha.Producer;
+import com.product.center.manage.common.core.controller.BaseController;
+
+/**
+ * 图片验证码(支持算术形式)
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/captcha")
+public class SysCaptchaController extends BaseController
+{
+    @Resource(name = "captchaProducer")
+    private Producer captchaProducer;
+
+    @Resource(name = "captchaProducerMath")
+    private Producer captchaProducerMath;
+
+    /**
+     * 验证码生成
+     */
+    @GetMapping(value = "/captchaImage")
+    public ModelAndView getKaptchaImage(HttpServletRequest request, HttpServletResponse response)
+    {
+        ServletOutputStream out = null;
+        try
+        {
+            HttpSession session = request.getSession();
+            response.setDateHeader("Expires", 0);
+            response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
+            response.addHeader("Cache-Control", "post-check=0, pre-check=0");
+            response.setHeader("Pragma", "no-cache");
+            response.setContentType("image/jpeg");
+
+            String type = request.getParameter("type");
+            String capStr = null;
+            String code = null;
+            BufferedImage bi = null;
+            if ("math".equals(type))
+            {
+                String capText = captchaProducerMath.createText();
+                capStr = capText.substring(0, capText.lastIndexOf("@"));
+                code = capText.substring(capText.lastIndexOf("@") + 1);
+                bi = captchaProducerMath.createImage(capStr);
+            }
+            else if ("char".equals(type))
+            {
+                capStr = code = captchaProducer.createText();
+                bi = captchaProducer.createImage(capStr);
+            }
+            session.setAttribute(Constants.KAPTCHA_SESSION_KEY, code);
+            out = response.getOutputStream();
+            ImageIO.write(bi, "jpg", out);
+            out.flush();
+
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }
+        finally
+        {
+            try
+            {
+                if (out != null)
+                {
+                    out.close();
+                }
+            }
+            catch (IOException e)
+            {
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+}

+ 162 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysConfigController.java

@@ -0,0 +1,162 @@
+package com.product.center.manage.web.controller.system;
+
+import java.util.List;
+
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.system.service.ISysConfigService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.constant.UserConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.system.domain.SysConfig;
+import com.product.center.manage.system.service.ISysConfigService;
+
+/**
+ * 参数配置 信息操作处理
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/system/config")
+public class SysConfigController extends BaseController
+{
+    private String prefix = "system/config";
+
+    @Autowired
+    private ISysConfigService configService;
+
+    @RequiresPermissions("system:config:view")
+    @GetMapping()
+    public String config()
+    {
+        return prefix + "/config";
+    }
+
+    /**
+     * 查询参数配置列表
+     */
+    @RequiresPermissions("system:config:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysConfig config)
+    {
+        startPage();
+        List<SysConfig> list = configService.selectConfigList(config);
+        return getDataTable(list);
+    }
+
+    @Log(title = "参数管理", businessType = BusinessType.EXPORT)
+    @RequiresPermissions("system:config:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysConfig config)
+    {
+        List<SysConfig> list = configService.selectConfigList(config);
+        ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
+        return util.exportExcel(list, "参数数据");
+    }
+
+    /**
+     * 新增参数配置
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存参数配置
+     */
+    @RequiresPermissions("system:config:add")
+    @Log(title = "参数管理", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(@Validated SysConfig config)
+    {
+        if (UserConstants.CONFIG_KEY_NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
+        {
+            return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
+        }
+        config.setCreateBy(getLoginName());
+        return toAjax(configService.insertConfig(config));
+    }
+
+    /**
+     * 修改参数配置
+     */
+    @RequiresPermissions("system:config:edit")
+    @GetMapping("/edit/{configId}")
+    public String edit(@PathVariable("configId") Long configId, ModelMap mmap)
+    {
+        mmap.put("config", configService.selectConfigById(configId));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存参数配置
+     */
+    @RequiresPermissions("system:config:edit")
+    @Log(title = "参数管理", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(@Validated SysConfig config)
+    {
+        if (UserConstants.CONFIG_KEY_NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
+        {
+            return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
+        }
+        config.setUpdateBy(getLoginName());
+        return toAjax(configService.updateConfig(config));
+    }
+
+    /**
+     * 删除参数配置
+     */
+    @RequiresPermissions("system:config:remove")
+    @Log(title = "参数管理", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        configService.deleteConfigByIds(ids);
+        return success();
+    }
+
+    /**
+     * 刷新参数缓存
+     */
+    @RequiresPermissions("system:config:remove")
+    @Log(title = "参数管理", businessType = BusinessType.CLEAN)
+    @GetMapping("/refreshCache")
+    @ResponseBody
+    public AjaxResult refreshCache()
+    {
+        configService.resetConfigCache();
+        return success();
+    }
+
+    /**
+     * 校验参数键名
+     */
+    @PostMapping("/checkConfigKeyUnique")
+    @ResponseBody
+    public String checkConfigKeyUnique(SysConfig config)
+    {
+        return configService.checkConfigKeyUnique(config);
+    }
+}

+ 189 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysDeptController.java

@@ -0,0 +1,189 @@
+package com.product.center.manage.web.controller.system;
+
+import java.util.List;
+
+import com.product.center.manage.common.core.domain.entity.SysDept;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.constant.UserConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.Ztree;
+import com.product.center.manage.common.core.domain.entity.SysDept;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.StringUtils;
+import com.product.center.manage.system.service.ISysDeptService;
+
+/**
+ * 部门信息
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/system/dept")
+public class SysDeptController extends BaseController
+{
+    private String prefix = "system/dept";
+
+    @Autowired
+    private ISysDeptService deptService;
+
+    @RequiresPermissions("system:dept:view")
+    @GetMapping()
+    public String dept()
+    {
+        return prefix + "/dept";
+    }
+
+    @RequiresPermissions("system:dept:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public List<SysDept> list(SysDept dept)
+    {
+        List<SysDept> deptList = deptService.selectDeptList(dept);
+        return deptList;
+    }
+
+    /**
+     * 新增部门
+     */
+    @GetMapping("/add/{parentId}")
+    public String add(@PathVariable("parentId") Long parentId, ModelMap mmap)
+    {
+        if (!getSysUser().isAdmin())
+        {
+            parentId = getSysUser().getDeptId();
+        }
+        mmap.put("dept", deptService.selectDeptById(parentId));
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存部门
+     */
+    @Log(title = "部门管理", businessType = BusinessType.INSERT)
+    @RequiresPermissions("system:dept:add")
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(@Validated SysDept dept)
+    {
+        if (UserConstants.DEPT_NAME_NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
+        {
+            return error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
+        }
+        dept.setCreateBy(getLoginName());
+        return toAjax(deptService.insertDept(dept));
+    }
+
+    /**
+     * 修改部门
+     */
+    @RequiresPermissions("system:dept:edit")
+    @GetMapping("/edit/{deptId}")
+    public String edit(@PathVariable("deptId") Long deptId, ModelMap mmap)
+    {
+        deptService.checkDeptDataScope(deptId);
+        SysDept dept = deptService.selectDeptById(deptId);
+        if (StringUtils.isNotNull(dept) && 100L == deptId)
+        {
+            dept.setParentName("无");
+        }
+        mmap.put("dept", dept);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存部门
+     */
+    @Log(title = "部门管理", businessType = BusinessType.UPDATE)
+    @RequiresPermissions("system:dept:edit")
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(@Validated SysDept dept)
+    {
+        Long deptId = dept.getDeptId();
+        deptService.checkDeptDataScope(deptId);
+        if (UserConstants.DEPT_NAME_NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
+        {
+            return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
+        }
+        else if (dept.getParentId().equals(deptId))
+        {
+            return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
+        }
+        else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) && deptService.selectNormalChildrenDeptById(deptId) > 0)
+        {
+            return AjaxResult.error("该部门包含未停用的子部门!");
+        }
+        dept.setUpdateBy(getLoginName());
+        return toAjax(deptService.updateDept(dept));
+    }
+
+    /**
+     * 删除
+     */
+    @Log(title = "部门管理", businessType = BusinessType.DELETE)
+    @RequiresPermissions("system:dept:remove")
+    @GetMapping("/remove/{deptId}")
+    @ResponseBody
+    public AjaxResult remove(@PathVariable("deptId") Long deptId)
+    {
+        if (deptService.selectDeptCount(deptId) > 0)
+        {
+            return AjaxResult.warn("存在下级部门,不允许删除");
+        }
+        if (deptService.checkDeptExistUser(deptId))
+        {
+            return AjaxResult.warn("部门存在用户,不允许删除");
+        }
+        deptService.checkDeptDataScope(deptId);
+        return toAjax(deptService.deleteDeptById(deptId));
+    }
+
+    /**
+     * 校验部门名称
+     */
+    @PostMapping("/checkDeptNameUnique")
+    @ResponseBody
+    public String checkDeptNameUnique(SysDept dept)
+    {
+        return deptService.checkDeptNameUnique(dept);
+    }
+
+    /**
+     * 选择部门树
+     *
+     * @param deptId 部门ID
+     * @param excludeId 排除ID
+     */
+    @GetMapping(value = { "/selectDeptTree/{deptId}", "/selectDeptTree/{deptId}/{excludeId}" })
+    public String selectDeptTree(@PathVariable("deptId") Long deptId,
+            @PathVariable(value = "excludeId", required = false) Long excludeId, ModelMap mmap)
+    {
+        mmap.put("dept", deptService.selectDeptById(deptId));
+        mmap.put("excludeId", excludeId);
+        return prefix + "/tree";
+    }
+
+    /**
+     * 加载部门列表树(排除下级)
+     */
+    @GetMapping("/treeData/{excludeId}")
+    @ResponseBody
+    public List<Ztree> treeDataExcludeChild(@PathVariable(value = "excludeId", required = false) Long excludeId)
+    {
+        SysDept dept = new SysDept();
+        dept.setExcludeId(excludeId);
+        List<Ztree> ztrees = deptService.selectDeptTreeExcludeChild(dept);
+        return ztrees;
+    }
+}

+ 130 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysDictDataController.java

@@ -0,0 +1,130 @@
+package com.product.center.manage.web.controller.system;
+
+import java.util.List;
+
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.entity.SysDictData;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.system.service.ISysDictDataService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.entity.SysDictData;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.system.service.ISysDictDataService;
+
+/**
+ * 数据字典信息
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/system/dict/data")
+public class SysDictDataController extends BaseController
+{
+    private String prefix = "system/dict/data";
+
+    @Autowired
+    private ISysDictDataService dictDataService;
+
+    @RequiresPermissions("system:dict:view")
+    @GetMapping()
+    public String dictData()
+    {
+        return prefix + "/data";
+    }
+
+    @PostMapping("/list")
+    @RequiresPermissions("system:dict:list")
+    @ResponseBody
+    public TableDataInfo list(SysDictData dictData)
+    {
+        startPage();
+        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
+        return getDataTable(list);
+    }
+
+    @Log(title = "字典数据", businessType = BusinessType.EXPORT)
+    @RequiresPermissions("system:dict:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysDictData dictData)
+    {
+        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
+        ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
+        return util.exportExcel(list, "字典数据");
+    }
+
+    /**
+     * 新增字典类型
+     */
+    @GetMapping("/add/{dictType}")
+    public String add(@PathVariable("dictType") String dictType, ModelMap mmap)
+    {
+        mmap.put("dictType", dictType);
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存字典类型
+     */
+    @Log(title = "字典数据", businessType = BusinessType.INSERT)
+    @RequiresPermissions("system:dict:add")
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(@Validated SysDictData dict)
+    {
+        dict.setCreateBy(getLoginName());
+        return toAjax(dictDataService.insertDictData(dict));
+    }
+
+    /**
+     * 修改字典类型
+     */
+    @RequiresPermissions("system:dict:edit")
+    @GetMapping("/edit/{dictCode}")
+    public String edit(@PathVariable("dictCode") Long dictCode, ModelMap mmap)
+    {
+        mmap.put("dict", dictDataService.selectDictDataById(dictCode));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存字典类型
+     */
+    @Log(title = "字典数据", businessType = BusinessType.UPDATE)
+    @RequiresPermissions("system:dict:edit")
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(@Validated SysDictData dict)
+    {
+        dict.setUpdateBy(getLoginName());
+        return toAjax(dictDataService.updateDictData(dict));
+    }
+
+    @Log(title = "字典数据", businessType = BusinessType.DELETE)
+    @RequiresPermissions("system:dict:remove")
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        dictDataService.deleteDictDataByIds(ids);
+        return success();
+    }
+}

+ 191 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysDictTypeController.java

@@ -0,0 +1,191 @@
+package com.product.center.manage.web.controller.system;
+
+import java.util.List;
+
+import com.product.center.manage.common.core.page.TableDataInfo;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.constant.UserConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.Ztree;
+import com.product.center.manage.common.core.domain.entity.SysDictType;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.system.service.ISysDictTypeService;
+
+/**
+ * 数据字典信息
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/system/dict")
+public class SysDictTypeController extends BaseController
+{
+    private String prefix = "system/dict/type";
+
+    @Autowired
+    private ISysDictTypeService dictTypeService;
+
+    @RequiresPermissions("system:dict:view")
+    @GetMapping()
+    public String dictType()
+    {
+        return prefix + "/type";
+    }
+
+    @PostMapping("/list")
+    @RequiresPermissions("system:dict:list")
+    @ResponseBody
+    public TableDataInfo list(SysDictType dictType)
+    {
+        startPage();
+        List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
+        return getDataTable(list);
+    }
+
+    @Log(title = "字典类型", businessType = BusinessType.EXPORT)
+    @RequiresPermissions("system:dict:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysDictType dictType)
+    {
+
+        List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
+        ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
+        return util.exportExcel(list, "字典类型");
+    }
+
+    /**
+     * 新增字典类型
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存字典类型
+     */
+    @Log(title = "字典类型", businessType = BusinessType.INSERT)
+    @RequiresPermissions("system:dict:add")
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(@Validated SysDictType dict)
+    {
+        if (UserConstants.DICT_TYPE_NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
+        {
+            return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
+        }
+        dict.setCreateBy(getLoginName());
+        return toAjax(dictTypeService.insertDictType(dict));
+    }
+
+    /**
+     * 修改字典类型
+     */
+    @RequiresPermissions("system:dict:edit")
+    @GetMapping("/edit/{dictId}")
+    public String edit(@PathVariable("dictId") Long dictId, ModelMap mmap)
+    {
+        mmap.put("dict", dictTypeService.selectDictTypeById(dictId));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存字典类型
+     */
+    @Log(title = "字典类型", businessType = BusinessType.UPDATE)
+    @RequiresPermissions("system:dict:edit")
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(@Validated SysDictType dict)
+    {
+        if (UserConstants.DICT_TYPE_NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
+        {
+            return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
+        }
+        dict.setUpdateBy(getLoginName());
+        return toAjax(dictTypeService.updateDictType(dict));
+    }
+
+    @Log(title = "字典类型", businessType = BusinessType.DELETE)
+    @RequiresPermissions("system:dict:remove")
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        dictTypeService.deleteDictTypeByIds(ids);
+        return success();
+    }
+
+    /**
+     * 刷新字典缓存
+     */
+    @RequiresPermissions("system:dict:remove")
+    @Log(title = "字典类型", businessType = BusinessType.CLEAN)
+    @GetMapping("/refreshCache")
+    @ResponseBody
+    public AjaxResult refreshCache()
+    {
+        dictTypeService.resetDictCache();
+        return success();
+    }
+
+    /**
+     * 查询字典详细
+     */
+    @RequiresPermissions("system:dict:list")
+    @GetMapping("/detail/{dictId}")
+    public String detail(@PathVariable("dictId") Long dictId, ModelMap mmap)
+    {
+        mmap.put("dict", dictTypeService.selectDictTypeById(dictId));
+        mmap.put("dictList", dictTypeService.selectDictTypeAll());
+        return "system/dict/data/data";
+    }
+
+    /**
+     * 校验字典类型
+     */
+    @PostMapping("/checkDictTypeUnique")
+    @ResponseBody
+    public String checkDictTypeUnique(SysDictType dictType)
+    {
+        return dictTypeService.checkDictTypeUnique(dictType);
+    }
+
+    /**
+     * 选择字典树
+     */
+    @GetMapping("/selectDictTree/{columnId}/{dictType}")
+    public String selectDeptTree(@PathVariable("columnId") Long columnId, @PathVariable("dictType") String dictType,
+            ModelMap mmap)
+    {
+        mmap.put("columnId", columnId);
+        mmap.put("dict", dictTypeService.selectDictTypeByType(dictType));
+        return prefix + "/tree";
+    }
+
+    /**
+     * 加载字典列表树
+     */
+    @GetMapping("/treeData")
+    @ResponseBody
+    public List<Ztree> treeData()
+    {
+        List<Ztree> ztrees = dictTypeService.selectDictTree(new SysDictType());
+        return ztrees;
+    }
+}

+ 190 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysIndexController.java

@@ -0,0 +1,190 @@
+package com.product.center.manage.web.controller.system;
+
+import java.util.Date;
+import java.util.List;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletResponse;
+
+import com.product.center.manage.common.config.RuoYiConfig;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.entity.SysMenu;
+import com.product.center.manage.common.core.domain.entity.SysUser;
+import com.product.center.manage.common.core.text.Convert;
+import com.product.center.manage.common.utils.DateUtils;
+import com.product.center.manage.common.utils.ServletUtils;
+import com.product.center.manage.framework.shiro.service.SysPasswordService;
+import com.product.center.manage.system.service.ISysConfigService;
+import com.product.center.manage.system.service.ISysMenuService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.config.RuoYiConfig;
+import com.product.center.manage.common.constant.ShiroConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.entity.SysMenu;
+import com.product.center.manage.common.core.domain.entity.SysUser;
+import com.product.center.manage.common.core.text.Convert;
+import com.product.center.manage.common.utils.CookieUtils;
+import com.product.center.manage.common.utils.DateUtils;
+import com.product.center.manage.common.utils.ServletUtils;
+import com.product.center.manage.common.utils.StringUtils;
+import com.product.center.manage.framework.shiro.service.SysPasswordService;
+import com.product.center.manage.system.service.ISysConfigService;
+import com.product.center.manage.system.service.ISysMenuService;
+
+/**
+ * 首页 业务处理
+ *
+ * @author ruoyi
+ */
+@Controller
+public class SysIndexController extends BaseController
+{
+    @Autowired
+    private ISysMenuService menuService;
+
+    @Autowired
+    private ISysConfigService configService;
+
+    @Autowired
+    private SysPasswordService passwordService;
+
+    // 系统首页
+    @GetMapping("/index")
+    public String index(ModelMap mmap)
+    {
+        // 取身份信息
+        SysUser user = getSysUser();
+        // 根据用户id取出菜单
+        List<SysMenu> menus = menuService.selectMenusByUser(user);
+        mmap.put("menus", menus);
+        mmap.put("user", user);
+        mmap.put("sideTheme", configService.selectConfigByKey("sys.index.sideTheme"));
+        mmap.put("skinName", configService.selectConfigByKey("sys.index.skinName"));
+        Boolean footer = Convert.toBool(configService.selectConfigByKey("sys.index.footer"), true);
+        Boolean tagsView = Convert.toBool(configService.selectConfigByKey("sys.index.tagsView"), true);
+        mmap.put("footer", footer);
+        mmap.put("tagsView", tagsView);
+        mmap.put("mainClass", contentMainClass(footer, tagsView));
+        mmap.put("copyrightYear", RuoYiConfig.getCopyrightYear());
+        mmap.put("demoEnabled", RuoYiConfig.isDemoEnabled());
+        mmap.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
+        mmap.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate()));
+        mmap.put("isMobile", ServletUtils.checkAgentIsMobile(ServletUtils.getRequest().getHeader("User-Agent")));
+
+        // 菜单导航显示风格
+        String menuStyle = configService.selectConfigByKey("sys.index.menuStyle");
+        // 移动端,默认使左侧导航菜单,否则取默认配置
+        String indexStyle = ServletUtils.checkAgentIsMobile(ServletUtils.getRequest().getHeader("User-Agent")) ? "index" : menuStyle;
+
+        // 优先Cookie配置导航菜单
+        Cookie[] cookies = ServletUtils.getRequest().getCookies();
+        for (Cookie cookie : cookies)
+        {
+            if (StringUtils.isNotEmpty(cookie.getName()) && "nav-style".equalsIgnoreCase(cookie.getName()))
+            {
+                indexStyle = cookie.getValue();
+                break;
+            }
+        }
+        String webIndex = "topnav".equalsIgnoreCase(indexStyle) ? "index-topnav" : "index";
+        return webIndex;
+    }
+
+    // 锁定屏幕
+    @GetMapping("/lockscreen")
+    public String lockscreen(ModelMap mmap)
+    {
+        mmap.put("user", getSysUser());
+        ServletUtils.getSession().setAttribute(ShiroConstants.LOCK_SCREEN, true);
+        return "lock";
+    }
+
+    // 解锁屏幕
+    @PostMapping("/unlockscreen")
+    @ResponseBody
+    public AjaxResult unlockscreen(String password)
+    {
+        SysUser user = getSysUser();
+        if (StringUtils.isNull(user))
+        {
+            return AjaxResult.error("服务器超时,请重新登录");
+        }
+        if (passwordService.matches(user, password))
+        {
+            ServletUtils.getSession().removeAttribute(ShiroConstants.LOCK_SCREEN);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error("密码不正确,请重新输入。");
+    }
+
+    // 切换主题
+    @GetMapping("/system/switchSkin")
+    public String switchSkin()
+    {
+        return "skin";
+    }
+
+    // 切换菜单
+    @GetMapping("/system/menuStyle/{style}")
+    public void menuStyle(@PathVariable String style, HttpServletResponse response)
+    {
+        CookieUtils.setCookie(response, "nav-style", style);
+    }
+
+    // 系统介绍
+    @GetMapping("/system/main")
+    public String main(ModelMap mmap)
+    {
+        mmap.put("version", RuoYiConfig.getVersion());
+        return "main";
+    }
+
+    // content-main class
+    public String contentMainClass(Boolean footer, Boolean tagsView)
+    {
+        if (!footer && !tagsView)
+        {
+            return "tagsview-footer-hide";
+        }
+        else if (!footer)
+        {
+            return "footer-hide";
+        }
+        else if (!tagsView)
+        {
+            return "tagsview-hide";
+        }
+        return StringUtils.EMPTY;
+    }
+
+    // 检查初始密码是否提醒修改
+    public boolean initPasswordIsModify(Date pwdUpdateDate)
+    {
+        Integer initPasswordModify = Convert.toInt(configService.selectConfigByKey("sys.account.initPasswordModify"));
+        return initPasswordModify != null && initPasswordModify == 1 && pwdUpdateDate == null;
+    }
+
+    // 检查密码是否过期
+    public boolean passwordIsExpiration(Date pwdUpdateDate)
+    {
+        Integer passwordValidateDays = Convert.toInt(configService.selectConfigByKey("sys.account.passwordValidateDays"));
+        if (passwordValidateDays != null && passwordValidateDays > 0)
+        {
+            if (StringUtils.isNull(pwdUpdateDate))
+            {
+                // 如果从未修改过初始密码,直接提醒过期
+                return true;
+            }
+            Date nowDate = DateUtils.getNowDate();
+            return DateUtils.differentDaysByMillisecond(nowDate, pwdUpdateDate) > passwordValidateDays;
+        }
+        return false;
+    }
+}

+ 85 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysLoginController.java

@@ -0,0 +1,85 @@
+package com.product.center.manage.web.controller.system;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.product.center.manage.common.core.text.Convert;
+import com.product.center.manage.common.utils.ServletUtils;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authc.UsernamePasswordToken;
+import org.apache.shiro.subject.Subject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.text.Convert;
+import com.product.center.manage.common.utils.ServletUtils;
+import com.product.center.manage.common.utils.StringUtils;
+import com.product.center.manage.framework.web.service.ConfigService;
+
+/**
+ * 登录验证
+ *
+ * @author ruoyi
+ */
+@Controller
+public class SysLoginController extends BaseController
+{
+    /**
+     * 是否开启记住我功能
+     */
+    @Value("${shiro.rememberMe.enabled: false}")
+    private boolean rememberMe;
+
+    @Autowired
+    private ConfigService configService;
+
+    @GetMapping("/login")
+    public String login(HttpServletRequest request, HttpServletResponse response, ModelMap mmap)
+    {
+        // 如果是Ajax请求,返回Json字符串。
+        if (ServletUtils.isAjaxRequest(request))
+        {
+            return ServletUtils.renderString(response, "{\"code\":\"1\",\"msg\":\"未登录或登录超时。请重新登录\"}");
+        }
+        // 是否开启记住我
+        mmap.put("isRemembered", rememberMe);
+        // 是否开启用户注册
+        mmap.put("isAllowRegister", Convert.toBool(configService.getKey("sys.account.registerUser"), false));
+        return "login";
+    }
+
+    @PostMapping("/login")
+    @ResponseBody
+    public AjaxResult ajaxLogin(String username, String password, Boolean rememberMe)
+    {
+        UsernamePasswordToken token = new UsernamePasswordToken(username, password, rememberMe);
+        Subject subject = SecurityUtils.getSubject();
+        try
+        {
+            subject.login(token);
+            return success();
+        }
+        catch (AuthenticationException e)
+        {
+            String msg = "用户或密码错误";
+            if (StringUtils.isNotEmpty(e.getMessage()))
+            {
+                msg = e.getMessage();
+            }
+            return error(msg);
+        }
+    }
+
+    @GetMapping("/unauth")
+    public String unauth()
+    {
+        return "error/unauth";
+    }
+}

+ 209 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysMenuController.java

@@ -0,0 +1,209 @@
+package com.product.center.manage.web.controller.system;
+
+import java.util.List;
+
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.constant.UserConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.entity.SysMenu;
+import com.product.center.manage.common.core.domain.entity.SysRole;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.ShiroUtils;
+import com.product.center.manage.framework.shiro.util.AuthorizationUtils;
+import com.product.center.manage.system.service.ISysMenuService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.constant.UserConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.Ztree;
+import com.product.center.manage.common.core.domain.entity.SysMenu;
+import com.product.center.manage.common.core.domain.entity.SysRole;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.ShiroUtils;
+import com.product.center.manage.framework.shiro.util.AuthorizationUtils;
+import com.product.center.manage.system.service.ISysMenuService;
+
+/**
+ * 菜单信息
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/system/menu")
+public class SysMenuController extends BaseController
+{
+    private String prefix = "system/menu";
+
+    @Autowired
+    private ISysMenuService menuService;
+
+    @RequiresPermissions("system:menu:view")
+    @GetMapping()
+    public String menu()
+    {
+        return prefix + "/menu";
+    }
+
+    @RequiresPermissions("system:menu:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public List<SysMenu> list(SysMenu menu)
+    {
+        Long userId = ShiroUtils.getUserId();
+        List<SysMenu> menuList = menuService.selectMenuList(menu, userId);
+        return menuList;
+    }
+
+    /**
+     * 删除菜单
+     */
+    @Log(title = "菜单管理", businessType = BusinessType.DELETE)
+    @RequiresPermissions("system:menu:remove")
+    @GetMapping("/remove/{menuId}")
+    @ResponseBody
+    public AjaxResult remove(@PathVariable("menuId") Long menuId)
+    {
+        if (menuService.selectCountMenuByParentId(menuId) > 0)
+        {
+            return AjaxResult.warn("存在子菜单,不允许删除");
+        }
+        if (menuService.selectCountRoleMenuByMenuId(menuId) > 0)
+        {
+            return AjaxResult.warn("菜单已分配,不允许删除");
+        }
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
+        return toAjax(menuService.deleteMenuById(menuId));
+    }
+
+    /**
+     * 新增
+     */
+    @GetMapping("/add/{parentId}")
+    public String add(@PathVariable("parentId") Long parentId, ModelMap mmap)
+    {
+        SysMenu menu = null;
+        if (0L != parentId)
+        {
+            menu = menuService.selectMenuById(parentId);
+        }
+        else
+        {
+            menu = new SysMenu();
+            menu.setMenuId(0L);
+            menu.setMenuName("主目录");
+        }
+        mmap.put("menu", menu);
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存菜单
+     */
+    @Log(title = "菜单管理", businessType = BusinessType.INSERT)
+    @RequiresPermissions("system:menu:add")
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(@Validated SysMenu menu)
+    {
+        if (UserConstants.MENU_NAME_NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
+        {
+            return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
+        }
+        menu.setCreateBy(getLoginName());
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
+        return toAjax(menuService.insertMenu(menu));
+    }
+
+    /**
+     * 修改菜单
+     */
+    @RequiresPermissions("system:menu:edit")
+    @GetMapping("/edit/{menuId}")
+    public String edit(@PathVariable("menuId") Long menuId, ModelMap mmap)
+    {
+        mmap.put("menu", menuService.selectMenuById(menuId));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存菜单
+     */
+    @Log(title = "菜单管理", businessType = BusinessType.UPDATE)
+    @RequiresPermissions("system:menu:edit")
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(@Validated SysMenu menu)
+    {
+        if (UserConstants.MENU_NAME_NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
+        {
+            return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
+        }
+        menu.setUpdateBy(getLoginName());
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
+        return toAjax(menuService.updateMenu(menu));
+    }
+
+    /**
+     * 选择菜单图标
+     */
+    @GetMapping("/icon")
+    public String icon()
+    {
+        return prefix + "/icon";
+    }
+
+    /**
+     * 校验菜单名称
+     */
+    @PostMapping("/checkMenuNameUnique")
+    @ResponseBody
+    public String checkMenuNameUnique(SysMenu menu)
+    {
+        return menuService.checkMenuNameUnique(menu);
+    }
+
+    /**
+     * 加载角色菜单列表树
+     */
+    @GetMapping("/roleMenuTreeData")
+    @ResponseBody
+    public List<Ztree> roleMenuTreeData(SysRole role)
+    {
+        Long userId = ShiroUtils.getUserId();
+        List<Ztree> ztrees = menuService.roleMenuTreeData(role, userId);
+        return ztrees;
+    }
+
+    /**
+     * 加载所有菜单列表树
+     */
+    @GetMapping("/menuTreeData")
+    @ResponseBody
+    public List<Ztree> menuTreeData()
+    {
+        Long userId = ShiroUtils.getUserId();
+        List<Ztree> ztrees = menuService.menuTreeData(userId);
+        return ztrees;
+    }
+
+    /**
+     * 选择菜单树
+     */
+    @GetMapping("/selectMenuTree/{menuId}")
+    public String selectMenuTree(@PathVariable("menuId") Long menuId, ModelMap mmap)
+    {
+        mmap.put("menu", menuService.selectMenuById(menuId));
+        return prefix + "/tree";
+    }
+}

+ 116 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysNoticeController.java

@@ -0,0 +1,116 @@
+package com.product.center.manage.web.controller.system;
+
+import java.util.List;
+
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.system.service.ISysNoticeService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.system.domain.SysNotice;
+import com.product.center.manage.system.service.ISysNoticeService;
+
+/**
+ * 公告 信息操作处理
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/system/notice")
+public class SysNoticeController extends BaseController
+{
+    private String prefix = "system/notice";
+
+    @Autowired
+    private ISysNoticeService noticeService;
+
+    @RequiresPermissions("system:notice:view")
+    @GetMapping()
+    public String notice()
+    {
+        return prefix + "/notice";
+    }
+
+    /**
+     * 查询公告列表
+     */
+    @RequiresPermissions("system:notice:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysNotice notice)
+    {
+        startPage();
+        List<SysNotice> list = noticeService.selectNoticeList(notice);
+        return getDataTable(list);
+    }
+
+    /**
+     * 新增公告
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存公告
+     */
+    @RequiresPermissions("system:notice:add")
+    @Log(title = "通知公告", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(@Validated SysNotice notice)
+    {
+        notice.setCreateBy(getLoginName());
+        return toAjax(noticeService.insertNotice(notice));
+    }
+
+    /**
+     * 修改公告
+     */
+    @RequiresPermissions("system:notice:edit")
+    @GetMapping("/edit/{noticeId}")
+    public String edit(@PathVariable("noticeId") Long noticeId, ModelMap mmap)
+    {
+        mmap.put("notice", noticeService.selectNoticeById(noticeId));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存公告
+     */
+    @RequiresPermissions("system:notice:edit")
+    @Log(title = "通知公告", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(@Validated SysNotice notice)
+    {
+        notice.setUpdateBy(getLoginName());
+        return toAjax(noticeService.updateNotice(notice));
+    }
+
+    /**
+     * 删除公告
+     */
+    @RequiresPermissions("system:notice:remove")
+    @Log(title = "通知公告", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(noticeService.deleteNoticeByIds(ids));
+    }
+}

+ 163 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysPostController.java

@@ -0,0 +1,163 @@
+package com.product.center.manage.web.controller.system;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.constant.UserConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.system.domain.SysPost;
+import com.product.center.manage.system.service.ISysPostService;
+
+/**
+ * 岗位信息操作处理
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/system/post")
+public class SysPostController extends BaseController
+{
+    private String prefix = "system/post";
+
+    @Autowired
+    private ISysPostService postService;
+
+    @RequiresPermissions("system:post:view")
+    @GetMapping()
+    public String operlog()
+    {
+        return prefix + "/post";
+    }
+
+    @RequiresPermissions("system:post:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysPost post)
+    {
+        startPage();
+        List<SysPost> list = postService.selectPostList(post);
+        return getDataTable(list);
+    }
+
+    @Log(title = "岗位管理", businessType = BusinessType.EXPORT)
+    @RequiresPermissions("system:post:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysPost post)
+    {
+        List<SysPost> list = postService.selectPostList(post);
+        ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
+        return util.exportExcel(list, "岗位数据");
+    }
+
+    @RequiresPermissions("system:post:remove")
+    @Log(title = "岗位管理", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        try
+        {
+            return toAjax(postService.deletePostByIds(ids));
+        }
+        catch (Exception e)
+        {
+            return error(e.getMessage());
+        }
+    }
+
+    /**
+     * 新增岗位
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存岗位
+     */
+    @RequiresPermissions("system:post:add")
+    @Log(title = "岗位管理", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(@Validated SysPost post)
+    {
+        if (UserConstants.POST_NAME_NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
+        {
+            return error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
+        }
+        else if (UserConstants.POST_CODE_NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
+        {
+            return error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
+        }
+        post.setCreateBy(getLoginName());
+        return toAjax(postService.insertPost(post));
+    }
+
+    /**
+     * 修改岗位
+     */
+    @RequiresPermissions("system:post:edit")
+    @GetMapping("/edit/{postId}")
+    public String edit(@PathVariable("postId") Long postId, ModelMap mmap)
+    {
+        mmap.put("post", postService.selectPostById(postId));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存岗位
+     */
+    @RequiresPermissions("system:post:edit")
+    @Log(title = "岗位管理", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(@Validated SysPost post)
+    {
+        if (UserConstants.POST_NAME_NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
+        {
+            return error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
+        }
+        else if (UserConstants.POST_CODE_NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
+        {
+            return error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
+        }
+        post.setUpdateBy(getLoginName());
+        return toAjax(postService.updatePost(post));
+    }
+
+    /**
+     * 校验岗位名称
+     */
+    @PostMapping("/checkPostNameUnique")
+    @ResponseBody
+    public String checkPostNameUnique(SysPost post)
+    {
+        return postService.checkPostNameUnique(post);
+    }
+
+    /**
+     * 校验岗位编码
+     */
+    @PostMapping("/checkPostCodeUnique")
+    @ResponseBody
+    public String checkPostCodeUnique(SysPost post)
+    {
+        return postService.checkPostCodeUnique(post);
+    }
+}

+ 198 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysProfileController.java

@@ -0,0 +1,198 @@
+package com.product.center.manage.web.controller.system;
+
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.config.RuoYiConfig;
+import com.product.center.manage.common.constant.UserConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.utils.DateUtils;
+import com.product.center.manage.common.utils.ShiroUtils;
+import com.product.center.manage.common.utils.file.MimeTypeUtils;
+import com.product.center.manage.framework.shiro.service.SysPasswordService;
+import com.product.center.manage.system.service.ISysUserService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.config.RuoYiConfig;
+import com.product.center.manage.common.constant.UserConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.entity.SysUser;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.DateUtils;
+import com.product.center.manage.common.utils.ShiroUtils;
+import com.product.center.manage.common.utils.StringUtils;
+import com.product.center.manage.common.utils.file.FileUploadUtils;
+import com.product.center.manage.common.utils.file.MimeTypeUtils;
+import com.product.center.manage.framework.shiro.service.SysPasswordService;
+import com.product.center.manage.system.service.ISysUserService;
+
+/**
+ * 个人信息 业务处理
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/system/user/profile")
+public class SysProfileController extends BaseController
+{
+    private static final Logger log = LoggerFactory.getLogger(SysProfileController.class);
+
+    private String prefix = "system/user/profile";
+
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private SysPasswordService passwordService;
+
+    /**
+     * 个人信息
+     */
+    @GetMapping()
+    public String profile(ModelMap mmap)
+    {
+        SysUser user = getSysUser();
+        mmap.put("user", user);
+        mmap.put("roleGroup", userService.selectUserRoleGroup(user.getUserId()));
+        mmap.put("postGroup", userService.selectUserPostGroup(user.getUserId()));
+        return prefix + "/profile";
+    }
+
+    @GetMapping("/checkPassword")
+    @ResponseBody
+    public boolean checkPassword(String password)
+    {
+        SysUser user = getSysUser();
+        if (passwordService.matches(user, password))
+        {
+            return true;
+        }
+        return false;
+    }
+
+    @GetMapping("/resetPwd")
+    public String resetPwd(ModelMap mmap)
+    {
+        SysUser user = getSysUser();
+        mmap.put("user", userService.selectUserById(user.getUserId()));
+        return prefix + "/resetPwd";
+    }
+
+    @Log(title = "重置密码", businessType = BusinessType.UPDATE)
+    @PostMapping("/resetPwd")
+    @ResponseBody
+    public AjaxResult resetPwd(String oldPassword, String newPassword)
+    {
+        SysUser user = getSysUser();
+        if (!passwordService.matches(user, oldPassword))
+        {
+            return error("修改密码失败,旧密码错误");
+        }
+        if (passwordService.matches(user, newPassword))
+        {
+            return error("新密码不能与旧密码相同");
+        }
+        user.setSalt(ShiroUtils.randomSalt());
+        user.setPassword(passwordService.encryptPassword(user.getLoginName(), newPassword, user.getSalt()));
+        user.setPwdUpdateDate(DateUtils.getNowDate());
+        if (userService.resetUserPwd(user) > 0)
+        {
+            setSysUser(userService.selectUserById(user.getUserId()));
+            return success();
+        }
+        return error("修改密码异常,请联系管理员");
+    }
+
+    /**
+     * 修改用户
+     */
+    @GetMapping("/edit")
+    public String edit(ModelMap mmap)
+    {
+        SysUser user = getSysUser();
+        mmap.put("user", userService.selectUserById(user.getUserId()));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改头像
+     */
+    @GetMapping("/avatar")
+    public String avatar(ModelMap mmap)
+    {
+        SysUser user = getSysUser();
+        mmap.put("user", userService.selectUserById(user.getUserId()));
+        return prefix + "/avatar";
+    }
+
+    /**
+     * 修改用户
+     */
+    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/update")
+    @ResponseBody
+    public AjaxResult update(SysUser user)
+    {
+        SysUser currentUser = getSysUser();
+        currentUser.setUserName(user.getUserName());
+        currentUser.setEmail(user.getEmail());
+        currentUser.setPhonenumber(user.getPhonenumber());
+        currentUser.setSex(user.getSex());
+        if (StringUtils.isNotEmpty(user.getPhonenumber())
+                && UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(currentUser)))
+        {
+            return error("修改用户'" + currentUser.getLoginName() + "'失败,手机号码已存在");
+        }
+        else if (StringUtils.isNotEmpty(user.getEmail())
+                && UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(currentUser)))
+        {
+            return error("修改用户'" + currentUser.getLoginName() + "'失败,邮箱账号已存在");
+        }
+        if (userService.updateUserInfo(currentUser) > 0)
+        {
+            setSysUser(userService.selectUserById(currentUser.getUserId()));
+            return success();
+        }
+        return error();
+    }
+
+    /**
+     * 保存头像
+     */
+    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/updateAvatar")
+    @ResponseBody
+    public AjaxResult updateAvatar(@RequestParam("avatarfile") MultipartFile file)
+    {
+        SysUser currentUser = getSysUser();
+        try
+        {
+            if (!file.isEmpty())
+            {
+                String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file, MimeTypeUtils.IMAGE_EXTENSION);
+                currentUser.setAvatar(avatar);
+                if (userService.updateUserInfo(currentUser) > 0)
+                {
+                    setSysUser(userService.selectUserById(currentUser.getUserId()));
+                    return success();
+                }
+            }
+            return error();
+        }
+        catch (Exception e)
+        {
+            log.error("修改头像失败!", e);
+            return error(e.getMessage());
+        }
+    }
+}

+ 47 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysRegisterController.java

@@ -0,0 +1,47 @@
+package com.product.center.manage.web.controller.system;
+
+import com.product.center.manage.system.service.ISysConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.entity.SysUser;
+import com.product.center.manage.common.utils.StringUtils;
+import com.product.center.manage.framework.shiro.service.SysRegisterService;
+import com.product.center.manage.system.service.ISysConfigService;
+
+/**
+ * 注册验证
+ *
+ * @author ruoyi
+ */
+@Controller
+public class SysRegisterController extends BaseController
+{
+    @Autowired
+    private SysRegisterService registerService;
+
+    @Autowired
+    private ISysConfigService configService;
+
+    @GetMapping("/register")
+    public String register()
+    {
+        return "register";
+    }
+
+    @PostMapping("/register")
+    @ResponseBody
+    public AjaxResult ajaxRegister(SysUser user)
+    {
+        if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
+        {
+            return error("当前系统没有开启注册功能!");
+        }
+        String msg = registerService.register(user);
+        return StringUtils.isEmpty(msg) ? success() : error(msg);
+    }
+}

+ 335 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysRoleController.java

@@ -0,0 +1,335 @@
+package com.product.center.manage.web.controller.system;
+
+import java.util.List;
+
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.constant.UserConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.entity.SysRole;
+import com.product.center.manage.common.core.domain.entity.SysUser;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.framework.shiro.util.AuthorizationUtils;
+import com.product.center.manage.system.service.ISysUserService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.constant.UserConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.Ztree;
+import com.product.center.manage.common.core.domain.entity.SysRole;
+import com.product.center.manage.common.core.domain.entity.SysUser;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.framework.shiro.util.AuthorizationUtils;
+import com.product.center.manage.system.domain.SysUserRole;
+import com.product.center.manage.system.service.ISysDeptService;
+import com.product.center.manage.system.service.ISysRoleService;
+import com.product.center.manage.system.service.ISysUserService;
+
+/**
+ * 角色信息
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/system/role")
+public class SysRoleController extends BaseController
+{
+    private String prefix = "system/role";
+
+    @Autowired
+    private ISysRoleService roleService;
+
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private ISysDeptService deptService;
+
+    @RequiresPermissions("system:role:view")
+    @GetMapping()
+    public String role()
+    {
+        return prefix + "/role";
+    }
+
+    @RequiresPermissions("system:role:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysRole role)
+    {
+        startPage();
+        List<SysRole> list = roleService.selectRoleList(role);
+        return getDataTable(list);
+    }
+
+    @Log(title = "角色管理", businessType = BusinessType.EXPORT)
+    @RequiresPermissions("system:role:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysRole role)
+    {
+        List<SysRole> list = roleService.selectRoleList(role);
+        ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
+        return util.exportExcel(list, "角色数据");
+    }
+
+    /**
+     * 新增角色
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存角色
+     */
+    @RequiresPermissions("system:role:add")
+    @Log(title = "角色管理", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(@Validated SysRole role)
+    {
+        if (UserConstants.ROLE_NAME_NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
+        {
+            return error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
+        }
+        else if (UserConstants.ROLE_KEY_NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
+        {
+            return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
+        }
+        role.setCreateBy(getLoginName());
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
+        return toAjax(roleService.insertRole(role));
+
+    }
+
+    /**
+     * 修改角色
+     */
+    @RequiresPermissions("system:role:edit")
+    @GetMapping("/edit/{roleId}")
+    public String edit(@PathVariable("roleId") Long roleId, ModelMap mmap)
+    {
+        roleService.checkRoleDataScope(roleId);
+        mmap.put("role", roleService.selectRoleById(roleId));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存角色
+     */
+    @RequiresPermissions("system:role:edit")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(@Validated SysRole role)
+    {
+        roleService.checkRoleAllowed(role);
+        roleService.checkRoleDataScope(role.getRoleId());
+        if (UserConstants.ROLE_NAME_NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
+        {
+            return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
+        }
+        else if (UserConstants.ROLE_KEY_NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
+        {
+            return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
+        }
+        role.setUpdateBy(getLoginName());
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
+        return toAjax(roleService.updateRole(role));
+    }
+
+    /**
+     * 角色分配数据权限
+     */
+    @GetMapping("/authDataScope/{roleId}")
+    public String authDataScope(@PathVariable("roleId") Long roleId, ModelMap mmap)
+    {
+        mmap.put("role", roleService.selectRoleById(roleId));
+        return prefix + "/dataScope";
+    }
+
+    /**
+     * 保存角色分配数据权限
+     */
+    @RequiresPermissions("system:role:edit")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PostMapping("/authDataScope")
+    @ResponseBody
+    public AjaxResult authDataScopeSave(SysRole role)
+    {
+        roleService.checkRoleAllowed(role);
+        roleService.checkRoleDataScope(role.getRoleId());
+        role.setUpdateBy(getLoginName());
+        if (roleService.authDataScope(role) > 0)
+        {
+            setSysUser(userService.selectUserById(getUserId()));
+            return success();
+        }
+        return error();
+    }
+
+    @RequiresPermissions("system:role:remove")
+    @Log(title = "角色管理", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(roleService.deleteRoleByIds(ids));
+    }
+
+    /**
+     * 校验角色名称
+     */
+    @PostMapping("/checkRoleNameUnique")
+    @ResponseBody
+    public String checkRoleNameUnique(SysRole role)
+    {
+        return roleService.checkRoleNameUnique(role);
+    }
+
+    /**
+     * 校验角色权限
+     */
+    @PostMapping("/checkRoleKeyUnique")
+    @ResponseBody
+    public String checkRoleKeyUnique(SysRole role)
+    {
+        return roleService.checkRoleKeyUnique(role);
+    }
+
+    /**
+     * 选择菜单树
+     */
+    @GetMapping("/selectMenuTree")
+    public String selectMenuTree()
+    {
+        return prefix + "/tree";
+    }
+
+    /**
+     * 角色状态修改
+     */
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @RequiresPermissions("system:role:edit")
+    @PostMapping("/changeStatus")
+    @ResponseBody
+    public AjaxResult changeStatus(SysRole role)
+    {
+        roleService.checkRoleAllowed(role);
+        roleService.checkRoleDataScope(role.getRoleId());
+        return toAjax(roleService.changeStatus(role));
+    }
+
+    /**
+     * 分配用户
+     */
+    @RequiresPermissions("system:role:edit")
+    @GetMapping("/authUser/{roleId}")
+    public String authUser(@PathVariable("roleId") Long roleId, ModelMap mmap)
+    {
+        mmap.put("role", roleService.selectRoleById(roleId));
+        return prefix + "/authUser";
+    }
+
+    /**
+     * 查询已分配用户角色列表
+     */
+    @RequiresPermissions("system:role:list")
+    @PostMapping("/authUser/allocatedList")
+    @ResponseBody
+    public TableDataInfo allocatedList(SysUser user)
+    {
+        startPage();
+        List<SysUser> list = userService.selectAllocatedList(user);
+        return getDataTable(list);
+    }
+
+    /**
+     * 取消授权
+     */
+    @RequiresPermissions("system:role:edit")
+    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @PostMapping("/authUser/cancel")
+    @ResponseBody
+    public AjaxResult cancelAuthUser(SysUserRole userRole)
+    {
+        return toAjax(roleService.deleteAuthUser(userRole));
+    }
+
+    /**
+     * 批量取消授权
+     */
+    @RequiresPermissions("system:role:edit")
+    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @PostMapping("/authUser/cancelAll")
+    @ResponseBody
+    public AjaxResult cancelAuthUserAll(Long roleId, String userIds)
+    {
+        return toAjax(roleService.deleteAuthUsers(roleId, userIds));
+    }
+
+    /**
+     * 选择用户
+     */
+    @GetMapping("/authUser/selectUser/{roleId}")
+    public String selectUser(@PathVariable("roleId") Long roleId, ModelMap mmap)
+    {
+        mmap.put("role", roleService.selectRoleById(roleId));
+        return prefix + "/selectUser";
+    }
+
+    /**
+     * 查询未分配用户角色列表
+     */
+    @RequiresPermissions("system:role:list")
+    @PostMapping("/authUser/unallocatedList")
+    @ResponseBody
+    public TableDataInfo unallocatedList(SysUser user)
+    {
+        startPage();
+        List<SysUser> list = userService.selectUnallocatedList(user);
+        return getDataTable(list);
+    }
+
+    /**
+     * 批量选择用户授权
+     */
+    @RequiresPermissions("system:role:edit")
+    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @PostMapping("/authUser/selectAll")
+    @ResponseBody
+    public AjaxResult selectAuthUserAll(Long roleId, String userIds)
+    {
+        roleService.checkRoleDataScope(roleId);
+        return toAjax(roleService.insertAuthUsers(roleId, userIds));
+    }
+
+    /**
+     * 加载角色部门(数据权限)列表树
+     */
+    @RequiresPermissions("system:role:edit")
+    @GetMapping("/deptTreeData")
+    @ResponseBody
+    public List<Ztree> deptTreeData(SysRole role)
+    {
+        List<Ztree> ztrees = deptService.roleDeptTreeData(role);
+        return ztrees;
+    }
+}

+ 342 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/system/SysUserController.java

@@ -0,0 +1,342 @@
+package com.product.center.manage.web.controller.system;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import com.product.center.manage.common.core.domain.entity.SysDept;
+import com.product.center.manage.common.core.domain.entity.SysRole;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.core.text.Convert;
+import com.product.center.manage.common.utils.ShiroUtils;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.framework.shiro.service.SysPasswordService;
+import com.product.center.manage.system.service.ISysUserService;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import com.product.center.manage.common.annotation.Log;
+import com.product.center.manage.common.constant.UserConstants;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.AjaxResult;
+import com.product.center.manage.common.core.domain.Ztree;
+import com.product.center.manage.common.core.domain.entity.SysDept;
+import com.product.center.manage.common.core.domain.entity.SysRole;
+import com.product.center.manage.common.core.domain.entity.SysUser;
+import com.product.center.manage.common.core.page.TableDataInfo;
+import com.product.center.manage.common.core.text.Convert;
+import com.product.center.manage.common.enums.BusinessType;
+import com.product.center.manage.common.utils.ShiroUtils;
+import com.product.center.manage.common.utils.StringUtils;
+import com.product.center.manage.common.utils.poi.ExcelUtil;
+import com.product.center.manage.framework.shiro.service.SysPasswordService;
+import com.product.center.manage.framework.shiro.util.AuthorizationUtils;
+import com.product.center.manage.system.service.ISysDeptService;
+import com.product.center.manage.system.service.ISysPostService;
+import com.product.center.manage.system.service.ISysRoleService;
+import com.product.center.manage.system.service.ISysUserService;
+
+/**
+ * 用户信息
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/system/user")
+public class SysUserController extends BaseController
+{
+    private String prefix = "system/user";
+
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private ISysRoleService roleService;
+
+    @Autowired
+    private ISysDeptService deptService;
+
+    @Autowired
+    private ISysPostService postService;
+
+    @Autowired
+    private SysPasswordService passwordService;
+
+    @RequiresPermissions("system:user:view")
+    @GetMapping()
+    public String user()
+    {
+        return prefix + "/user";
+    }
+
+    @RequiresPermissions("system:user:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysUser user)
+    {
+        startPage();
+        List<SysUser> list = userService.selectUserList(user);
+        return getDataTable(list);
+    }
+
+    @Log(title = "用户管理", businessType = BusinessType.EXPORT)
+    @RequiresPermissions("system:user:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysUser user)
+    {
+        List<SysUser> list = userService.selectUserList(user);
+        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
+        return util.exportExcel(list, "用户数据");
+    }
+
+    @Log(title = "用户管理", businessType = BusinessType.IMPORT)
+    @RequiresPermissions("system:user:import")
+    @PostMapping("/importData")
+    @ResponseBody
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
+    {
+        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
+        List<SysUser> userList = util.importExcel(file.getInputStream());
+        String message = userService.importUser(userList, updateSupport, getLoginName());
+        return AjaxResult.success(message);
+    }
+
+    @RequiresPermissions("system:user:view")
+    @GetMapping("/importTemplate")
+    @ResponseBody
+    public AjaxResult importTemplate()
+    {
+        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
+        return util.importTemplateExcel("用户数据");
+    }
+
+    /**
+     * 新增用户
+     */
+    @GetMapping("/add")
+    public String add(ModelMap mmap)
+    {
+        mmap.put("roles", roleService.selectRoleAll().stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
+        mmap.put("posts", postService.selectPostAll());
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存用户
+     */
+    @RequiresPermissions("system:user:add")
+    @Log(title = "用户管理", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(@Validated SysUser user)
+    {
+        if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user.getLoginName())))
+        {
+            return error("新增用户'" + user.getLoginName() + "'失败,登录账号已存在");
+        }
+        else if (StringUtils.isNotEmpty(user.getPhonenumber())
+                && UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
+        {
+            return error("新增用户'" + user.getLoginName() + "'失败,手机号码已存在");
+        }
+        else if (StringUtils.isNotEmpty(user.getEmail())
+                && UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
+        {
+            return error("新增用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
+        }
+        user.setSalt(ShiroUtils.randomSalt());
+        user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
+        user.setCreateBy(getLoginName());
+        return toAjax(userService.insertUser(user));
+    }
+
+    /**
+     * 修改用户
+     */
+    @RequiresPermissions("system:user:edit")
+    @GetMapping("/edit/{userId}")
+    public String edit(@PathVariable("userId") Long userId, ModelMap mmap)
+    {
+        userService.checkUserDataScope(userId);
+        List<SysRole> roles = roleService.selectRolesByUserId(userId);
+        mmap.put("user", userService.selectUserById(userId));
+        mmap.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
+        mmap.put("posts", postService.selectPostsByUserId(userId));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存用户
+     */
+    @RequiresPermissions("system:user:edit")
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(@Validated SysUser user)
+    {
+        userService.checkUserAllowed(user);
+        userService.checkUserDataScope(user.getUserId());
+        if (StringUtils.isNotEmpty(user.getPhonenumber())
+                && UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
+        {
+            return error("修改用户'" + user.getLoginName() + "'失败,手机号码已存在");
+        }
+        else if (StringUtils.isNotEmpty(user.getEmail())
+                && UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
+        {
+            return error("修改用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
+        }
+        user.setUpdateBy(getLoginName());
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
+        return toAjax(userService.updateUser(user));
+    }
+
+    @RequiresPermissions("system:user:resetPwd")
+    @GetMapping("/resetPwd/{userId}")
+    public String resetPwd(@PathVariable("userId") Long userId, ModelMap mmap)
+    {
+        mmap.put("user", userService.selectUserById(userId));
+        return prefix + "/resetPwd";
+    }
+
+    @RequiresPermissions("system:user:resetPwd")
+    @Log(title = "重置密码", businessType = BusinessType.UPDATE)
+    @PostMapping("/resetPwd")
+    @ResponseBody
+    public AjaxResult resetPwdSave(SysUser user)
+    {
+        userService.checkUserAllowed(user);
+        userService.checkUserDataScope(user.getUserId());
+        user.setSalt(ShiroUtils.randomSalt());
+        user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
+        if (userService.resetUserPwd(user) > 0)
+        {
+            if (ShiroUtils.getUserId().longValue() == user.getUserId().longValue())
+            {
+                setSysUser(userService.selectUserById(user.getUserId()));
+            }
+            return success();
+        }
+        return error();
+    }
+
+    /**
+     * 进入授权角色页
+     */
+    @GetMapping("/authRole/{userId}")
+    public String authRole(@PathVariable("userId") Long userId, ModelMap mmap)
+    {
+        SysUser user = userService.selectUserById(userId);
+        // 获取用户所属的角色列表
+        List<SysRole> roles = roleService.selectRolesByUserId(userId);
+        mmap.put("user", user);
+        mmap.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
+        return prefix + "/authRole";
+    }
+
+    /**
+     * 用户授权角色
+     */
+    @RequiresPermissions("system:user:edit")
+    @Log(title = "用户管理", businessType = BusinessType.GRANT)
+    @PostMapping("/authRole/insertAuthRole")
+    @ResponseBody
+    public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
+    {
+        userService.checkUserDataScope(userId);
+        userService.insertUserAuth(userId, roleIds);
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
+        return success();
+    }
+
+    @RequiresPermissions("system:user:remove")
+    @Log(title = "用户管理", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        if (ArrayUtils.contains(Convert.toLongArray(ids), getUserId()))
+        {
+            return error("当前用户不能删除");
+        }
+        return toAjax(userService.deleteUserByIds(ids));
+    }
+
+    /**
+     * 校验用户名
+     */
+    @PostMapping("/checkLoginNameUnique")
+    @ResponseBody
+    public String checkLoginNameUnique(SysUser user)
+    {
+        return userService.checkLoginNameUnique(user.getLoginName());
+    }
+
+    /**
+     * 校验手机号码
+     */
+    @PostMapping("/checkPhoneUnique")
+    @ResponseBody
+    public String checkPhoneUnique(SysUser user)
+    {
+        return userService.checkPhoneUnique(user);
+    }
+
+    /**
+     * 校验email邮箱
+     */
+    @PostMapping("/checkEmailUnique")
+    @ResponseBody
+    public String checkEmailUnique(SysUser user)
+    {
+        return userService.checkEmailUnique(user);
+    }
+
+    /**
+     * 用户状态修改
+     */
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @RequiresPermissions("system:user:edit")
+    @PostMapping("/changeStatus")
+    @ResponseBody
+    public AjaxResult changeStatus(SysUser user)
+    {
+        userService.checkUserAllowed(user);
+        userService.checkUserDataScope(user.getUserId());
+        return toAjax(userService.changeStatus(user));
+    }
+
+    /**
+     * 加载部门列表树
+     */
+    @RequiresPermissions("system:user:list")
+    @GetMapping("/deptTreeData")
+    @ResponseBody
+    public List<Ztree> deptTreeData()
+    {
+        List<Ztree> ztrees = deptService.selectDeptTree(new SysDept());
+        return ztrees;
+    }
+
+    /**
+     * 选择部门树
+     *
+     * @param deptId 部门ID
+     */
+    @RequiresPermissions("system:user:list")
+    @GetMapping("/selectDeptTree/{deptId}")
+    public String selectDeptTree(@PathVariable("deptId") Long deptId, ModelMap mmap)
+    {
+        mmap.put("dept", deptService.selectDeptById(deptId));
+        return prefix + "/deptTree";
+    }
+}

+ 27 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/tool/BuildController.java

@@ -0,0 +1,27 @@
+package com.product.center.manage.web.controller.tool;
+
+import com.product.center.manage.common.core.controller.BaseController;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.product.center.manage.common.core.controller.BaseController;
+
+/**
+ * build 表单构建
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/tool/build")
+public class BuildController extends BaseController
+{
+    private String prefix = "tool/build";
+
+    @RequiresPermissions("tool:build:view")
+    @GetMapping()
+    public String build()
+    {
+        return prefix + "/build";
+    }
+}

+ 24 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/tool/SwaggerController.java

@@ -0,0 +1,24 @@
+package com.product.center.manage.web.controller.tool;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.product.center.manage.common.core.controller.BaseController;
+
+/**
+ * swagger 接口
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/tool/swagger")
+public class SwaggerController extends BaseController
+{
+    @RequiresPermissions("tool:swagger:view")
+    @GetMapping()
+    public String index()
+    {
+        return redirect("/swagger-ui/index.html");
+    }
+}

+ 187 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/controller/tool/TestController.java

@@ -0,0 +1,187 @@
+package com.product.center.manage.web.controller.tool;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.R;
+import com.product.center.manage.common.utils.StringUtils;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.product.center.manage.common.core.controller.BaseController;
+import com.product.center.manage.common.core.domain.R;
+import com.product.center.manage.common.utils.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * swagger 用户测试方法
+ *
+ * @author ruoyi
+ */
+@Api("用户信息管理")
+@RestController
+@RequestMapping("/test/user")
+public class TestController extends BaseController
+{
+    private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
+    {
+        users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
+        users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
+    }
+
+    @ApiOperation("获取用户列表")
+    @GetMapping("/list")
+    public R<List<UserEntity>> userList()
+    {
+        List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
+        return R.ok(userList);
+    }
+
+    @ApiOperation("获取用户详细")
+    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
+    @GetMapping("/{userId}")
+    public R<UserEntity> getUser(@PathVariable Integer userId)
+    {
+        if (!users.isEmpty() && users.containsKey(userId))
+        {
+            return R.ok(users.get(userId));
+        }
+        else
+        {
+            return R.fail("用户不存在");
+        }
+    }
+
+    @ApiOperation("新增用户")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
+        @ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
+        @ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
+        @ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
+    })
+    @PostMapping("/save")
+    public R<String> save(UserEntity user)
+    {
+        if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
+        {
+            return R.fail("用户ID不能为空");
+        }
+        users.put(user.getUserId(), user);
+        return R.ok();
+    }
+
+    @ApiOperation("更新用户")
+    @PutMapping("/update")
+    public R<String> update(@RequestBody UserEntity user)
+    {
+        if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
+        {
+            return R.fail("用户ID不能为空");
+        }
+        if (users.isEmpty() || !users.containsKey(user.getUserId()))
+        {
+            return R.fail("用户不存在");
+        }
+        users.remove(user.getUserId());
+        users.put(user.getUserId(), user);
+        return R.ok();
+    }
+
+    @ApiOperation("删除用户信息")
+    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
+    @DeleteMapping("/{userId}")
+    public R<String> delete(@PathVariable Integer userId)
+    {
+        if (!users.isEmpty() && users.containsKey(userId))
+        {
+            users.remove(userId);
+            return R.ok();
+        }
+        else
+        {
+            return R.fail("用户不存在");
+        }
+    }
+}
+
+@ApiModel(value = "UserEntity", description = "用户实体")
+class UserEntity
+{
+    @ApiModelProperty("用户ID")
+    private Integer userId;
+
+    @ApiModelProperty("用户名称")
+    private String username;
+
+    @ApiModelProperty("用户密码")
+    private String password;
+
+    @ApiModelProperty("用户手机")
+    private String mobile;
+
+    public UserEntity()
+    {
+
+    }
+
+    public UserEntity(Integer userId, String username, String password, String mobile)
+    {
+        this.userId = userId;
+        this.username = username;
+        this.password = password;
+        this.mobile = mobile;
+    }
+
+    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 String getPassword()
+    {
+        return password;
+    }
+
+    public void setPassword(String password)
+    {
+        this.password = password;
+    }
+
+    public String getMobile()
+    {
+        return mobile;
+    }
+
+    public void setMobile(String mobile)
+    {
+        this.mobile = mobile;
+    }
+}

+ 68 - 0
product-center-manage-admin/src/main/java/com/product/center/manage/web/core/config/SwaggerConfig.java

@@ -0,0 +1,68 @@
+package com.product.center.manage.web.core.config;
+
+import com.product.center.manage.common.config.RuoYiConfig;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import com.product.center.manage.common.config.RuoYiConfig;
+import io.swagger.annotations.ApiOperation;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+
+/**
+ * Swagger2的接口配置
+ *
+ * @author ruoyi
+ */
+@Configuration
+public class SwaggerConfig
+{
+    /** 是否开启swagger */
+    @Value("${swagger.enabled}")
+    private boolean enabled;
+
+    /**
+     * 创建API
+     */
+    @Bean
+    public Docket createRestApi()
+    {
+        return new Docket(DocumentationType.OAS_30)
+                // 是否启用Swagger
+                .enable(enabled)
+                // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
+                .apiInfo(apiInfo())
+                // 设置哪些接口暴露给Swagger展示
+                .select()
+                // 扫描所有有注解的api,用这种方式更灵活
+                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
+                // 扫描指定包中的swagger注解
+                //.apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger"))
+                // 扫描所有 .apis(RequestHandlerSelectors.any())
+                .paths(PathSelectors.any())
+                .build();
+    }
+
+    /**
+     * 添加摘要信息
+     */
+    private ApiInfo apiInfo()
+    {
+        // 用ApiInfoBuilder进行定制
+        return new ApiInfoBuilder()
+                // 设置标题
+                .title("标题:若依管理系统_接口文档")
+                // 描述
+                .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
+                // 作者信息
+                .contact(new Contact(RuoYiConfig.getName(), null, null))
+                // 版本
+                .version("版本号:" + RuoYiConfig.getVersion())
+                .build();
+    }
+}

+ 0 - 0
ruoyi-admin/src/main/resources/application-druid.yml → product-center-manage-admin/src/main/resources/application-druid.yml


+ 0 - 0
ruoyi-admin/src/main/resources/application.yml → product-center-manage-admin/src/main/resources/application.yml


+ 0 - 0
ruoyi-admin/src/main/resources/banner.txt → product-center-manage-admin/src/main/resources/banner.txt


+ 0 - 0
ruoyi-admin/src/main/resources/ehcache/ehcache-shiro.xml → product-center-manage-admin/src/main/resources/ehcache/ehcache-shiro.xml


+ 0 - 0
ruoyi-admin/src/main/resources/logback.xml → product-center-manage-admin/src/main/resources/logback.xml


+ 0 - 0
ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml → product-center-manage-admin/src/main/resources/mybatis/mybatis-config.xml


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/beautifyhtml/beautifyhtml.js → product-center-manage-admin/src/main/resources/static/ajax/libs/beautifyhtml/beautifyhtml.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/blockUI/jquery.blockUI.js → product-center-manage-admin/src/main/resources/static/ajax/libs/blockUI/jquery.blockUI.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.css → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.css → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading-sm.gif → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading-sm.gif


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading.gif → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading.gif


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.css → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.css → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.css → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.css → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/clear.png → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/clear.png


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/loading.gif → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/loading.gif


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/tableExport.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/tableExport.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-columns/jquery.dragtable.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-columns/jquery.dragtable.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/jquery.tablednd.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/jquery.tablednd.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/resizable/jquery.resizableColumns.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/resizable/jquery.resizableColumns.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/cropper/cropper.css → product-center-manage-admin/src/main/resources/static/ajax/libs/cropper/cropper.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/cropper/cropper.js → product-center-manage-admin/src/main/resources/static/ajax/libs/cropper/cropper.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/cropper/cropper.min.css → product-center-manage-admin/src/main/resources/static/ajax/libs/cropper/cropper.min.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/cropper/cropper.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/cropper/cropper.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/cxselect/jquery.cxselect.js → product-center-manage-admin/src/main/resources/static/ajax/libs/cxselect/jquery.cxselect.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/cxselect/jquery.cxselect.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/cxselect/jquery.cxselect.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.css → product-center-manage-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.js → product-center-manage-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.css → product-center-manage-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.css → product-center-manage-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.js → product-center-manage-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.min.css → product-center-manage-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.min.css


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.min.js → product-center-manage-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.min.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/flot/curvedLines.js → product-center-manage-admin/src/main/resources/static/ajax/libs/flot/curvedLines.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.js → product-center-manage-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.pie.js → product-center-manage-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.pie.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.resize.js → product-center-manage-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.resize.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.spline.js → product-center-manage-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.spline.js


+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.symbol.js → product-center-manage-admin/src/main/resources/static/ajax/libs/flot/jquery.flot.symbol.js


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