Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaru
fgqyxxlr
Commits
95318754
Commit
95318754
authored
Mar 08, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整部分包路径
parent
1b193bcc
Hide whitespace changes
Inline
Side-by-side
Showing
78 changed files
with
815 additions
and
702 deletions
+815
-702
pom.xml
+157
-35
ruoyi-admin/pom.xml
+18
-4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
+2
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/DruidController.java
+1
-1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java
+1
-1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java
+2
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java
+2
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java
+2
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysCaptchaController.java
+1
-1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
+2
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
+3
-3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
+2
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
+2
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java
+3
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
+2
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
+3
-3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
+2
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
+2
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
+13
-13
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
+2
-2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
+3
-3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/BuildController.java
+1
-1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java
+1
-1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java
+2
-5
ruoyi-admin/src/main/resources/application.yml
+1
-13
ruoyi-common/pom.xml
+25
-11
ruoyi-common/src/main/java/com/ruoyi/common/config/Global.java
+0
-32
ruoyi-common/src/main/java/com/ruoyi/common/config/ServerConfig.java
+33
-34
ruoyi-common/src/main/java/com/ruoyi/common/config/datasource/DynamicDataSourceContextHolder.java
+1
-1
ruoyi-common/src/main/java/com/ruoyi/common/config/thread/ThreadPoolConfig.java
+53
-53
ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java
+5
-0
ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java
+171
-161
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
+1
-1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
+1
-1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/Ztree.java
+104
-104
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
+1
-1
ruoyi-framework/pom.xml
+1
-43
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
+1
-1
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataSourceAspect.java
+1
-1
ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSource.java
+1
-0
ruoyi-framework/src/main/java/com/ruoyi/framework/util/ShiroUtils.java
+1
-0
ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java
+1
-1
ruoyi-generator/pom.xml
+9
-7
ruoyi-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java
+8
-1
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java
+2
-2
ruoyi-generator/src/main/java/com/ruoyi/generator/domain/TableInfo.java
+1
-1
ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenServiceImpl.java
+2
-2
ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java
+6
-6
ruoyi-generator/src/main/resources/generator.yml
+12
-0
ruoyi-generator/src/main/resources/templates/tool/gen/gen.html
+0
-0
ruoyi-quartz/pom.xml
+10
-4
ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java
+0
-1
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java
+10
-10
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java
+3
-3
ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java
+1
-1
ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJobLog.java
+1
-1
ruoyi-quartz/src/main/resources/templates/monitor/job/add.html
+0
-0
ruoyi-quartz/src/main/resources/templates/monitor/job/detail.html
+94
-93
ruoyi-quartz/src/main/resources/templates/monitor/job/edit.html
+0
-0
ruoyi-quartz/src/main/resources/templates/monitor/job/job.html
+0
-0
ruoyi-quartz/src/main/resources/templates/monitor/job/jobLog.html
+0
-0
ruoyi-system/pom.xml
+9
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserOnline.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
+1
-1
No files found.
pom.xml
View file @
95318754
...
...
@@ -26,10 +26,18 @@
<swagger.version>
2.7.0
</swagger.version>
<pagehelper.boot.version>
1.2.5
</pagehelper.boot.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>
<jsoup.version>
1.11.3
</jsoup.version>
<poi.version>
3.17
</poi.version>
<velocity.version>
1.7
</velocity.version>
</properties>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
<!-- SpringBoot的依赖配置-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-dependencies
</artifactId>
...
...
@@ -37,6 +45,154 @@
<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>
<artifactId>
kaptcha
</artifactId>
<version>
${kaptcha.version}
</version>
</dependency>
<!--Shiro核心框架 -->
<dependency>
<groupId>
org.apache.shiro
</groupId>
<artifactId>
shiro-core
</artifactId>
<version>
${shiro.version}
</version>
</dependency>
<!-- Shiro使用Srping框架 -->
<dependency>
<groupId>
org.apache.shiro
</groupId>
<artifactId>
shiro-spring
</artifactId>
<version>
${shiro.version}
</version>
</dependency>
<!-- Shiro使用EhCache缓存框架 -->
<dependency>
<groupId>
org.apache.shiro
</groupId>
<artifactId>
shiro-ehcache
</artifactId>
<version>
${shiro.version}
</version>
</dependency>
<!-- thymeleaf模板引擎和shiro框架的整合 -->
<dependency>
<groupId>
com.github.theborakompanioni
</groupId>
<artifactId>
thymeleaf-extras-shiro
</artifactId>
<version>
${thymeleaf.extras.shiro.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>
</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>
<!-- HTML解析器 -->
<dependency>
<groupId>
org.jsoup
</groupId>
<artifactId>
jsoup
</artifactId>
<version>
${jsoup.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>
<!-- 定时任务-->
<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>
...
...
@@ -53,41 +209,7 @@
<dependencies>
<!-- Spring框架基本的核心工具 -->
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-context-support
</artifactId>
</dependency>
<!-- SpringWeb模块 -->
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-web
</artifactId>
</dependency>
<!-- SpringBoot集成mybatis框架 -->
<dependency>
<groupId>
org.mybatis.spring.boot
</groupId>
<artifactId>
mybatis-spring-boot-starter
</artifactId>
<version>
${mybatis.boot.version}
</version>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
</dependency>
<!-- 日志工具类 -->
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
</dependency>
</dependencies>
...
...
ruoyi-admin/pom.xml
View file @
95318754
...
...
@@ -15,8 +15,13 @@
web服务入口
</description>
<dependencies>
<!-- SpringBoot集成thymeleaf模板 -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-thymeleaf
</artifactId>
</dependency>
<!-- spring-boot-devtools -->
<dependency>
...
...
@@ -29,21 +34,30 @@
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
<!-- swagger2-UI-->
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
<!-- 核心模块-->
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-framework
</artifactId>
<version>
${ruoyi.version}
</version>
</dependency>
<!-- 定时任务-->
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-quartz
</artifactId>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-generator
</artifactId>
</dependency>
</dependencies>
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
View file @
95318754
...
...
@@ -12,12 +12,12 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.config.Global
;
import
com.ruoyi.common.config.ServerConfig
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.file.FileUploadUtils
;
import
com.ruoyi.common.utils.file.FileUtils
;
import
com.ruoyi.framework.config.ServerConfig
;
/**
* 通用请求处理
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/DruidController.java
View file @
95318754
...
...
@@ -4,7 +4,7 @@ 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.ruoyi.
framework.web.base
.BaseController
;
import
com.ruoyi.
common.core.controller
.BaseController
;
/**
* druid 监控
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java
View file @
95318754
...
...
@@ -5,7 +5,7 @@ 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.ruoyi.
framework.web.base
.BaseController
;
import
com.ruoyi.
common.core.controller
.BaseController
;
import
com.ruoyi.framework.web.domain.Server
;
/**
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java
View file @
95318754
...
...
@@ -9,13 +9,13 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.system.domain.SysLogininfor
;
import
com.ruoyi.system.service.ISysLogininforService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 系统访问记录
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java
View file @
95318754
...
...
@@ -11,13 +11,13 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.system.domain.SysOperLog
;
import
com.ruoyi.system.service.ISysOperLogService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 操作日志记录
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java
View file @
95318754
...
...
@@ -10,7 +10,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.enums.OnlineStatus
;
import
com.ruoyi.common.page.TableDataInfo
;
...
...
@@ -19,7 +20,6 @@ import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.system.domain.SysUserOnline
;
import
com.ruoyi.system.service.ISysUserOnlineService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 在线用户监控
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysCaptchaController.java
View file @
95318754
...
...
@@ -14,7 +14,7 @@ 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.ruoyi.
framework.web.base
.BaseController
;
import
com.ruoyi.
common.core.controller
.BaseController
;
/**
* 图片验证码(支持算术形式)
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
View file @
95318754
...
...
@@ -11,14 +11,14 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.system.domain.SysConfig
;
import
com.ruoyi.system.service.ISysConfigService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 参数配置 信息操作处理
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
View file @
95318754
...
...
@@ -11,12 +11,12 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.base.Ztree
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.core.domain.Ztree
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.framework.web.base.BaseController
;
import
com.ruoyi.system.domain.SysDept
;
import
com.ruoyi.system.domain.SysRole
;
import
com.ruoyi.system.service.ISysDeptService
;
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
View file @
95318754
...
...
@@ -11,14 +11,14 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.system.domain.SysDictData
;
import
com.ruoyi.system.service.ISysDictDataService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 数据字典信息
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
View file @
95318754
...
...
@@ -11,14 +11,14 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.system.domain.SysDictType
;
import
com.ruoyi.system.service.ISysDictTypeService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 数据字典信息
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java
View file @
95318754
...
...
@@ -6,10 +6,11 @@ import org.springframework.stereotype.Controller;
import
org.springframework.ui.ModelMap
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
com.ruoyi.common.config.Global
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.system.domain.SysMenu
;
import
com.ruoyi.system.domain.SysUser
;
import
com.ruoyi.system.service.ISysMenuService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 首页 业务处理
...
...
@@ -27,7 +28,7 @@ public class SysIndexController extends BaseController
public
String
index
(
ModelMap
mmap
)
{
// 取身份信息
SysUser
user
=
getSysUser
();
SysUser
user
=
ShiroUtils
.
getSysUser
();
// 根据用户id取出菜单
List
<
SysMenu
>
menus
=
menuService
.
selectMenusByUser
(
user
);
mmap
.
put
(
"menus"
,
menus
);
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
View file @
95318754
...
...
@@ -10,10 +10,10 @@ 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.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.utils.ServletUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 登录验证
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
View file @
95318754
...
...
@@ -11,11 +11,11 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.base.Ztree
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.core.domain.Ztree
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.framework.web.base.BaseController
;
import
com.ruoyi.system.domain.SysMenu
;
import
com.ruoyi.system.domain.SysRole
;
import
com.ruoyi.system.service.ISysMenuService
;
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
View file @
95318754
...
...
@@ -11,13 +11,13 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.system.domain.SysNotice
;
import
com.ruoyi.system.service.ISysNoticeService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 公告 信息操作处理
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
View file @
95318754
...
...
@@ -11,14 +11,14 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.system.domain.SysPost
;
import
com.ruoyi.system.service.ISysPostService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 岗位信息操作处理
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
View file @
95318754
...
...
@@ -12,8 +12,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.config.Global
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.file.FileUploadUtils
;
...
...
@@ -22,7 +23,6 @@ import com.ruoyi.framework.util.ShiroUtils;
import
com.ruoyi.system.domain.SysUser
;
import
com.ruoyi.system.service.ISysDictDataService
;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 个人信息 业务处理
...
...
@@ -52,7 +52,7 @@ public class SysProfileController extends BaseController
@GetMapping
()
public
String
profile
(
ModelMap
mmap
)
{
SysUser
user
=
getSysUser
();
SysUser
user
=
ShiroUtils
.
getSysUser
();
user
.
setSex
(
dictDataService
.
selectDictLabel
(
"sys_user_sex"
,
user
.
getSex
()));
mmap
.
put
(
"user"
,
user
);
mmap
.
put
(
"roleGroup"
,
userService
.
selectUserRoleGroup
(
user
.
getUserId
()));
...
...
@@ -64,7 +64,7 @@ public class SysProfileController extends BaseController
@ResponseBody
public
boolean
checkPassword
(
String
password
)
{
SysUser
user
=
getSysUser
();
SysUser
user
=
ShiroUtils
.
getSysUser
();
if
(
passwordService
.
matches
(
user
,
password
))
{
return
true
;
...
...
@@ -75,7 +75,7 @@ public class SysProfileController extends BaseController
@GetMapping
(
"/resetPwd"
)
public
String
resetPwd
(
ModelMap
mmap
)
{
SysUser
user
=
getSysUser
();
SysUser
user
=
ShiroUtils
.
getSysUser
();
mmap
.
put
(
"user"
,
userService
.
selectUserById
(
user
.
getUserId
()));
return
prefix
+
"/resetPwd"
;
}
...
...
@@ -85,14 +85,14 @@ public class SysProfileController extends BaseController
@ResponseBody
public
AjaxResult
resetPwd
(
String
oldPassword
,
String
newPassword
)
{
SysUser
user
=
getSysUser
();
SysUser
user
=
ShiroUtils
.
getSysUser
();
if
(
StringUtils
.
isNotEmpty
(
newPassword
)
&&
passwordService
.
matches
(
user
,
oldPassword
))
{
user
.
setSalt
(
ShiroUtils
.
randomSalt
());
user
.
setPassword
(
passwordService
.
encryptPassword
(
user
.
getLoginName
(),
newPassword
,
user
.
getSalt
()));
if
(
userService
.
resetUserPwd
(
user
)
>
0
)
{
setSysUser
(
userService
.
selectUserById
(
user
.
getUserId
()));
ShiroUtils
.
setSysUser
(
userService
.
selectUserById
(
user
.
getUserId
()));
return
success
();
}
return
error
();
...
...
@@ -109,7 +109,7 @@ public class SysProfileController extends BaseController
@GetMapping
(
"/edit"
)
public
String
edit
(
ModelMap
mmap
)
{
SysUser
user
=
getSysUser
();
SysUser
user
=
ShiroUtils
.
getSysUser
();
mmap
.
put
(
"user"
,
userService
.
selectUserById
(
user
.
getUserId
()));
return
prefix
+
"/edit"
;
}
...
...
@@ -120,7 +120,7 @@ public class SysProfileController extends BaseController
@GetMapping
(
"/avatar"
)
public
String
avatar
(
ModelMap
mmap
)
{
SysUser
user
=
getSysUser
();
SysUser
user
=
ShiroUtils
.
getSysUser
();
mmap
.
put
(
"user"
,
userService
.
selectUserById
(
user
.
getUserId
()));
return
prefix
+
"/avatar"
;
}
...
...
@@ -133,14 +133,14 @@ public class SysProfileController extends BaseController
@ResponseBody
public
AjaxResult
update
(
SysUser
user
)
{
SysUser
currentUser
=
getSysUser
();
SysUser
currentUser
=
ShiroUtils
.
getSysUser
();
currentUser
.
setUserName
(
user
.
getUserName
());
currentUser
.
setEmail
(
user
.
getEmail
());
currentUser
.
setPhonenumber
(
user
.
getPhonenumber
());
currentUser
.
setSex
(
user
.
getSex
());
if
(
userService
.
updateUserInfo
(
currentUser
)
>
0
)
{
setSysUser
(
userService
.
selectUserById
(
currentUser
.
getUserId
()));
ShiroUtils
.
setSysUser
(
userService
.
selectUserById
(
currentUser
.
getUserId
()));
return
success
();
}
return
error
();
...
...
@@ -154,7 +154,7 @@ public class SysProfileController extends BaseController
@ResponseBody
public
AjaxResult
updateAvatar
(
@RequestParam
(
"avatarfile"
)
MultipartFile
file
)
{
SysUser
currentUser
=
getSysUser
();
SysUser
currentUser
=
ShiroUtils
.
getSysUser
();
try
{
if
(!
file
.
isEmpty
())
...
...
@@ -163,7 +163,7 @@ public class SysProfileController extends BaseController
currentUser
.
setAvatar
(
avatar
);
if
(
userService
.
updateUserInfo
(
currentUser
)
>
0
)
{
setSysUser
(
userService
.
selectUserById
(
currentUser
.
getUserId
()));
ShiroUtils
.
setSysUser
(
userService
.
selectUserById
(
currentUser
.
getUserId
()));
return
success
();
}
}
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
View file @
95318754
...
...
@@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.system.domain.SysRole
;
import
com.ruoyi.system.service.ISysRoleService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 角色信息
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
View file @
95318754
...
...
@@ -13,14 +13,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.shiro.service.SysPasswordService
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.framework.web.base.BaseController
;
import
com.ruoyi.system.domain.SysUser
;
import
com.ruoyi.system.service.ISysPostService
;
import
com.ruoyi.system.service.ISysRoleService
;
...
...
@@ -85,7 +85,7 @@ public class SysUserController extends BaseController
{
ExcelUtil
<
SysUser
>
util
=
new
ExcelUtil
<
SysUser
>(
SysUser
.
class
);
List
<
SysUser
>
userList
=
util
.
importExcel
(
file
.
getInputStream
());
String
operName
=
getSysUser
().
getLoginName
();
String
operName
=
ShiroUtils
.
getSysUser
().
getLoginName
();
String
message
=
userService
.
importUser
(
userList
,
updateSupport
,
operName
);
return
AjaxResult
.
success
(
message
);
}
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/BuildController.java
View file @
95318754
...
...
@@ -4,7 +4,7 @@ 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.ruoyi.
framework.web.base
.BaseController
;
import
com.ruoyi.
common.core.controller
.BaseController
;
/**
* build 表单构建
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java
View file @
95318754
...
...
@@ -4,7 +4,7 @@ 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.ruoyi.
framework.web.base
.BaseController
;
import
com.ruoyi.
common.core.controller
.BaseController
;
/**
* swagger 接口
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java
View file @
95318754
...
...
@@ -2,17 +2,14 @@ package com.ruoyi.web.controller.tool;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.framework.web.base.BaseController
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
...
...
ruoyi-admin/src/main/resources/application.yml
View file @
95318754
...
...
@@ -6,7 +6,7 @@ ruoyi:
version
:
3.2.0
# 版权年份
copyrightYear
:
2019
# 文件上传
路径
# 文件上传
profile
:
D:/profile/
# 获取ip地址开关
addressEnabled
:
true
...
...
@@ -121,14 +121,3 @@ xss:
excludes
:
/system/notice/*
# 匹配链接
urlPatterns
:
/system/*,/monitor/*,/tool/*
# 代码生成
gen
:
# 作者
author
:
ruoyi
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName
:
com.ruoyi.system
# 自动去除表前缀,默认是true
autoRemovePre
:
true
# 表前缀(类名不会包含表前缀)
tablePrefix
:
sys_
\ No newline at end of file
ruoyi-common/pom.xml
View file @
95318754
...
...
@@ -15,14 +15,25 @@
common通用工具
</description>
<properties>
<commons.io.version>
2.5
</commons.io.version>
<commons.fileupload.version>
1.3.3
</commons.fileupload.version>
<jsoup.version>
1.11.3
</jsoup.version>
<poi.version>
3.17
</poi.version>
</properties>
<dependencies>
<!-- Spring框架基本的核心工具 -->
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-context-support
</artifactId>
</dependency>
<!-- SpringWeb模块 -->
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-web
</artifactId>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
</dependency>
<!--常用工具类 -->
<dependency>
...
...
@@ -40,28 +51,24 @@
<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>
<!-- HTML解析器 -->
<dependency>
<groupId>
org.jsoup
</groupId>
<artifactId>
jsoup
</artifactId>
<version>
${jsoup.version}
</version>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
${poi.version}
</version>
</dependency>
<!-- yml解析器 -->
...
...
@@ -70,6 +77,12 @@
<artifactId>
snakeyaml
</artifactId>
</dependency>
<!-- servlet包 -->
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
ruoyi-common/src/main/java/com/ruoyi/common/config/Global.java
View file @
95318754
...
...
@@ -136,36 +136,4 @@ public class Global
{
return
getConfig
(
"ruoyi.profile"
)
+
"upload/"
;
}
/**
* 获取作者
*/
public
static
String
getAuthor
()
{
return
StringUtils
.
nvl
(
getConfig
(
"gen.author"
),
"ruoyi"
);
}
/**
* 生成包路径
*/
public
static
String
getPackageName
()
{
return
StringUtils
.
nvl
(
getConfig
(
"gen.packageName"
),
"com.ruoyi.project.module"
);
}
/**
* 是否自动去除表前缀
*/
public
static
String
getAutoRemovePre
()
{
return
StringUtils
.
nvl
(
getConfig
(
"gen.autoRemovePre"
),
"true"
);
}
/**
* 表前缀(类名不会包含表前缀)
*/
public
static
String
getTablePrefix
()
{
return
StringUtils
.
nvl
(
getConfig
(
"gen.tablePrefix"
),
"sys_"
);
}
}
ruoyi-
framework/src/main/java/com/ruoyi/framework
/config/ServerConfig.java
→
ruoyi-
common/src/main/java/com/ruoyi/common
/config/ServerConfig.java
View file @
95318754
package
com
.
ruoyi
.
framework
.
config
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.stereotype.Component
;
import
com.ruoyi.common.utils.ServletUtils
;
/**
* 服务相关配置
*
* @author ruoyi
*
*/
@Component
public
class
ServerConfig
{
/**
* 获取完整的请求路径,包括:域名,端口,上下文访问路径
*
* @return 服务地址
*/
public
String
getUrl
()
{
HttpServletRequest
request
=
ServletUtils
.
getRequest
();
return
getDomain
(
request
);
}
public
static
String
getDomain
(
HttpServletRequest
request
)
{
StringBuffer
url
=
request
.
getRequestURL
();
String
contextPath
=
request
.
getServletContext
().
getContextPath
();
return
url
.
delete
(
url
.
length
()
-
request
.
getRequestURI
().
length
(),
url
.
length
()).
append
(
contextPath
).
toString
();
}
}
package
com
.
ruoyi
.
common
.
config
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.stereotype.Component
;
import
com.ruoyi.common.utils.ServletUtils
;
/**
* 服务相关配置
*
* @author ruoyi
*
*/
@Component
public
class
ServerConfig
{
/**
* 获取完整的请求路径,包括:域名,端口,上下文访问路径
*
* @return 服务地址
*/
public
String
getUrl
()
{
HttpServletRequest
request
=
ServletUtils
.
getRequest
();
return
getDomain
(
request
);
}
public
static
String
getDomain
(
HttpServletRequest
request
)
{
StringBuffer
url
=
request
.
getRequestURL
();
String
contextPath
=
request
.
getServletContext
().
getContextPath
();
return
url
.
delete
(
url
.
length
()
-
request
.
getRequestURI
().
length
(),
url
.
length
()).
append
(
contextPath
).
toString
();
}
}
ruoyi-
framework/src/main/java/com/ruoyi/framework
/datasource/DynamicDataSourceContextHolder.java
→
ruoyi-
common/src/main/java/com/ruoyi/common/config
/datasource/DynamicDataSourceContextHolder.java
View file @
95318754
package
com
.
ruoyi
.
framework
.
datasource
;
package
com
.
ruoyi
.
common
.
config
.
datasource
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
ruoyi-
framework/src/main/java/com/ruoyi/framework/config
/ThreadPoolConfig.java
→
ruoyi-
common/src/main/java/com/ruoyi/common/config/thread
/ThreadPoolConfig.java
View file @
95318754
package
com
.
ruoyi
.
framework
.
config
;
import
java.util.concurrent.ScheduledExecutorService
;
import
java.util.concurrent.ScheduledThreadPoolExecutor
;
import
java.util.concurrent.ThreadPoolExecutor
;
import
org.apache.commons.lang3.concurrent.BasicThreadFactory
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
/**
* 线程池配置
*
* @author ruoyi
**/
@Configuration
public
class
ThreadPoolConfig
{
// 核心线程池大小
private
int
corePoolSize
=
50
;
// 最大可创建的线程数
private
int
maxPoolSize
=
200
;
// 队列最大长度
private
int
queueCapacity
=
1000
;
// 线程池维护线程所允许的空闲时间
private
int
keepAliveSeconds
=
300
;
@Bean
(
name
=
"threadPoolTaskExecutor"
)
public
ThreadPoolTaskExecutor
threadPoolTaskExecutor
()
{
ThreadPoolTaskExecutor
executor
=
new
ThreadPoolTaskExecutor
();
executor
.
setMaxPoolSize
(
maxPoolSize
);
executor
.
setCorePoolSize
(
corePoolSize
);
executor
.
setQueueCapacity
(
queueCapacity
);
executor
.
setKeepAliveSeconds
(
keepAliveSeconds
);
// 线程池对拒绝任务(无线程可用)的处理策略
executor
.
setRejectedExecutionHandler
(
new
ThreadPoolExecutor
.
CallerRunsPolicy
());
return
executor
;
}
/**
* 执行周期性或定时任务
*/
@Bean
(
name
=
"scheduledExecutorService"
)
protected
ScheduledExecutorService
scheduledExecutorService
()
{
return
new
ScheduledThreadPoolExecutor
(
corePoolSize
,
new
BasicThreadFactory
.
Builder
().
namingPattern
(
"schedule-pool-%d"
).
daemon
(
true
).
build
());
}
}
package
com
.
ruoyi
.
common
.
config
.
thread
;
import
java.util.concurrent.ScheduledExecutorService
;
import
java.util.concurrent.ScheduledThreadPoolExecutor
;
import
java.util.concurrent.ThreadPoolExecutor
;
import
org.apache.commons.lang3.concurrent.BasicThreadFactory
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
/**
* 线程池配置
*
* @author ruoyi
**/
@Configuration
public
class
ThreadPoolConfig
{
// 核心线程池大小
private
int
corePoolSize
=
50
;
// 最大可创建的线程数
private
int
maxPoolSize
=
200
;
// 队列最大长度
private
int
queueCapacity
=
1000
;
// 线程池维护线程所允许的空闲时间
private
int
keepAliveSeconds
=
300
;
@Bean
(
name
=
"threadPoolTaskExecutor"
)
public
ThreadPoolTaskExecutor
threadPoolTaskExecutor
()
{
ThreadPoolTaskExecutor
executor
=
new
ThreadPoolTaskExecutor
();
executor
.
setMaxPoolSize
(
maxPoolSize
);
executor
.
setCorePoolSize
(
corePoolSize
);
executor
.
setQueueCapacity
(
queueCapacity
);
executor
.
setKeepAliveSeconds
(
keepAliveSeconds
);
// 线程池对拒绝任务(无线程可用)的处理策略
executor
.
setRejectedExecutionHandler
(
new
ThreadPoolExecutor
.
CallerRunsPolicy
());
return
executor
;
}
/**
* 执行周期性或定时任务
*/
@Bean
(
name
=
"scheduledExecutorService"
)
protected
ScheduledExecutorService
scheduledExecutorService
()
{
return
new
ScheduledThreadPoolExecutor
(
corePoolSize
,
new
BasicThreadFactory
.
Builder
().
namingPattern
(
"schedule-pool-%d"
).
daemon
(
true
).
build
());
}
}
ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java
View file @
95318754
...
...
@@ -7,6 +7,11 @@ package com.ruoyi.common.constant;
*/
public
class
UserConstants
{
/**
* 平台内系统用户的唯一标志
*/
public
static
final
String
SYS_USER
=
"SYS_USER"
;
/** 正常状态 */
public
static
final
String
NORMAL
=
"0"
;
...
...
ruoyi-
framework/src/main/java/com/ruoyi/framework/web/base
/BaseController.java
→
ruoyi-
common/src/main/java/com/ruoyi/common/core/controller
/BaseController.java
View file @
95318754
package
com
.
ruoyi
.
framework
.
web
.
base
;
import
java.beans.PropertyEditorSupport
;
import
java.util.Date
;
import
java.util.List
;
import
org.springframework.web.bind.WebDataBinder
;
import
org.springframework.web.bind.annotation.InitBinder
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.page.PageDomain
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.page.TableSupport
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.sql.SqlUtil
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.system.domain.SysUser
;
/**
* web层通用数据处理
*
* @author ruoyi
*/
public
class
BaseController
{
/**
* 将前台传递过来的日期格式的字符串,自动转化为Date类型
*/
@InitBinder
public
void
initBinder
(
WebDataBinder
binder
)
{
// Date 类型转换
binder
.
registerCustomEditor
(
Date
.
class
,
new
PropertyEditorSupport
()
{
@Override
public
void
setAsText
(
String
text
)
{
setValue
(
DateUtils
.
parseDate
(
text
));
}
});
}
/**
* 设置请求分页数据
*/
protected
void
startPage
()
{
PageDomain
pageDomain
=
TableSupport
.
buildPageRequest
();
Integer
pageNum
=
pageDomain
.
getPageNum
();
Integer
pageSize
=
pageDomain
.
getPageSize
();
if
(
StringUtils
.
isNotNull
(
pageNum
)
&&
StringUtils
.
isNotNull
(
pageSize
))
{
String
orderBy
=
SqlUtil
.
escapeOrderBySql
(
pageDomain
.
getOrderBy
());
PageHelper
.
startPage
(
pageNum
,
pageSize
,
orderBy
);
}
}
/**
* 响应请求分页数据
*/
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
protected
TableDataInfo
getDataTable
(
List
<?>
list
)
{
TableDataInfo
rspData
=
new
TableDataInfo
();
rspData
.
setCode
(
0
);
rspData
.
setRows
(
list
);
rspData
.
setTotal
(
new
PageInfo
(
list
).
getTotal
());
return
rspData
;
}
/**
* 响应返回结果
*
* @param rows 影响行数
* @return 操作结果
*/
protected
AjaxResult
toAjax
(
int
rows
)
{
return
rows
>
0
?
success
()
:
error
();
}
/**
* 响应返回结果
*
* @param result 结果
* @return 操作结果
*/
protected
AjaxResult
toAjax
(
boolean
result
)
{
return
result
?
success
()
:
error
();
}
/**
* 返回成功
*/
public
AjaxResult
success
()
{
return
AjaxResult
.
success
();
}
/**
* 返回失败消息
*/
public
AjaxResult
error
()
{
return
AjaxResult
.
error
();
}
/**
* 返回成功消息
*/
public
AjaxResult
success
(
String
message
)
{
return
AjaxResult
.
success
(
message
);
}
/**
* 返回失败消息
*/
public
AjaxResult
error
(
String
message
)
{
return
AjaxResult
.
error
(
message
);
}
/**
* 返回错误码消息
*/
public
AjaxResult
error
(
int
code
,
String
message
)
{
return
AjaxResult
.
error
(
code
,
message
);
}
/**
* 页面跳转
*/
public
String
redirect
(
String
url
)
{
return
StringUtils
.
format
(
"redirect:{}"
,
url
);
}
public
SysUser
getSysUser
()
{
return
ShiroUtils
.
getSysUser
();
}
public
void
setSysUser
(
SysUser
user
)
{
ShiroUtils
.
setSysUser
(
user
);
}
public
Long
getUserId
()
{
return
getSysUser
().
getUserId
();
}
public
String
getLoginName
()
{
return
getSysUser
().
getLoginName
();
}
}
package
com
.
ruoyi
.
common
.
core
.
controller
;
import
java.beans.PropertyEditorSupport
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpSession
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.bind.WebDataBinder
;
import
org.springframework.web.bind.annotation.InitBinder
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.page.PageDomain
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.page.TableSupport
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.ServletUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.sql.SqlUtil
;
/**
* web层通用数据处理
*
* @author ruoyi
*/
public
class
BaseController
{
protected
final
Logger
logger
=
LoggerFactory
.
getLogger
(
BaseController
.
class
);
/**
* 将前台传递过来的日期格式的字符串,自动转化为Date类型
*/
@InitBinder
public
void
initBinder
(
WebDataBinder
binder
)
{
// Date 类型转换
binder
.
registerCustomEditor
(
Date
.
class
,
new
PropertyEditorSupport
()
{
@Override
public
void
setAsText
(
String
text
)
{
setValue
(
DateUtils
.
parseDate
(
text
));
}
});
}
/**
* 设置请求分页数据
*/
protected
void
startPage
()
{
PageDomain
pageDomain
=
TableSupport
.
buildPageRequest
();
Integer
pageNum
=
pageDomain
.
getPageNum
();
Integer
pageSize
=
pageDomain
.
getPageSize
();
if
(
StringUtils
.
isNotNull
(
pageNum
)
&&
StringUtils
.
isNotNull
(
pageSize
))
{
String
orderBy
=
SqlUtil
.
escapeOrderBySql
(
pageDomain
.
getOrderBy
());
PageHelper
.
startPage
(
pageNum
,
pageSize
,
orderBy
);
}
}
/**
* 获取request
*/
public
HttpServletRequest
getRequest
()
{
return
ServletUtils
.
getRequest
();
}
/**
* 获取response
*/
public
HttpServletResponse
getResponse
()
{
return
ServletUtils
.
getResponse
();
}
/**
* 获取session
*/
public
HttpSession
getSession
()
{
return
getRequest
().
getSession
();
}
/**
* 响应请求分页数据
*/
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
protected
TableDataInfo
getDataTable
(
List
<?>
list
)
{
TableDataInfo
rspData
=
new
TableDataInfo
();
rspData
.
setCode
(
0
);
rspData
.
setRows
(
list
);
rspData
.
setTotal
(
new
PageInfo
(
list
).
getTotal
());
return
rspData
;
}
/**
* 响应返回结果
*
* @param rows 影响行数
* @return 操作结果
*/
protected
AjaxResult
toAjax
(
int
rows
)
{
return
rows
>
0
?
success
()
:
error
();
}
/**
* 响应返回结果
*
* @param result 结果
* @return 操作结果
*/
protected
AjaxResult
toAjax
(
boolean
result
)
{
return
result
?
success
()
:
error
();
}
/**
* 返回成功
*/
public
AjaxResult
success
()
{
return
AjaxResult
.
success
();
}
/**
* 返回失败消息
*/
public
AjaxResult
error
()
{
return
AjaxResult
.
error
();
}
/**
* 返回成功消息
*/
public
AjaxResult
success
(
String
message
)
{
return
AjaxResult
.
success
(
message
);
}
/**
* 返回失败消息
*/
public
AjaxResult
error
(
String
message
)
{
return
AjaxResult
.
error
(
message
);
}
/**
* 返回错误码消息
*/
public
AjaxResult
error
(
int
code
,
String
message
)
{
return
AjaxResult
.
error
(
code
,
message
);
}
/**
* 页面跳转
*/
public
String
redirect
(
String
url
)
{
return
StringUtils
.
format
(
"redirect:{}"
,
url
);
}
}
ruoyi-common/src/main/java/com/ruoyi/common/
base
/AjaxResult.java
→
ruoyi-common/src/main/java/com/ruoyi/common/
core/domain
/AjaxResult.java
View file @
95318754
package
com
.
ruoyi
.
common
.
base
;
package
com
.
ruoyi
.
common
.
core
.
domain
;
import
java.util.HashMap
;
...
...
ruoyi-common/src/main/java/com/ruoyi/common/
base
/BaseEntity.java
→
ruoyi-common/src/main/java/com/ruoyi/common/
core/domain
/BaseEntity.java
View file @
95318754
package
com
.
ruoyi
.
common
.
base
;
package
com
.
ruoyi
.
common
.
core
.
domain
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
ruoyi-common/src/main/java/com/ruoyi/common/
base
/Ztree.java
→
ruoyi-common/src/main/java/com/ruoyi/common/
core/domain
/Ztree.java
View file @
95318754
package
com
.
ruoyi
.
common
.
base
;
import
java.io.Serializable
;
/**
* Ztree树结构实体类
*
* @author ruoyi
*/
public
class
Ztree
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 节点ID */
private
Long
id
;
/** 节点父ID */
private
Long
pId
;
/** 节点名称 */
private
String
name
;
/** 节点标题 */
private
String
title
;
/** 是否勾选 */
private
boolean
checked
=
false
;
/** 是否展开 */
private
boolean
open
=
false
;
/** 是否能勾选 */
private
boolean
nocheck
=
false
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getpId
()
{
return
pId
;
}
public
void
setpId
(
Long
pId
)
{
this
.
pId
=
pId
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
boolean
isChecked
()
{
return
checked
;
}
public
void
setChecked
(
boolean
checked
)
{
this
.
checked
=
checked
;
}
public
boolean
isOpen
()
{
return
open
;
}
public
void
setOpen
(
boolean
open
)
{
this
.
open
=
open
;
}
public
boolean
isNocheck
()
{
return
nocheck
;
}
public
void
setNocheck
(
boolean
nocheck
)
{
this
.
nocheck
=
nocheck
;
}
}
package
com
.
ruoyi
.
common
.
core
.
domain
;
import
java.io.Serializable
;
/**
* Ztree树结构实体类
*
* @author ruoyi
*/
public
class
Ztree
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 节点ID */
private
Long
id
;
/** 节点父ID */
private
Long
pId
;
/** 节点名称 */
private
String
name
;
/** 节点标题 */
private
String
title
;
/** 是否勾选 */
private
boolean
checked
=
false
;
/** 是否展开 */
private
boolean
open
=
false
;
/** 是否能勾选 */
private
boolean
nocheck
=
false
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getpId
()
{
return
pId
;
}
public
void
setpId
(
Long
pId
)
{
this
.
pId
=
pId
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
boolean
isChecked
()
{
return
checked
;
}
public
void
setChecked
(
boolean
checked
)
{
this
.
checked
=
checked
;
}
public
boolean
isOpen
()
{
return
open
;
}
public
void
setOpen
(
boolean
open
)
{
this
.
open
=
open
;
}
public
boolean
isNocheck
()
{
return
nocheck
;
}
public
void
setNocheck
(
boolean
nocheck
)
{
this
.
nocheck
=
nocheck
;
}
}
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
View file @
95318754
...
...
@@ -2,8 +2,8 @@ package com.ruoyi.common.utils.poi;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.annotation.Excel.Type
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.config.Global
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.exception.BusinessException
;
import
com.ruoyi.common.reflect.ReflectUtils
;
import
com.ruoyi.common.support.Convert
;
...
...
ruoyi-framework/pom.xml
View file @
95318754
...
...
@@ -33,14 +33,12 @@
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid-spring-boot-starter
</artifactId>
<version>
${druid.version}
</version>
</dependency>
<!--验证码 -->
<dependency>
<groupId>
com.github.penggle
</groupId>
<artifactId>
kaptcha
</artifactId>
<version>
${kaptcha.version}
</version>
<exclusions>
<exclusion>
<artifactId>
javax.servlet-api
</artifactId>
...
...
@@ -49,80 +47,40 @@
</exclusions>
</dependency>
<!-- SpringBoot集成thymeleaf模板 -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-thymeleaf
</artifactId>
</dependency>
<!--Shiro核心框架 -->
<dependency>
<groupId>
org.apache.shiro
</groupId>
<artifactId>
shiro-core
</artifactId>
<version>
${shiro.version}
</version>
</dependency>
<!-- Shiro使用Srping框架 -->
<dependency>
<groupId>
org.apache.shiro
</groupId>
<artifactId>
shiro-spring
</artifactId>
<version>
${shiro.version}
</version>
</dependency>
<!-- Shiro使用EhCache缓存框架 -->
<dependency>
<groupId>
org.apache.shiro
</groupId>
<artifactId>
shiro-ehcache
</artifactId>
<version>
${shiro.version}
</version>
</dependency>
<!-- thymeleaf模板引擎和shiro框架的整合 -->
<dependency>
<groupId>
com.github.theborakompanioni
</groupId>
<artifactId>
thymeleaf-extras-shiro
</artifactId>
<version>
${thymeleaf.extras.shiro.version}
</version>
</dependency>
<!-- 解析客户端操作系统、浏览器等 -->
<dependency>
<groupId>
eu.bitwalker
</groupId>
<artifactId>
UserAgentUtils
</artifactId>
<version>
${bitwalker.version}
</version>
</dependency>
<!-- 系统模块-->
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-system
</artifactId>
<version>
${ruoyi.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>
<!-- 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>
<dependency>
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
View file @
95318754
...
...
@@ -9,7 +9,7 @@ import org.aspectj.lang.annotation.Pointcut;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.springframework.stereotype.Component
;
import
com.ruoyi.common.annotation.DataScope
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.system.domain.SysRole
;
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataSourceAspect.java
View file @
95318754
...
...
@@ -11,8 +11,8 @@ import org.slf4j.LoggerFactory;
import
org.springframework.core.annotation.Order
;
import
org.springframework.stereotype.Component
;
import
com.ruoyi.common.annotation.DataSource
;
import
com.ruoyi.common.config.datasource.DynamicDataSourceContextHolder
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.framework.datasource.DynamicDataSourceContextHolder
;
/**
* 多数据源处理
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSource.java
View file @
95318754
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.framework.datasource;
import
java.util.Map
;
import
javax.sql.DataSource
;
import
org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
;
import
com.ruoyi.common.config.datasource.DynamicDataSourceContextHolder
;
/**
* 动态数据源
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/util/ShiroUtils.java
View file @
95318754
...
...
@@ -7,6 +7,7 @@ import org.apache.shiro.session.Session;
import
org.apache.shiro.subject.Subject
;
import
org.apache.shiro.subject.PrincipalCollection
;
import
org.apache.shiro.subject.SimplePrincipalCollection
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.framework.shiro.realm.UserRealm
;
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java
View file @
95318754
...
...
@@ -6,7 +6,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.web.HttpRequestMethodNotSupportedException
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
import
com.ruoyi.common.
base
.AjaxResult
;
import
com.ruoyi.common.
core.domain
.AjaxResult
;
import
com.ruoyi.common.exception.BusinessException
;
import
com.ruoyi.common.exception.DemoModeException
;
import
com.ruoyi.framework.util.PermissionUtils
;
...
...
ruoyi-generator/pom.xml
View file @
95318754
...
...
@@ -15,25 +15,26 @@
generator代码生成
</description>
<properties>
<velocity.version>
1.7
</velocity.version>
</properties>
<dependencies>
<!--Shiro核心框架 -->
<dependency>
<groupId>
org.apache.shiro
</groupId>
<artifactId>
shiro-core
</artifactId>
</dependency>
<!--velocity代码生成使用模板 -->
<dependency>
<groupId>
org.apache.velocity
</groupId>
<artifactId>
velocity
</artifactId>
<version>
${velocity.version}
</version>
</dependency>
<!-- 通用工具-->
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-common
</artifactId>
<version>
${ruoyi.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
ruoyi-
framework/src/main/java/com/ruoyi/framework
/config/GenConfig.java
→
ruoyi-
generator/src/main/java/com/ruoyi/generator
/config/GenConfig.java
View file @
95318754
package
com
.
ruoyi
.
framework
.
config
;
package
com
.
ruoyi
.
generator
.
config
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
/**
...
...
@@ -10,6 +12,7 @@ import org.springframework.stereotype.Component;
*/
@Component
@ConfigurationProperties
(
prefix
=
"gen"
)
@PropertySource
(
value
=
{
"generator.yml"
})
public
class
GenConfig
{
/** 作者 */
...
...
@@ -29,6 +32,7 @@ public class GenConfig
return
author
;
}
@Value
(
"${author}"
)
public
void
setAuthor
(
String
author
)
{
GenConfig
.
author
=
author
;
...
...
@@ -39,6 +43,7 @@ public class GenConfig
return
packageName
;
}
@Value
(
"${packageName}"
)
public
void
setPackageName
(
String
packageName
)
{
GenConfig
.
packageName
=
packageName
;
...
...
@@ -49,6 +54,7 @@ public class GenConfig
return
autoRemovePre
;
}
@Value
(
"${autoRemovePre}"
)
public
void
setAutoRemovePre
(
String
autoRemovePre
)
{
GenConfig
.
autoRemovePre
=
autoRemovePre
;
...
...
@@ -59,6 +65,7 @@ public class GenConfig
return
tablePrefix
;
}
@Value
(
"${tablePrefix}"
)
public
void
setTablePrefix
(
String
tablePrefix
)
{
GenConfig
.
tablePrefix
=
tablePrefix
;
...
...
ruoyi-
admin/src/main/java/com/ruoyi/web/controller/tool
/GenController.java
→
ruoyi-
generator/src/main/java/com/ruoyi/generator/controller
/GenController.java
View file @
95318754
package
com
.
ruoyi
.
web
.
controller
.
tool
;
package
com
.
ruoyi
.
generator
.
controller
;
import
java.io.IOException
;
import
java.util.List
;
...
...
@@ -13,12 +13,12 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.support.Convert
;
import
com.ruoyi.generator.domain.TableInfo
;
import
com.ruoyi.generator.service.IGenService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 代码生成 操作处理
...
...
ruoyi-generator/src/main/java/com/ruoyi/generator/domain/TableInfo.java
View file @
95318754
package
com
.
ruoyi
.
generator
.
domain
;
import
java.util.List
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
import
com.ruoyi.common.utils.StringUtils
;
/**
...
...
ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenServiceImpl.java
View file @
95318754
...
...
@@ -14,9 +14,9 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.common.config.Global
;
import
com.ruoyi.common.constant.Constants
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.generator.config.GenConfig
;
import
com.ruoyi.generator.domain.ColumnInfo
;
import
com.ruoyi.generator.domain.TableInfo
;
import
com.ruoyi.generator.mapper.GenMapper
;
...
...
@@ -110,7 +110,7 @@ public class GenServiceImpl implements IGenService
VelocityInitializer
.
initVelocity
();
String
packageName
=
G
lobal
.
getPackageName
();
String
packageName
=
G
enConfig
.
getPackageName
();
String
moduleName
=
GenUtils
.
getModuleName
(
packageName
);
VelocityContext
context
=
GenUtils
.
getVelocityContext
(
table
);
...
...
ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java
View file @
95318754
...
...
@@ -5,10 +5,10 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.velocity.VelocityContext
;
import
com.ruoyi.common.config.Global
;
import
com.ruoyi.common.constant.Constants
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.generator.config.GenConfig
;
import
com.ruoyi.generator.domain.ColumnInfo
;
import
com.ruoyi.generator.domain.TableInfo
;
...
...
@@ -64,7 +64,7 @@ public class GenUtils
{
// java对象数据传递到模板文件vm
VelocityContext
velocityContext
=
new
VelocityContext
();
String
packageName
=
G
lobal
.
getPackageName
();
String
packageName
=
G
enConfig
.
getPackageName
();
velocityContext
.
put
(
"tableName"
,
table
.
getTableName
());
velocityContext
.
put
(
"tableComment"
,
replaceKeyword
(
table
.
getTableComment
()));
velocityContext
.
put
(
"primaryKey"
,
table
.
getPrimaryKey
());
...
...
@@ -74,7 +74,7 @@ public class GenUtils
velocityContext
.
put
(
"columns"
,
table
.
getColumns
());
velocityContext
.
put
(
"basePackage"
,
getBasePackage
(
packageName
));
velocityContext
.
put
(
"package"
,
packageName
);
velocityContext
.
put
(
"author"
,
G
lobal
.
getAuthor
());
velocityContext
.
put
(
"author"
,
G
enConfig
.
getAuthor
());
velocityContext
.
put
(
"datetime"
,
DateUtils
.
getDate
());
return
velocityContext
;
}
...
...
@@ -105,8 +105,8 @@ public class GenUtils
*/
public
static
String
tableToJava
(
String
tableName
)
{
String
autoRemovePre
=
G
lobal
.
getAutoRemovePre
();
String
tablePrefix
=
G
lobal
.
getTablePrefix
();
String
autoRemovePre
=
G
enConfig
.
getAutoRemovePre
();
String
tablePrefix
=
G
enConfig
.
getTablePrefix
();
if
(
Constants
.
AUTO_REOMVE_PRE
.
equals
(
autoRemovePre
)
&&
StringUtils
.
isNotEmpty
(
tablePrefix
))
{
tableName
=
tableName
.
replaceFirst
(
tablePrefix
,
""
);
...
...
@@ -199,7 +199,7 @@ public class GenUtils
public
static
String
getProjectPath
()
{
String
packageName
=
G
lobal
.
getPackageName
();
String
packageName
=
G
enConfig
.
getPackageName
();
StringBuffer
projectPath
=
new
StringBuffer
();
projectPath
.
append
(
"main/java/"
);
projectPath
.
append
(
packageName
.
replace
(
"."
,
"/"
));
...
...
ruoyi-generator/src/main/resources/generator.yml
0 → 100644
View file @
95318754
# 代码生成
gen
:
# 作者
author
:
ruoyi
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName
:
com.ruoyi.system
# 自动去除表前缀,默认是true
autoRemovePre
:
true
# 表前缀(类名不会包含表前缀)
tablePrefix
:
sys_
\ No newline at end of file
ruoyi-
admin
/src/main/resources/templates/tool/gen/gen.html
→
ruoyi-
generator
/src/main/resources/templates/tool/gen/gen.html
View file @
95318754
File moved
ruoyi-quartz/pom.xml
View file @
95318754
...
...
@@ -17,6 +17,12 @@
<dependencies>
<!--Shiro核心框架 -->
<dependency>
<groupId>
org.apache.shiro
</groupId>
<artifactId>
shiro-core
</artifactId>
</dependency>
<!-- 定时任务 -->
<dependency>
<groupId>
org.quartz-scheduler
</groupId>
...
...
@@ -28,14 +34,13 @@
</exclusion>
</exclusions>
</dependency>
<!-- 通用工具-->
<!-- 通用工具-->
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-common
</artifactId>
<version>
${ruoyi.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java
View file @
95318754
...
...
@@ -10,7 +10,6 @@ import java.util.Properties;
* 定时任务配置
*
* @author ruoyi
*
*/
@Configuration
public
class
ScheduleConfig
...
...
ruoyi-
admin/src/main/java/com/ruoyi/web/controller/monito
r/SysJobController.java
→
ruoyi-
quartz/src/main/java/com/ruoyi/quartz/controlle
r/SysJobController.java
View file @
95318754
package
com
.
ruoyi
.
web
.
controller
.
monito
r
;
package
com
.
ruoyi
.
quartz
.
controlle
r
;
import
java.util.List
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
...
...
@@ -11,14 +11,13 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.util.ShiroUtils
;
import
com.ruoyi.quartz.domain.SysJob
;
import
com.ruoyi.quartz.service.ISysJobService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 调度任务信息操作处理
...
...
@@ -91,6 +90,8 @@ public class SysJobController extends BaseController
/**
* 任务调度状态修改
*
* @throws Exception
*/
@Log
(
title
=
"定时任务"
,
businessType
=
BusinessType
.
UPDATE
)
@RequiresPermissions
(
"monitor:job:changeStatus"
)
...
...
@@ -98,7 +99,6 @@ public class SysJobController extends BaseController
@ResponseBody
public
AjaxResult
changeStatus
(
SysJob
job
)
{
job
.
setUpdateBy
(
ShiroUtils
.
getLoginName
());
return
toAjax
(
jobService
.
changeStatus
(
job
));
}
...
...
@@ -125,14 +125,14 @@ public class SysJobController extends BaseController
/**
* 新增保存调度
* @throws Exception
*/
@Log
(
title
=
"定时任务"
,
businessType
=
BusinessType
.
INSERT
)
@RequiresPermissions
(
"monitor:job:add"
)
@PostMapping
(
"/add"
)
@ResponseBody
public
AjaxResult
addSave
(
SysJob
job
)
public
AjaxResult
addSave
(
SysJob
job
)
throws
Exception
{
job
.
setCreateBy
(
ShiroUtils
.
getLoginName
());
return
toAjax
(
jobService
.
insertJobCron
(
job
));
}
...
...
@@ -148,17 +148,17 @@ public class SysJobController extends BaseController
/**
* 修改保存调度
* @throws Exception
*/
@Log
(
title
=
"定时任务"
,
businessType
=
BusinessType
.
UPDATE
)
@RequiresPermissions
(
"monitor:job:edit"
)
@PostMapping
(
"/edit"
)
@ResponseBody
public
AjaxResult
editSave
(
SysJob
job
)
public
AjaxResult
editSave
(
SysJob
job
)
throws
Exception
{
job
.
setUpdateBy
(
ShiroUtils
.
getLoginName
());
return
toAjax
(
jobService
.
updateJobCron
(
job
));
}
/**
* 校验cron表达式是否有效
*/
...
...
ruoyi-
admin/src/main/java/com/ruoyi/web/controller/monito
r/SysJobLogController.java
→
ruoyi-
quartz/src/main/java/com/ruoyi/quartz/controlle
r/SysJobLogController.java
View file @
95318754
package
com
.
ruoyi
.
web
.
controller
.
monito
r
;
package
com
.
ruoyi
.
quartz
.
controlle
r
;
import
java.util.List
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
...
...
@@ -11,11 +11,11 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.page.TableDataInfo
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.web.base.BaseController
;
import
com.ruoyi.quartz.domain.SysJobLog
;
import
com.ruoyi.quartz.service.ISysJobLogService
;
...
...
ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java
View file @
95318754
...
...
@@ -5,8 +5,8 @@ import java.util.Date;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.base.BaseEntity
;
import
com.ruoyi.common.constant.ScheduleConstants
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.quartz.util.CronUtils
;
...
...
ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJobLog.java
View file @
95318754
...
...
@@ -3,7 +3,7 @@ package com.ruoyi.quartz.domain;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
/**
* 定时任务调度日志表 sys_job_log
...
...
ruoyi-
admin
/src/main/resources/templates/monitor/job/add.html
→
ruoyi-
quartz
/src/main/resources/templates/monitor/job/add.html
View file @
95318754
File moved
ruoyi-
admin
/src/main/resources/templates/monitor/job/detail.html
→
ruoyi-
quartz
/src/main/resources/templates/monitor/job/detail.html
View file @
95318754
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:shiro=
"http://www.pollix.at/thymeleaf/shiro"
>
<meta
charset=
"utf-8"
>
<head
th:include=
"include :: header"
></head>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<form
class=
"form-horizontal m-t"
id=
"jobLogForm"
th:if=
"${name == 'jobLog'}"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
日志序号:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobLogId}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务名称:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobName}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务组名:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobGroup}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务方法:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.methodName} + '(' + ${#strings.defaultString(jobLog.methodParams,'')} + ')'"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
日志信息:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobMessage}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
执行状态:
</label>
<div
class=
"form-control-static"
th:class=
"${jobLog.status == '0' ? 'label label-primary' : 'label label-danger'}"
th:text=
"${jobLog.status == '0' ? '正常' : '失败'}"
>
</div>
</div>
<div
class=
"form-group"
th:style=
"'display:' + ${jobLog.status == '0' ? 'none' : 'block'}"
>
<label
class=
"col-sm-3 control-label"
>
异常信息:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.exceptionInfo}"
>
</div>
</div>
</form>
<form
class=
"form-horizontal m-t"
id=
"jobForm"
th:if=
"${name == 'job'}"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务序号:
</label>
<div
class=
"form-control-static"
th:text=
"${job.jobId}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务名称:
</label>
<div
class=
"form-control-static"
th:text=
"${job.jobName}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务组名:
</label>
<div
class=
"form-control-static"
th:text=
"${job.jobGroup}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务方法:
</label>
<div
class=
"form-control-static"
th:text=
"${job.methodName} + '(' + ${#strings.defaultString(job.methodParams,'')} + ')'"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
执行表达式:
</label>
<div
class=
"form-control-static"
th:text=
"${job.cronExpression}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
下次执行时间:
</label>
<div
class=
"form-control-static"
th:text=
"${#dates.format(job.nextValidTime, 'yyyy-MM-dd HH:mm:ss')}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
执行策略:
</label>
<div
class=
"form-control-static"
th:if=
"${job.misfirePolicy == '0'}"
>
默认策略
</div>
<div
class=
"form-control-static"
th:if=
"${job.misfirePolicy == '1'}"
>
立即执行
</div>
<div
class=
"form-control-static"
th:if=
"${job.misfirePolicy == '2'}"
>
执行一次
</div>
<div
class=
"form-control-static"
th:if=
"${job.misfirePolicy == '3'}"
>
放弃执行
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
执行状态:
</label>
<div
class=
"form-control-static"
th:class=
"${job.status == '0' ? 'label label-primary' : 'label label-danger'}"
th:text=
"${job.status == '0' ? '正常' : '暂停'}"
>
</div>
</div>
</form>
</div>
</body>
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:shiro=
"http://www.pollix.at/thymeleaf/shiro"
>
<meta
charset=
"utf-8"
>
<head
th:include=
"include :: header"
></head>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<form
class=
"form-horizontal m-t"
id=
"jobLogForm"
th:if=
"${name == 'jobLog'}"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
日志序号:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobLogId}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务名称:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobName}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务组名:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobGroup}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务方法:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.methodName} + '(' + ${#strings.defaultString(jobLog.methodParams,'')} + ')'"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
日志信息:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobMessage}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
执行状态:
</label>
<div
class=
"form-control-static"
th:class=
"${jobLog.status == '0' ? 'label label-primary' : 'label label-danger'}"
th:text=
"${jobLog.status == '0' ? '正常' : '失败'}"
>
</div>
</div>
<div
class=
"form-group"
th:style=
"'display:' + ${jobLog.status == '0' ? 'none' : 'block'}"
>
<label
class=
"col-sm-3 control-label"
>
异常信息:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.exceptionInfo}"
>
</div>
</div>
</form>
<form
class=
"form-horizontal m-t"
id=
"jobForm"
th:if=
"${name == 'job'}"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务序号:
</label>
<div
class=
"form-control-static"
th:text=
"${job.jobId}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务名称:
</label>
<div
class=
"form-control-static"
th:text=
"${job.jobName}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务组名:
</label>
<div
class=
"form-control-static"
th:text=
"${job.jobGroup}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
任务方法:
</label>
<div
class=
"form-control-static"
th:text=
"${job.methodName} + '(' + ${#strings.defaultString(job.methodParams,'')} + ')'"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
执行表达式:
</label>
<div
class=
"form-control-static"
th:text=
"${job.cronExpression}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
下次执行时间:
</label>
<div
class=
"form-control-static"
th:text=
"${#dates.format(job.nextValidTime, 'yyyy-MM-dd HH:mm:ss')}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
执行策略:
</label>
<div
class=
"form-control-static"
th:if=
"${job.misfirePolicy == '0'}"
>
默认策略
</div>
<div
class=
"form-control-static"
th:if=
"${job.misfirePolicy == '1'}"
>
立即执行
</div>
<div
class=
"form-control-static"
th:if=
"${job.misfirePolicy == '2'}"
>
执行一次
</div>
<div
class=
"form-control-static"
th:if=
"${job.misfirePolicy == '3'}"
>
放弃执行
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
执行状态:
</label>
<div
class=
"form-control-static"
th:class=
"${job.status == '0' ? 'label label-primary' : 'label label-danger'}"
th:text=
"${job.status == '0' ? '正常' : '暂停'}"
>
</div>
</div>
</form>
</div>
</body>
</html>
\ No newline at end of file
ruoyi-
admin
/src/main/resources/templates/monitor/job/edit.html
→
ruoyi-
quartz
/src/main/resources/templates/monitor/job/edit.html
View file @
95318754
File moved
ruoyi-
admin
/src/main/resources/templates/monitor/job/job.html
→
ruoyi-
quartz
/src/main/resources/templates/monitor/job/job.html
View file @
95318754
File moved
ruoyi-
admin
/src/main/resources/templates/monitor/job/jobLog.html
→
ruoyi-
quartz
/src/main/resources/templates/monitor/job/jobLog.html
View file @
95318754
File moved
ruoyi-system/pom.xml
View file @
95318754
...
...
@@ -16,12 +16,19 @@
</description>
<dependencies>
<!-- Mysql驱动包 -->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<!-- 通用工具-->
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-common
</artifactId>
<version>
${ruoyi.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java
View file @
95318754
...
...
@@ -3,7 +3,7 @@ package com.ruoyi.system.domain;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
/**
* 参数配置表 sys_config
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java
View file @
95318754
...
...
@@ -2,7 +2,7 @@ package com.ruoyi.system.domain;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
/**
* 部门表 sys_dept
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java
View file @
95318754
...
...
@@ -3,7 +3,7 @@ package com.ruoyi.system.domain;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
/**
* 字典数据表 sys_dict_data
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java
View file @
95318754
...
...
@@ -3,7 +3,7 @@ package com.ruoyi.system.domain;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
/**
* 字典类型表 sys_dict_type
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java
View file @
95318754
...
...
@@ -4,7 +4,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.Date
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
/**
* 系统访问记录表 sys_logininfor
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java
View file @
95318754
...
...
@@ -2,9 +2,9 @@ package com.ruoyi.system.domain;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.ruoyi.common.base.BaseEntity
;
/**
* 菜单权限表 sys_menu
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java
View file @
95318754
...
...
@@ -2,7 +2,7 @@ package com.ruoyi.system.domain;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
/**
* 通知公告表 sys_notice
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java
View file @
95318754
...
...
@@ -4,7 +4,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.Date
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
/**
* 操作日志记录表 oper_log
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java
View file @
95318754
...
...
@@ -3,7 +3,7 @@ package com.ruoyi.system.domain;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
/**
* 岗位表 sys_post
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java
View file @
95318754
...
...
@@ -3,7 +3,7 @@ package com.ruoyi.system.domain;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
/**
* 角色表 sys_role
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java
View file @
95318754
...
...
@@ -2,7 +2,7 @@ package com.ruoyi.system.domain;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.annotation.Excel.Type
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.Date
;
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserOnline.java
View file @
95318754
...
...
@@ -3,7 +3,7 @@ package com.ruoyi.system.domain;
import
java.util.Date
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.
base
.BaseEntity
;
import
com.ruoyi.common.
core.domain
.BaseEntity
;
import
com.ruoyi.common.enums.OnlineStatus
;
/**
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java
View file @
95318754
package
com
.
ruoyi
.
system
.
service
;
import
java.util.List
;
import
com.ruoyi.common.
base
.Ztree
;
import
com.ruoyi.common.
core.domain
.Ztree
;
import
com.ruoyi.system.domain.SysDept
;
import
com.ruoyi.system.domain.SysRole
;
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java
View file @
95318754
...
...
@@ -3,7 +3,7 @@ package com.ruoyi.system.service;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
com.ruoyi.common.
base
.Ztree
;
import
com.ruoyi.common.
core.domain
.Ztree
;
import
com.ruoyi.system.domain.SysMenu
;
import
com.ruoyi.system.domain.SysRole
;
import
com.ruoyi.system.domain.SysUser
;
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
View file @
95318754
...
...
@@ -5,8 +5,8 @@ import java.util.List;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.common.annotation.DataScope
;
import
com.ruoyi.common.base.Ztree
;
import
com.ruoyi.common.constant.UserConstants
;
import
com.ruoyi.common.core.domain.Ztree
;
import
com.ruoyi.common.exception.BusinessException
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.system.domain.SysDept
;
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
View file @
95318754
...
...
@@ -11,8 +11,8 @@ import java.util.List;
import
java.util.Set
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.common.base.Ztree
;
import
com.ruoyi.common.constant.UserConstants
;
import
com.ruoyi.common.core.domain.Ztree
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.system.domain.SysMenu
;
import
com.ruoyi.system.domain.SysRole
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment