master
RuoYi 4 years ago
parent 0d341f1aaa
commit cee572f237
  1. 0
      .gitignore
  2. 0
      bin/clean.bat
  3. 0
      bin/package.bat
  4. 14
      bin/run.bat
  5. BIN
      doc/若依环境使用手册.docx
  6. 234
      pom.xml
  7. 108
      ruoyi-admin/pom.xml
  8. 0
      ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
  9. 0
      ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
  10. 8
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
  11. 6
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
  12. 6
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java
  13. 16
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java
  14. 16
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java
  15. 20
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java
  16. 18
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
  17. 14
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
  18. 18
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
  19. 16
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
  20. 20
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
  21. 18
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
  22. 16
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
  23. 16
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
  24. 20
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
  25. 18
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
  26. 28
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
  27. 24
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java
  28. 6
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java
  29. 3
      ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
  30. 0
      ruoyi-admin/src/main/resources/META-INF/spring-devtools.properties
  31. 0
      ruoyi-admin/src/main/resources/application-druid.yml
  32. 17
      ruoyi-admin/src/main/resources/application.yml
  33. 0
      ruoyi-admin/src/main/resources/banner.txt
  34. 0
      ruoyi-admin/src/main/resources/i18n/messages.properties
  35. 0
      ruoyi-admin/src/main/resources/logback.xml
  36. 0
      ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
  37. 124
      ruoyi-common/pom.xml
  38. 2
      ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataScope.java
  39. 4
      ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataSource.java
  40. 236
      ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java
  41. 36
      ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excels.java
  42. 6
      ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java
  43. 46
      ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java
  44. 4
      ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java
  45. 4
      ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
  46. 0
      ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java
  47. 0
      ruoyi-common/src/main/java/com/ruoyi/common/constant/HttpStatus.java
  48. 100
      ruoyi-common/src/main/java/com/ruoyi/common/constant/ScheduleConstants.java
  49. 0
      ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java
  50. 18
      ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java
  51. 2
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
  52. 2
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
  53. 2
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java
  54. 6
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java
  55. 4
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
  56. 8
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java
  57. 8
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java
  58. 4
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
  59. 8
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java
  60. 12
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  61. 2
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
  62. 4
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
  63. 5
      ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java
  64. 4
      ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java
  65. 2
      ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableSupport.java
  66. 2
      ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
  67. 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/text/CharsetKit.java
  68. 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java
  69. 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/text/StrFormatter.java
  70. 2
      ruoyi-common/src/main/java/com/ruoyi/common/enums/BusinessStatus.java
  71. 2
      ruoyi-common/src/main/java/com/ruoyi/common/enums/BusinessType.java
  72. 2
      ruoyi-common/src/main/java/com/ruoyi/common/enums/DataSourceType.java
  73. 0
      ruoyi-common/src/main/java/com/ruoyi/common/enums/HttpMethod.java
  74. 2
      ruoyi-common/src/main/java/com/ruoyi/common/enums/OperatorType.java
  75. 0
      ruoyi-common/src/main/java/com/ruoyi/common/enums/UserStatus.java
  76. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/BaseException.java
  77. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/CustomException.java
  78. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/DemoModeException.java
  79. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/UtilException.java
  80. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileException.java
  81. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileNameLengthLimitExceededException.java
  82. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileSizeLimitExceededException.java
  83. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/file/InvalidExtensionException.java
  84. 66
      ruoyi-common/src/main/java/com/ruoyi/common/exception/job/TaskException.java
  85. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaException.java
  86. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaExpireException.java
  87. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserException.java
  88. 0
      ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserPasswordNotMatchException.java
  89. 104
      ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java
  90. 144
      ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java
  91. 0
      ruoyi-common/src/main/java/com/ruoyi/common/filter/XssFilter.java
  92. 0
      ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
  93. 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/Arith.java
  94. 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
  95. 5
      ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java
  96. 80
      ruoyi-common/src/main/java/com/ruoyi/common/utils/ExceptionUtil.java
  97. 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/LogUtils.java
  98. 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/MessageUtils.java
  99. 2
      ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java
  100. 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,14 @@
@echo off
echo.
echo [信息] 运行Web工程。
echo.
cd %~dp0
cd ../ruoyi-admin/target
set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -jar %JAVA_OPTS% ruoyi-admin.jar
cd bin
pause

Binary file not shown.

@ -0,0 +1,234 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi</artifactId>
<version>3.0.0</version>
<name>ruoyi</name>
<url>http://www.ruoyi.vip</url>
<description>若依管理系统</description>
<properties>
<ruoyi.version>3.0.0</ruoyi.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<mybatis.boot.version>1.3.2</mybatis.boot.version>
<druid.version>1.1.14</druid.version>
<bitwalker.version>1.19</bitwalker.version>
<swagger.version>2.9.2</swagger.version>
<pagehelper.boot.version>1.2.5</pagehelper.boot.version>
<fastjson.version>1.2.70</fastjson.version>
<oshi.version>3.9.1</oshi.version>
<commons.io.version>2.5</commons.io.version>
<commons.fileupload.version>1.3.3</commons.fileupload.version>
<poi.version>3.17</poi.version>
<velocity.version>1.7</velocity.version>
<jwt.version>0.9.0</jwt.version>
</properties>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
<!-- SpringBoot的依赖配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.1.1.RELEASE</version>
<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>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>${bitwalker.version}</version>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.boot.version}</version>
</dependency>
<!-- 获取系统信息 -->
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>${oshi.version}</version>
</dependency>
<!-- swagger2-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- swagger2-UI-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
<!--io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<!--文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<!--velocity代码生成使用模板 -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>${velocity.version}</version>
</dependency>
<!-- 阿里JSON解析器 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!--Token生成与解析-->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jwt.version}</version>
</dependency>
<!-- 定时任务-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-quartz</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-generator</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 核心模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-framework</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 系统模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-system</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 通用工具-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
<version>${ruoyi.version}</version>
</dependency>
</dependencies>
</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>
</modules>
<packaging>pom</packaging>
<dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

@ -0,0 +1,108 @@
<?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>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>ruoyi-admin</artifactId>
<description>
web服务入口
</description>
<dependencies>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!-- swagger2-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</dependency>
<!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本-->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.21</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.5.21</version>
</dependency>
<!-- swagger2-UI-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- 核心模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-framework</artifactId>
</dependency>
<!-- 定时任务-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-quartz</artifactId>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-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>
</plugins>
<finalName>${project.artifactId}</finalName>
</build>
</project>

@ -1,4 +1,4 @@
package com.ruoyi.project.common; package com.ruoyi.web.controller.common;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
@ -8,11 +8,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.utils.IdUtils; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.VerifyCodeUtils; import com.ruoyi.common.utils.VerifyCodeUtils;
import com.ruoyi.common.utils.sign.Base64; import com.ruoyi.common.utils.sign.Base64;
import com.ruoyi.framework.redis.RedisCache; import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.framework.web.domain.AjaxResult;
/** /**
* 验证码操作处理 * 验证码操作处理

@ -1,4 +1,4 @@
package com.ruoyi.project.common; package com.ruoyi.web.controller.common;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -9,13 +9,13 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.framework.config.RuoYiConfig;
import com.ruoyi.framework.config.ServerConfig; import com.ruoyi.framework.config.ServerConfig;
import com.ruoyi.framework.web.domain.AjaxResult;
/** /**
* 通用请求处理 * 通用请求处理

@ -1,11 +1,11 @@
package com.ruoyi.project.monitor.controller; package com.ruoyi.web.controller.monitor;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.framework.web.domain.Server; import com.ruoyi.framework.web.domain.Server;
/** /**

@ -1,4 +1,4 @@
package com.ruoyi.project.monitor.controller; package com.ruoyi.web.controller.monitor;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -8,14 +8,14 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.system.domain.SysLogininfor;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.system.service.ISysLogininforService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.monitor.domain.SysLogininfor;
import com.ruoyi.project.monitor.service.ISysLogininforService;
/** /**
* 系统访问记录 * 系统访问记录

@ -1,4 +1,4 @@
package com.ruoyi.project.monitor.controller; package com.ruoyi.web.controller.monitor;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -8,14 +8,14 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.system.domain.SysOperLog;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.system.service.ISysOperLogService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.monitor.domain.SysOperLog;
import com.ruoyi.project.monitor.service.ISysOperLogService;
/** /**
* 操作日志记录 * 操作日志记录

@ -1,4 +1,4 @@
package com.ruoyi.project.monitor.controller; package com.ruoyi.web.controller.monitor;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
@ -11,17 +11,17 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.system.domain.SysUserOnline;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.system.service.ISysUserOnlineService;
import com.ruoyi.framework.redis.RedisCache;
import com.ruoyi.framework.security.LoginUser;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.monitor.domain.SysUserOnline;
import com.ruoyi.project.system.service.ISysUserOnlineService;
/** /**
* 在线用户监控 * 在线用户监控

@ -1,4 +1,4 @@
package com.ruoyi.project.system.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -12,16 +12,17 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.domain.SysConfig;
import com.ruoyi.project.system.service.ISysConfigService;
/** /**
* 参数配置 信息操作处理 * 参数配置 信息操作处理
@ -82,6 +83,7 @@ public class SysConfigController extends BaseController
@PreAuthorize("@ss.hasPermi('system:config:add')") @PreAuthorize("@ss.hasPermi('system:config:add')")
@Log(title = "参数管理", businessType = BusinessType.INSERT) @Log(title = "参数管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
@RepeatSubmit
public AjaxResult add(@Validated @RequestBody SysConfig config) public AjaxResult add(@Validated @RequestBody SysConfig config)
{ {
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))

@ -1,4 +1,4 @@
package com.ruoyi.project.system.controller; package com.ruoyi.web.controller.system;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@ -14,15 +14,15 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.system.domain.SysDept;
import com.ruoyi.project.system.service.ISysDeptService;
/** /**
* 部门信息 * 部门信息

@ -1,4 +1,4 @@
package com.ruoyi.project.system.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.domain.SysDictData;
import com.ruoyi.project.system.service.ISysDictDataService;
import com.ruoyi.project.system.service.ISysDictTypeService;
/** /**
* 数据字典信息 * 数据字典信息

@ -1,4 +1,4 @@
package com.ruoyi.project.system.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDictType;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.domain.SysDictType;
import com.ruoyi.project.system.service.ISysDictTypeService;
/** /**
* 数据字典信息 * 数据字典信息

@ -1,4 +1,4 @@
package com.ruoyi.project.system.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -8,16 +8,16 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysMenu;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginBody;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.framework.security.LoginBody; import com.ruoyi.framework.web.service.SysLoginService;
import com.ruoyi.framework.security.LoginUser; import com.ruoyi.framework.web.service.SysPermissionService;
import com.ruoyi.framework.security.service.SysLoginService; import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.framework.security.service.SysPermissionService; import com.ruoyi.system.service.ISysMenuService;
import com.ruoyi.framework.security.service.TokenService;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.system.domain.SysMenu;
import com.ruoyi.project.system.domain.SysUser;
import com.ruoyi.project.system.service.ISysMenuService;
/** /**
* 登录验证 * 登录验证

@ -1,4 +1,4 @@
package com.ruoyi.project.system.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -12,19 +12,19 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysMenu;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.system.service.ISysMenuService;
import com.ruoyi.framework.security.LoginUser;
import com.ruoyi.framework.security.service.TokenService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.system.domain.SysMenu;
import com.ruoyi.project.system.service.ISysMenuService;
/** /**
* 菜单信息 * 菜单信息

@ -1,4 +1,4 @@
package com.ruoyi.project.system.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.system.domain.SysNotice;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.system.service.ISysNoticeService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.domain.SysNotice;
import com.ruoyi.project.system.service.ISysNoticeService;
/** /**
* 公告 信息操作处理 * 公告 信息操作处理

@ -1,4 +1,4 @@
package com.ruoyi.project.system.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.system.domain.SysPost;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.domain.SysPost;
import com.ruoyi.project.system.service.ISysPostService;
/** /**
* 岗位信息操作处理 * 岗位信息操作处理

@ -1,4 +1,4 @@
package com.ruoyi.project.system.controller; package com.ruoyi.web.controller.system;
import java.io.IOException; import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -10,18 +10,18 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.framework.config.RuoYiConfig;
import com.ruoyi.framework.security.LoginUser;
import com.ruoyi.framework.security.service.TokenService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.system.domain.SysUser;
import com.ruoyi.project.system.service.ISysUserService;
/** /**
* 个人信息 业务处理 * 个人信息 业务处理

@ -1,4 +1,4 @@
package com.ruoyi.project.system.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.domain.SysRole;
import com.ruoyi.project.system.service.ISysRoleService;
/** /**
* 角色信息 * 角色信息
@ -151,4 +151,4 @@ public class SysRoleController extends BaseController
{ {
return AjaxResult.success(roleService.selectRoleAll()); return AjaxResult.success(roleService.selectRoleAll());
} }
} }

@ -1,4 +1,4 @@
package com.ruoyi.project.system.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -14,23 +14,23 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.framework.security.LoginUser; import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.framework.security.service.TokenService; import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.domain.SysRole;
import com.ruoyi.project.system.domain.SysUser;
import com.ruoyi.project.system.service.ISysPostService;
import com.ruoyi.project.system.service.ISysRoleService;
import com.ruoyi.project.system.service.ISysUserService;
/** /**
* 用户信息 * 用户信息
@ -198,4 +198,4 @@ public class SysUserController extends BaseController
user.setUpdateBy(SecurityUtils.getUsername()); user.setUpdateBy(SecurityUtils.getUsername());
return toAjax(userService.updateUserStatus(user)); return toAjax(userService.updateUserStatus(user));
} }
} }

@ -0,0 +1,24 @@
package com.ruoyi.web.controller.tool;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.common.core.controller.BaseController;
/**
* swagger 接口
*
* @author ruoyi
*/
@Controller
@RequestMapping("/tool/swagger")
public class SwaggerController extends BaseController
{
@PreAuthorize("@ss.hasPermi('tool:swagger:view')")
@GetMapping()
public String index()
{
return redirect("/swagger-ui.html");
}
}

@ -1,4 +1,4 @@
package com.ruoyi.project.tool.swagger; package com.ruoyi.web.controller.tool;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
@ -11,9 +11,9 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

@ -1,4 +1,4 @@
package com.ruoyi.framework.config; package com.ruoyi.web.core.config;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import com.ruoyi.common.config.RuoYiConfig;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.PathSelectors;

@ -3,7 +3,7 @@ ruoyi:
# 名称 # 名称
name: RuoYi name: RuoYi
# 版本 # 版本
version: 2.3.0 version: 3.0.0
# 版权年份 # 版权年份
copyrightYear: 2019 copyrightYear: 2019
# 实例演示开关 # 实例演示开关
@ -87,9 +87,9 @@ token:
# MyBatis配置 # MyBatis配置
mybatis: mybatis:
# 搜索指定包别名 # 搜索指定包别名
typeAliasesPackage: com.ruoyi.project.**.domain typeAliasesPackage: com.ruoyi.**.domain
# 配置mapper的扫描,找到所有的mapper.xml映射文件 # 配置mapper的扫描,找到所有的mapper.xml映射文件
mapperLocations: classpath*:mybatis/**/*Mapper.xml mapperLocations: classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件 # 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml configLocation: classpath:mybatis/mybatis-config.xml
@ -115,14 +115,3 @@ xss:
excludes: /system/notice/* excludes: /system/notice/*
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: /system/*,/monitor/*,/tool/*
# 代码生成
gen:
# 作者
author: ruoyi
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.ruoyi.project.system
# 自动去除表前缀,默认是true
autoRemovePre: false
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
tablePrefix: sys_

@ -0,0 +1,124 @@
<?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>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ruoyi-common</artifactId>
<description>
common通用工具
</description>
<dependencies>
<!-- Spring框架基本的核心工具 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<!-- SpringWeb模块 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<!-- spring security 安全认证 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
</dependency>
<!-- 自定义验证注解 -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<!--常用工具类 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!-- JSON工具类 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- 阿里JSON解析器 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<!-- 文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<!-- yml解析器 -->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
<!--Token生成与解析-->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
</dependency>
<!-- redis 缓存操作 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- pool 对象池 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<!-- 解析客户端操作系统、浏览器等 -->
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
</dependency>
<!-- servlet包 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
</dependencies>
</project>

@ -1,4 +1,4 @@
package com.ruoyi.framework.aspectj.lang.annotation; package com.ruoyi.common.annotation;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;

@ -1,4 +1,4 @@
package com.ruoyi.framework.aspectj.lang.annotation; package com.ruoyi.common.annotation;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
@ -6,7 +6,7 @@ import java.lang.annotation.Inherited;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType; import com.ruoyi.common.enums.DataSourceType;
/** /**
* 自定义多数据源切换注解 * 自定义多数据源切换注解

@ -1,118 +1,118 @@
package com.ruoyi.framework.aspectj.lang.annotation; package com.ruoyi.common.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
/** /**
* 自定义导出Excel数据注解 * 自定义导出Excel数据注解
* *
* @author ruoyi * @author ruoyi
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD) @Target(ElementType.FIELD)
public @interface Excel public @interface Excel
{ {
/** /**
* 导出时在excel中排序 * 导出时在excel中排序
*/ */
public int sort() default Integer.MAX_VALUE; public int sort() default Integer.MAX_VALUE;
/** /**
* 导出到Excel中的名字. * 导出到Excel中的名字.
*/ */
public String name() default ""; public String name() default "";
/** /**
* 日期格式, : yyyy-MM-dd * 日期格式, : yyyy-MM-dd
*/ */
public String dateFormat() default ""; public String dateFormat() default "";
/** /**
* 读取内容转表达式 (: 0=,1=,2=未知) * 读取内容转表达式 (: 0=,1=,2=未知)
*/ */
public String readConverterExp() default ""; public String readConverterExp() default "";
/** /**
* 导出类型0数字 1字符串 * 导出类型0数字 1字符串
*/ */
public ColumnType cellType() default ColumnType.STRING; public ColumnType cellType() default ColumnType.STRING;
/** /**
* 导出时在excel中每个列的高度 单位为字符 * 导出时在excel中每个列的高度 单位为字符
*/ */
public double height() default 14; public double height() default 14;
/** /**
* 导出时在excel中每个列的宽 单位为字符 * 导出时在excel中每个列的宽 单位为字符
*/ */
public double width() default 16; public double width() default 16;
/** /**
* 文字后缀,% 90 变成90% * 文字后缀,% 90 变成90%
*/ */
public String suffix() default ""; public String suffix() default "";
/** /**
* 当值为空时,字段的默认值 * 当值为空时,字段的默认值
*/ */
public String defaultValue() default ""; public String defaultValue() default "";
/** /**
* 提示信息 * 提示信息
*/ */
public String prompt() default ""; public String prompt() default "";
/** /**
* 设置只能选择不能输入的列内容. * 设置只能选择不能输入的列内容.
*/ */
public String[] combo() default {}; public String[] combo() default {};
/** /**
* 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写. * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
*/ */
public boolean isExport() default true; public boolean isExport() default true;
/** /**
* 另一个类中的属性名称,支持多级获取,以小数点隔开 * 另一个类中的属性名称,支持多级获取,以小数点隔开
*/ */
public String targetAttr() default ""; public String targetAttr() default "";
/** /**
* 字段类型0导出导入1仅导出2仅导入 * 字段类型0导出导入1仅导出2仅导入
*/ */
Type type() default Type.ALL; Type type() default Type.ALL;
public enum Type public enum Type
{ {
ALL(0), EXPORT(1), IMPORT(2); ALL(0), EXPORT(1), IMPORT(2);
private final int value; private final int value;
Type(int value) Type(int value)
{ {
this.value = value; this.value = value;
} }
public int value() public int value()
{ {
return this.value; return this.value;
} }
} }
public enum ColumnType public enum ColumnType
{ {
NUMERIC(0), STRING(1); NUMERIC(0), STRING(1);
private final int value; private final int value;
ColumnType(int value) ColumnType(int value)
{ {
this.value = value; this.value = value;
} }
public int value() public int value()
{ {
return this.value; return this.value;
} }
} }
} }

@ -1,18 +1,18 @@
package com.ruoyi.framework.aspectj.lang.annotation; package com.ruoyi.common.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
/** /**
* Excel注解集 * Excel注解集
* *
* @author ruoyi * @author ruoyi
*/ */
@Target(ElementType.FIELD) @Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
public @interface Excels public @interface Excels
{ {
Excel[] value(); Excel[] value();
} }

@ -1,12 +1,12 @@
package com.ruoyi.framework.aspectj.lang.annotation; package com.ruoyi.common.annotation;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.aspectj.lang.enums.OperatorType; import com.ruoyi.common.enums.OperatorType;
/** /**
* 自定义操作日志记录注解 * 自定义操作日志记录注解

@ -1,23 +1,23 @@
package com.ruoyi.framework.interceptor.annotation; package com.ruoyi.common.annotation;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited; import java.lang.annotation.Inherited;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
/** /**
* 自定义注解防止表单重复提交 * 自定义注解防止表单重复提交
* *
* @author ruoyi * @author ruoyi
* *
*/ */
@Inherited @Inherited
@Target(ElementType.METHOD) @Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Documented @Documented
public @interface RepeatSubmit public @interface RepeatSubmit
{ {
} }

@ -1,4 +1,4 @@
package com.ruoyi.framework.config; package com.ruoyi.common.config;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -113,4 +113,4 @@ public class RuoYiConfig
{ {
return getProfile() + "/upload"; return getProfile() + "/upload";
} }
} }

@ -1,7 +1,5 @@
package com.ruoyi.common.constant; package com.ruoyi.common.constant;
import io.jsonwebtoken.Claims;
/** /**
* 通用常量信息 * 通用常量信息
* *
@ -92,7 +90,7 @@ public class Constants
/** /**
* 用户名称 * 用户名称
*/ */
public static final String JWT_USERNAME = Claims.SUBJECT; public static final String JWT_USERNAME = "sub";
/** /**
* 用户头像 * 用户头像

@ -1,50 +1,50 @@
package com.ruoyi.common.constant; package com.ruoyi.common.constant;
/** /**
* 任务调度通用常量 * 任务调度通用常量
* *
* @author ruoyi * @author ruoyi
*/ */
public class ScheduleConstants public class ScheduleConstants
{ {
public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME"; public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
/** 执行目标key */ /** 执行目标key */
public static final String TASK_PROPERTIES = "TASK_PROPERTIES"; public static final String TASK_PROPERTIES = "TASK_PROPERTIES";
/** 默认 */ /** 默认 */
public static final String MISFIRE_DEFAULT = "0"; public static final String MISFIRE_DEFAULT = "0";
/** 立即触发执行 */ /** 立即触发执行 */
public static final String MISFIRE_IGNORE_MISFIRES = "1"; public static final String MISFIRE_IGNORE_MISFIRES = "1";
/** 触发一次执行 */ /** 触发一次执行 */
public static final String MISFIRE_FIRE_AND_PROCEED = "2"; public static final String MISFIRE_FIRE_AND_PROCEED = "2";
/** 不触发立即执行 */ /** 不触发立即执行 */
public static final String MISFIRE_DO_NOTHING = "3"; public static final String MISFIRE_DO_NOTHING = "3";
public enum Status public enum Status
{ {
/** /**
* 正常 * 正常
*/ */
NORMAL("0"), NORMAL("0"),
/** /**
* 暂停 * 暂停
*/ */
PAUSE("1"); PAUSE("1");
private String value; private String value;
private Status(String value) private Status(String value)
{ {
this.value = value; this.value = value;
} }
public String getValue() public String getValue()
{ {
return value; return value;
} }
} }
} }

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.controller; package com.ruoyi.common.core.controller;
import java.beans.PropertyEditorSupport; import java.beans.PropertyEditorSupport;
import java.util.Date; import java.util.Date;
@ -10,13 +10,13 @@ import org.springframework.web.bind.annotation.InitBinder;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.page.TableSupport;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.sql.SqlUtil; import com.ruoyi.common.utils.sql.SqlUtil;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.PageDomain;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.framework.web.page.TableSupport;
/** /**
* web层通用数据处理 * web层通用数据处理
@ -83,4 +83,12 @@ public class BaseController
{ {
return rows > 0 ? AjaxResult.success() : AjaxResult.error(); return rows > 0 ? AjaxResult.success() : AjaxResult.error();
} }
/**
* 页面跳转
*/
public String redirect(String url)
{
return StringUtils.format("redirect:{}", url);
}
} }

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.domain; package com.ruoyi.common.core.domain;
import java.util.HashMap; import java.util.HashMap;
import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.constant.HttpStatus;

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.domain; package com.ruoyi.common.core.domain;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.domain; package com.ruoyi.common.core.domain;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

@ -1,11 +1,11 @@
package com.ruoyi.framework.web.domain; package com.ruoyi.common.core.domain;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.project.system.domain.SysDept; import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.project.system.domain.SysMenu; import com.ruoyi.common.core.domain.entity.SysMenu;
/** /**
* Treeselect树结构实体类 * Treeselect树结构实体类

@ -1,4 +1,4 @@
package com.ruoyi.project.system.domain; package com.ruoyi.common.core.domain.entity;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -7,7 +7,7 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* 部门表 sys_dept * 部门表 sys_dept

@ -1,13 +1,13 @@
package com.ruoyi.project.system.domain; package com.ruoyi.common.core.domain.entity;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType;
import com.ruoyi.framework.web.domain.BaseEntity;
/** /**
* 字典数据表 sys_dict_data * 字典数据表 sys_dict_data

@ -1,12 +1,12 @@
package com.ruoyi.project.system.domain; package com.ruoyi.common.core.domain.entity;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* 字典类型表 sys_dict_type * 字典类型表 sys_dict_type

@ -1,4 +1,4 @@
package com.ruoyi.project.system.domain; package com.ruoyi.common.core.domain.entity;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -6,7 +6,7 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* 菜单权限表 sys_menu * 菜单权限表 sys_menu

@ -1,12 +1,12 @@
package com.ruoyi.project.system.domain; package com.ruoyi.common.core.domain.entity;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* 角色表 sys_role * 角色表 sys_role

@ -1,4 +1,4 @@
package com.ruoyi.project.system.domain; package com.ruoyi.common.core.domain.entity;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -9,11 +9,11 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.framework.aspectj.lang.annotation.Excel.Type; import com.ruoyi.common.annotation.Excel.Type;
import com.ruoyi.framework.aspectj.lang.annotation.Excels; import com.ruoyi.common.annotation.Excels;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* 用户对象 sys_user * 用户对象 sys_user

@ -1,4 +1,4 @@
package com.ruoyi.framework.security; package com.ruoyi.common.core.domain.model;
/** /**
* 用户登录对象 * 用户登录对象

@ -1,11 +1,11 @@
package com.ruoyi.framework.security; package com.ruoyi.common.core.domain.model;
import java.util.Collection; import java.util.Collection;
import java.util.Set; import java.util.Set;
import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetails;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.project.system.domain.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
/** /**
* 登录用户身份权限 * 登录用户身份权限

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.page; package com.ruoyi.common.core.page;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
@ -11,10 +11,13 @@ public class PageDomain
{ {
/** 当前记录起始索引 */ /** 当前记录起始索引 */
private Integer pageNum; private Integer pageNum;
/** 每页显示记录数 */ /** 每页显示记录数 */
private Integer pageSize; private Integer pageSize;
/** 排序列 */ /** 排序列 */
private String orderByColumn; private String orderByColumn;
/** 排序的方向 "desc" 或者 "asc". */ /** 排序的方向 "desc" 或者 "asc". */
private String isAsc; private String isAsc;

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.page; package com.ruoyi.common.core.page;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
@ -82,4 +82,4 @@ public class TableDataInfo implements Serializable
{ {
this.msg = msg; this.msg = msg;
} }
} }

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.page; package com.ruoyi.common.core.page;
import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.ServletUtils;

@ -1,4 +1,4 @@
package com.ruoyi.framework.redis; package com.ruoyi.common.core.redis;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;

@ -1,4 +1,4 @@
package com.ruoyi.framework.aspectj.lang.enums; package com.ruoyi.common.enums;
/** /**
* 操作状态 * 操作状态

@ -1,4 +1,4 @@
package com.ruoyi.framework.aspectj.lang.enums; package com.ruoyi.common.enums;
/** /**
* 业务操作类型 * 业务操作类型

@ -1,4 +1,4 @@
package com.ruoyi.framework.aspectj.lang.enums; package com.ruoyi.common.enums;
/** /**
* 数据源 * 数据源

@ -1,4 +1,4 @@
package com.ruoyi.framework.aspectj.lang.enums; package com.ruoyi.common.enums;
/** /**
* 操作人类别 * 操作人类别

@ -1,34 +1,34 @@
package com.ruoyi.common.exception.job; package com.ruoyi.common.exception.job;
/** /**
* 计划策略异常 * 计划策略异常
* *
* @author ruoyi * @author ruoyi
*/ */
public class TaskException extends Exception public class TaskException extends Exception
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Code code; private Code code;
public TaskException(String msg, Code code) public TaskException(String msg, Code code)
{ {
this(msg, code, null); this(msg, code, null);
} }
public TaskException(String msg, Code code, Exception nestedEx) public TaskException(String msg, Code code, Exception nestedEx)
{ {
super(msg, nestedEx); super(msg, nestedEx);
this.code = code; this.code = code;
} }
public Code getCode() public Code getCode()
{ {
return code; return code;
} }
public enum Code public enum Code
{ {
TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE
} }
} }

@ -1,52 +1,52 @@
package com.ruoyi.common.filter; package com.ruoyi.common.filter;
import java.io.IOException; import java.io.IOException;
import javax.servlet.Filter; import javax.servlet.Filter;
import javax.servlet.FilterChain; import javax.servlet.FilterChain;
import javax.servlet.FilterConfig; import javax.servlet.FilterConfig;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse; import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
/** /**
* Repeatable 过滤器 * Repeatable 过滤器
* *
* @author ruoyi * @author ruoyi
*/ */
public class RepeatableFilter implements Filter public class RepeatableFilter implements Filter
{ {
@Override @Override
public void init(FilterConfig filterConfig) throws ServletException public void init(FilterConfig filterConfig) throws ServletException
{ {
} }
@Override @Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException throws IOException, ServletException
{ {
ServletRequest requestWrapper = null; ServletRequest requestWrapper = null;
if (request instanceof HttpServletRequest && StringUtils.equalsAnyIgnoreCase(request.getContentType(), if (request instanceof HttpServletRequest && StringUtils.equalsAnyIgnoreCase(request.getContentType(),
MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_JSON_UTF8_VALUE)) MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_JSON_UTF8_VALUE))
{ {
requestWrapper = new RepeatedlyRequestWrapper((HttpServletRequest) request, response); requestWrapper = new RepeatedlyRequestWrapper((HttpServletRequest) request, response);
} }
if (null == requestWrapper) if (null == requestWrapper)
{ {
chain.doFilter(request, response); chain.doFilter(request, response);
} }
else else
{ {
chain.doFilter(requestWrapper, response); chain.doFilter(requestWrapper, response);
} }
} }
@Override @Override
public void destroy() public void destroy()
{ {
} }
} }

@ -1,72 +1,72 @@
package com.ruoyi.common.filter; package com.ruoyi.common.filter;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import javax.servlet.ReadListener; import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream; import javax.servlet.ServletInputStream;
import javax.servlet.ServletResponse; import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletRequestWrapper;
import com.ruoyi.common.utils.http.HttpHelper; import com.ruoyi.common.utils.http.HttpHelper;
/** /**
* 构建可重复读取inputStream的request * 构建可重复读取inputStream的request
* *
* @author ruoyi * @author ruoyi
*/ */
public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper
{ {
private final byte[] body; private final byte[] body;
public RepeatedlyRequestWrapper(HttpServletRequest request, ServletResponse response) throws IOException public RepeatedlyRequestWrapper(HttpServletRequest request, ServletResponse response) throws IOException
{ {
super(request); super(request);
request.setCharacterEncoding("UTF-8"); request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
body = HttpHelper.getBodyString(request).getBytes("UTF-8"); body = HttpHelper.getBodyString(request).getBytes("UTF-8");
} }
@Override @Override
public BufferedReader getReader() throws IOException public BufferedReader getReader() throws IOException
{ {
return new BufferedReader(new InputStreamReader(getInputStream())); return new BufferedReader(new InputStreamReader(getInputStream()));
} }
@Override @Override
public ServletInputStream getInputStream() throws IOException public ServletInputStream getInputStream() throws IOException
{ {
final ByteArrayInputStream bais = new ByteArrayInputStream(body); final ByteArrayInputStream bais = new ByteArrayInputStream(body);
return new ServletInputStream() return new ServletInputStream()
{ {
@Override @Override
public int read() throws IOException public int read() throws IOException
{ {
return bais.read(); return bais.read();
} }
@Override @Override
public boolean isFinished() public boolean isFinished()
{ {
return false; return false;
} }
@Override @Override
public boolean isReady() public boolean isReady()
{ {
return false; return false;
} }
@Override @Override
public void setReadListener(ReadListener readListener) public void setReadListener(ReadListener readListener)
{ {
} }
}; };
} }
} }

@ -2,10 +2,11 @@ package com.ruoyi.common.utils;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.framework.redis.RedisCache;
import com.ruoyi.project.system.domain.SysDictData;
/** /**
* 字典工具类 * 字典工具类

@ -1,40 +1,40 @@
package com.ruoyi.common.utils; package com.ruoyi.common.utils;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.commons.lang3.exception.ExceptionUtils;
/** /**
* 错误信息处理类 * 错误信息处理类
* *
* @author ruoyi * @author ruoyi
*/ */
public class ExceptionUtil public class ExceptionUtil
{ {
/** /**
* 获取exception的详细错误信息 * 获取exception的详细错误信息
*/ */
public static String getExceptionMessage(Throwable e) public static String getExceptionMessage(Throwable e)
{ {
StringWriter sw = new StringWriter(); StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw, true)); e.printStackTrace(new PrintWriter(sw, true));
String str = sw.toString(); String str = sw.toString();
return str; return str;
} }
public static String getRootErrorMseeage(Exception e) public static String getRootErrorMseeage(Exception e)
{ {
Throwable root = ExceptionUtils.getRootCause(e); Throwable root = ExceptionUtils.getRootCause(e);
root = (root == null ? e : root); root = (root == null ? e : root);
if (root == null) if (root == null)
{ {
return ""; return "";
} }
String msg = root.getMessage(); String msg = root.getMessage();
if (msg == null) if (msg == null)
{ {
return "null"; return "null";
} }
return StringUtils.defaultString(msg); return StringUtils.defaultString(msg);
} }
} }

@ -4,8 +4,8 @@ import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.CustomException;
import com.ruoyi.framework.security.LoginUser;
/** /**
* 安全服务工具类 * 安全服务工具类

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

Loading…
Cancel
Save