From 479957fbc130eb99f8dd791470f4c64f07864ea9 Mon Sep 17 00:00:00 2001 From: BaoLiuJiFenA <18670141050@163.com> Date: Tue, 8 Jan 2019 16:18:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=9A=84=E6=B3=A8=E9=87=8A=EF=BC=8C=E6=96=B9?= =?UTF-8?q?=E4=BE=BF=E5=90=8E=E6=9C=9F=E5=AF=B9=E4=BB=A3=E7=A0=81=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E7=BB=B4=E6=8A=A4=EF=BC=8C=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=96=B0=E5=8A=9F=E8=83=BD=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E7=9A=84=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/templates/main.html | 1084 ++++++++--------- .../com/ruoyi/framework/util/ShiroUtils.java | 10 +- .../com/ruoyi/framework/util/SpringUtils.java | 35 +- .../framework/web/base/BaseController.java | 81 +- .../ruoyi/framework/web/domain/Server.java | 97 +- .../framework/web/domain/server/Cpu.java | 43 +- .../framework/web/domain/server/Jvm.java | 55 +- .../framework/web/domain/server/Mem.java | 28 +- .../framework/web/domain/server/Sys.java | 37 +- .../framework/web/domain/server/SysFile.java | 49 +- .../exception/DefaultExceptionHandler.java | 33 +- .../web/exception/base/BaseException.java | 43 +- .../framework/web/service/ConfigService.java | 16 +- .../framework/web/service/DictService.java | 26 +- .../web/service/PermissionService.java | 13 +- 15 files changed, 742 insertions(+), 908 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/main.html b/ruoyi-admin/src/main/resources/templates/main.html index 7fcfb3cd4..665eb614d 100644 --- a/ruoyi-admin/src/main/resources/templates/main.html +++ b/ruoyi-admin/src/main/resources/templates/main.html @@ -1,5 +1,5 @@ - + @@ -13,572 +13,560 @@ -
-
-
- 领取阿里云1888通用代金券(新老客户均可用) -
https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof -

云产品通用红包,可叠加官网常规优惠使用。

-
- -
-
-
-

Hello,Guest

- 移动设备访问请扫描以下二维码: -
-
- -
-
-
-

若依后台管理框架

-

一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了若依管理系统。,她可以用于所有的Web应用程序,如网站管理后台网站会员中心CMSCRMOA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。

-

- 当前版本:v[[${version}]] -

-

- ¥免费开源 -

-
-

- - 访问码云 - - - 访问主页 - -

-
-
-

技术选型:

-
    -
  1. 核心框架:Spring Boot。
  2. -
  3. 安全框架:Apache Shiro。
  4. -
  5. 模板引擎:Thymeleaf。
  6. -
  7. 持久层框架:MyBatis。
  8. -
  9. 定时任务:Quartz。
  10. -
  11. 数据库连接池:Druid。
  12. -
  13. 工具类:Fastjson。
  14. -
  15. 更多……
  16. -
-
- +
+
+

若依后台管理框架

+

一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了若依管理系统。,她可以用于所有的Web应用程序,如网站管理后台网站会员中心CMSCRMOA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。 +

+

+ 当前版本:v[[${version}]] +

+

+ ¥免费开源 +

+
+

+ + 访问码云 + + + 访问主页 + +

+
+
+

技术选型:

+
    +
  1. 核心框架:Spring Boot。
  2. +
  3. 安全框架:Apache Shiro。
  4. +
  5. 模板引擎:Thymeleaf。
  6. +
  7. 持久层框架:MyBatis。
  8. +
  9. 定时任务:Quartz。
  10. +
  11. 数据库连接池:Druid。
  12. +
  13. 工具类:Fastjson。
  14. +
  15. 更多……
  16. +
-
-
-
-
-
-
联系信息
- -
-
-

官网:http://www.ruoyi.vip -

-

QQ群:满1389287 满1679294 1529866 -

-

微信:/ *若依 -

-

支付宝:/ *若依 -

-
+
+
+
+
+
+
+
更新日志
-
-
-
-
-
更新日志
-
-
-
-
+
+
+
-
-
- v3.1.02018.12.03 -
-
-
-
-
    -
  1. 新增内网不获取IP地址
  2. -
  3. 新增cron表达式有效校验
  4. -
  5. 定时任务新增详细信息
  6. -
  7. 定时任务默认策略修改(不触发立即执行)
  8. -
  9. 定时任务显示下一个执行周期
  10. -
  11. 支持前端任意日期格式处理
  12. -
  13. 上传头像删除多余提交按钮
  14. -
  15. 表格增加行间隔色配置项
  16. -
  17. 表格增加转义HTML字符串配置项
  18. -
  19. 表格增加显示/隐藏指定列
  20. -
  21. 代码生成优化
  22. -
  23. 操作日志参数格式化显示
  24. -
  25. 页签新增新增全屏显示
  26. -
  27. 新增一键打包部署
  28. -
  29. Excel注解新增多个参数
  30. -
  31. 新增提交静默更新表格方法
  32. -
  33. 新增服务监控菜单
  34. -
-
-
-
-
-
-
- v3.0.02018.10.08 -
-
-
-
-
    -
  1. 升级poi到最新版3.17
  2. -
  3. 导出修改临时目录绝对路径
  4. -
  5. 升级laydate升级到最新版5.0.9
  6. -
  7. 升级SpringBoot到最新版本2.0.5
  8. -
  9. 优化开始/结束时间校验限制
  10. -
  11. 重置密码参数表中获取默认值
  12. -
  13. 修复头像修改显示问题
  14. -
  15. 新增数据权限过滤注解
  16. -
  17. 新增表格检索折叠按钮
  18. -
  19. 新增清空(登录、操作、调度)日志
  20. -
  21. 固定按钮位置(提交/关闭)
  22. -
  23. 部门/菜单支持(展开/折叠)
  24. -
  25. 部分细节调整优化
  26. -
  27. 项目采用分模块
  28. -
-
-
-
-
-
-
- v2.4.02018.09.03 -
-
-
-
-
    -
  1. 支持部门多级查询
  2. -
  3. 修复菜单状态查询无效
  4. -
  5. 支持IP地址开关
  6. -
  7. 支持XSS开关
  8. -
  9. 记录日志异步处理
  10. -
  11. 字典回显样式更改为下拉框
  12. -
  13. 菜单类型必填校验
  14. -
  15. 修复在线用户排序报错
  16. -
  17. 增加重置按钮
  18. -
  19. 支持注解导入数据
  20. -
  21. 支持弹层外区域关闭
  22. -
  23. 备注更换为文本区域
  24. -
  25. 新增角色逻辑删除
  26. -
  27. 新增部门逻辑删除
  28. -
  29. 支持部门数据权限
  30. -
  31. 管理员默认拥有所有授权
  32. -
  33. 字典数据采用分页
  34. -
  35. 部分细节调整优化
  36. -
-
-
-
+
+
+ v3.1.02018.12.03 +
+
+
+
+
    +
  1. 新增内网不获取IP地址
  2. +
  3. 新增cron表达式有效校验
  4. +
  5. 定时任务新增详细信息
  6. +
  7. 定时任务默认策略修改(不触发立即执行)
  8. +
  9. 定时任务显示下一个执行周期
  10. +
  11. 支持前端任意日期格式处理
  12. +
  13. 上传头像删除多余提交按钮
  14. +
  15. 表格增加行间隔色配置项
  16. +
  17. 表格增加转义HTML字符串配置项
  18. +
  19. 表格增加显示/隐藏指定列
  20. +
  21. 代码生成优化
  22. +
  23. 操作日志参数格式化显示
  24. +
  25. 页签新增新增全屏显示
  26. +
  27. 新增一键打包部署
  28. +
  29. Excel注解新增多个参数
  30. +
  31. 新增提交静默更新表格方法
  32. +
  33. 新增服务监控菜单
  34. +
+
+
+
-
-
- v2.3.02018.08.06 -
-
-
-
-
    -
  1. 支持表格不分页开关控制
  2. -
  3. 修改字典类型同步修改字典数据
  4. -
  5. 代码生成新增修改后缀处理
  6. -
  7. 代码生成新增实体toString
  8. -
  9. 代码生成非字符串去除!=''
  10. -
  11. 导出数据前加载遮罩层
  12. -
  13. 部门删除校验条件修改
  14. -
  15. 搜索查询下载优化
  16. -
  17. 手机打开弹出层自适应
  18. -
  19. 角色岗位禁用显示置灰
  20. -
  21. 角色禁用不显示菜单
  22. -
  23. 新增导出权限
  24. -
  25. 角色权限唯一校验
  26. -
  27. 岗位名称编码唯一校验
  28. -
  29. TreeTable优化
  30. -
  31. 支持多数据源
  32. -
  33. 其他细节优化
  34. -
-
-
-
-
-
-
- v2.2.02018.07.23 -
-
-
-
-
    -
  1. 修复批量生成代码异常问题
  2. -
  3. 修复定时器保存失败问题
  4. -
  5. 修复热部署转换问题
  6. -
  7. 支持查询菜单管理,部门管理
  8. -
  9. 大多数功能支持时间查询
  10. -
  11. 自定义导出注解自动匹配column
  12. -
  13. 新增任务执行策略
  14. -
  15. 操作详细动态显示类型
  16. -
  17. 支持动态回显字典数据
  18. -
  19. 后台代码优化调整
  20. -
  21. 其他细节优化
  22. -
-
-
-
-
-
-
- v2.1.02018.07.10 -
-
-
-
-
    -
  1. 新增登陆超时提醒
  2. -
  3. 修复定时器热部署转换问题
  4. -
  5. 修复登录验证码校验无效问题
  6. -
  7. 定时任务新增立即执行一次
  8. -
  9. 存在字典数据不允许删除字典
  10. -
  11. 字典数据支持按名称查询
  12. -
  13. 代码生成增加日志注解&表格优化
  14. -
  15. 修复用户逻辑删除后能登录问题
  16. -
  17. 表格支持多字段动态排序
  18. -
  19. 支持三级菜单显示
  20. -
  21. 新增ry.sh启动程序脚本
  22. -
  23. 其他细节优化
  24. -
-
-
-
-
-
-
- v2.0.02018.07.02 -
-
-
-
-
    -
  1. 升级SpringBoot到最新版本2.0.3
  2. -
  3. 新增公告管理
  4. -
  5. 表单校验示提体验优化
  6. -
  7. 前端通用方法封装调整
  8. -
  9. 前端去除js文件,合并到html
  10. -
  11. 操作加载遮罩层
  12. -
  13. 支持全屏模式操作
  14. -
  15. 支持注解导出数据
  16. -
  17. 系统支持多查询&下载
  18. -
  19. 系统样式调整
  20. -
-
-
-
-
-
-
- v1.1.62018.06.04 -
-
-
-
-
    -
  1. 新增用户列表部门列
  2. -
  3. 新增登录地点
  4. -
  5. 新增swagger
  6. -
  7. 修复排序数字校验
  8. -
  9. 优化头像上传文件类型限定为图片
  10. -
  11. 新增XSS过滤
  12. -
  13. 新增热部署提高开发效率
  14. -
  15. 修复treegrid居中无效
  16. -
  17. 角色多条件查询
  18. -
-
-
-
-
-
-
- v1.1.52018.05.28 -
-
-
-
-
    -
  1. 优化登录失败刷新验证码
  2. -
  3. 新增用户登陆地址时间
  4. -
  5. 修复ajax超时退出问题
  6. -
  7. 新增html调用数据字典(若依首创)
  8. -
  9. 调整系统部分样式
  10. -
  11. 新增用户逻辑删除
  12. -
  13. 新增管理员不允许删除修改
  14. -
  15. 升级bootstrapTable到最新版本1.12.1
  16. -
  17. 升级layer到最新版本3.1.1
  18. -
-
-
-
-
-
-
- v1.1.42018.05.20 -
-
-
-
-
    -
  1. 新增参数管理
  2. -
  3. 修复头像上传bug
  4. -
  5. 手机邮箱唯一校验
  6. -
  7. 支持手机邮箱登录
  8. -
  9. 代码生成优化
  10. -
  11. 支持模糊查询
  12. -
  13. 支持切换主题皮肤
  14. -
  15. 修改权限即时生效
  16. -
  17. 修复页签Tab关闭问题
  18. -
-
-
-
-
-
-
- v1.1.32018.05.14 -
-
-
-
-
    -
  1. 新增验证码(数组计算、字符验证)
  2. -
  3. 新增cookie记住我
  4. -
  5. 新增头像上传
  6. -
  7. 用户名密码长度限制
  8. -
  9. 通用字段提取
  10. -
  11. 支持自定义条件查询
  12. -
  13. 部门名称必填、时间格式调整
  14. -
  15. 其他细节优化
  16. -
-
-
-
-
-
-
- v1.1.22018.05.07 -
-
-
-
-
    -
  1. 新增个人信息修改
  2. -
  3. 菜单存在子菜单不允许删除
  4. -
  5. 菜单分配角色不允许删除
  6. -
  7. 角色分配人员不允许删除
  8. -
  9. 岗位使用后不允许删除
  10. -
  11. 保证用户的数据完整性加入事物
  12. -
  13. 新增环境使用手册、数据建模
  14. -
  15. Thymeleaf升级到3.0
  16. -
  17. 支持非ROOT部署
  18. -
-
+
+
+ v3.0.02018.10.08 +
+
+
+
+
    +
  1. 升级poi到最新版3.17
  2. +
  3. 导出修改临时目录绝对路径
  4. +
  5. 升级laydate升级到最新版5.0.9
  6. +
  7. 升级SpringBoot到最新版本2.0.5
  8. +
  9. 优化开始/结束时间校验限制
  10. +
  11. 重置密码参数表中获取默认值
  12. +
  13. 修复头像修改显示问题
  14. +
  15. 新增数据权限过滤注解
  16. +
  17. 新增表格检索折叠按钮
  18. +
  19. 新增清空(登录、操作、调度)日志
  20. +
  21. 固定按钮位置(提交/关闭)
  22. +
  23. 部门/菜单支持(展开/折叠)
  24. +
  25. 部分细节调整优化
  26. +
  27. 项目采用分模块
  28. +
-
-
-
- v1.1.12018.04.23 -
-
-
-
-
    -
  1. 新增表单构建器
  2. -
  3. 代码生成优化
  4. -
  5. 支持新增主部门
  6. -
  7. 支持选择上级部门、上级菜单
  8. -
  9. 新增字典管理单条删除
  10. -
  11. 优化一些其他细节
  12. -
-
+
+
+
+
+ v2.4.02018.09.03 +
+
+
+
+
    +
  1. 支持部门多级查询
  2. +
  3. 修复菜单状态查询无效
  4. +
  5. 支持IP地址开关
  6. +
  7. 支持XSS开关
  8. +
  9. 记录日志异步处理
  10. +
  11. 字典回显样式更改为下拉框
  12. +
  13. 菜单类型必填校验
  14. +
  15. 修复在线用户排序报错
  16. +
  17. 增加重置按钮
  18. +
  19. 支持注解导入数据
  20. +
  21. 支持弹层外区域关闭
  22. +
  23. 备注更换为文本区域
  24. +
  25. 新增角色逻辑删除
  26. +
  27. 新增部门逻辑删除
  28. +
  29. 支持部门数据权限
  30. +
  31. 管理员默认拥有所有授权
  32. +
  33. 字典数据采用分页
  34. +
  35. 部分细节调整优化
  36. +
-
-
-
- v1.1.02018.04.20 -
-
-
-
-
    -
  1. 支持密码盐
  2. -
  3. 支持新增主目录
  4. -
  5. 支持批量生成代码
  6. -
  7. 支持表格导出(csv、txt、doc、excel)
  8. -
  9. 自动适应宽高模式窗体
  10. -
  11. 重复校验(角色名、菜单名、部门名)
  12. -
  13. 优化一些其他细节
  14. -
-
+
+
+
+
+ v2.3.02018.08.06 +
+
+
+
+
    +
  1. 支持表格不分页开关控制
  2. +
  3. 修改字典类型同步修改字典数据
  4. +
  5. 代码生成新增修改后缀处理
  6. +
  7. 代码生成新增实体toString
  8. +
  9. 代码生成非字符串去除!=''
  10. +
  11. 导出数据前加载遮罩层
  12. +
  13. 部门删除校验条件修改
  14. +
  15. 搜索查询下载优化
  16. +
  17. 手机打开弹出层自适应
  18. +
  19. 角色岗位禁用显示置灰
  20. +
  21. 角色禁用不显示菜单
  22. +
  23. 新增导出权限
  24. +
  25. 角色权限唯一校验
  26. +
  27. 岗位名称编码唯一校验
  28. +
  29. TreeTable优化
  30. +
  31. 支持多数据源
  32. +
  33. 其他细节优化
  34. +
-
-
-
- v1.0.92018.04.14 -
-
-
-
-
    -
  1. 新增代码生成(生成包括 java、html、js、xml、sql)
  2. -
  3. 新增按钮权限控制隐藏(若依首创)
  4. -
-
+
+
+
+
+ v2.2.02018.07.23 +
+
+
+
+
    +
  1. 修复批量生成代码异常问题
  2. +
  3. 修复定时器保存失败问题
  4. +
  5. 修复热部署转换问题
  6. +
  7. 支持查询菜单管理,部门管理
  8. +
  9. 大多数功能支持时间查询
  10. +
  11. 自定义导出注解自动匹配column
  12. +
  13. 新增任务执行策略
  14. +
  15. 操作详细动态显示类型
  16. +
  17. 支持动态回显字典数据
  18. +
  19. 后台代码优化调整
  20. +
  21. 其他细节优化
  22. +
-
-
-
- v1.0.82018.04.08 -
-
-
-
-
    -
  1. 新增定时任务(新增、修改、删除、查询、启动/暂停)
  2. -
  3. 新增调度日志(查询、删除)
  4. -
-
+
+
+
+
+ v2.1.02018.07.10 +
+
+
+
+
    +
  1. 新增登陆超时提醒
  2. +
  3. 修复定时器热部署转换问题
  4. +
  5. 修复登录验证码校验无效问题
  6. +
  7. 定时任务新增立即执行一次
  8. +
  9. 存在字典数据不允许删除字典
  10. +
  11. 字典数据支持按名称查询
  12. +
  13. 代码生成增加日志注解&表格优化
  14. +
  15. 修复用户逻辑删除后能登录问题
  16. +
  17. 表格支持多字段动态排序
  18. +
  19. 支持三级菜单显示
  20. +
  21. 新增ry.sh启动程序脚本
  22. +
  23. 其他细节优化
  24. +
-
-
-
- v1.0.72018.04.04 -
-
-
-
-
    -
  1. 新增岗位管理(新增、修改、删除、查询)
  2. -
  3. 优化用户管理,菜单管理部分细节
  4. -
-
+
+
+
+
+ v2.0.02018.07.02 +
+
+
+
+
    +
  1. 升级SpringBoot到最新版本2.0.3
  2. +
  3. 新增公告管理
  4. +
  5. 表单校验示提体验优化
  6. +
  7. 前端通用方法封装调整
  8. +
  9. 前端去除js文件,合并到html
  10. +
  11. 操作加载遮罩层
  12. +
  13. 支持全屏模式操作
  14. +
  15. 支持注解导出数据
  16. +
  17. 系统支持多查询&下载
  18. +
  19. 系统样式调整
  20. +
-
-
-
- v1.0.62018.03.15 -
-
-
-
-
    -
  1. 新增字典管理(新增、删除、修改、查询、数据选择)
  2. -
  3. 新增用户密码重置
  4. -
  5. 优化一些其他细节
  6. -
-
+
+
+
+
+ v1.1.62018.06.04 +
+
+
+
+
    +
  1. 新增用户列表部门列
  2. +
  3. 新增登录地点
  4. +
  5. 新增swagger
  6. +
  7. 修复排序数字校验
  8. +
  9. 优化头像上传文件类型限定为图片
  10. +
  11. 新增XSS过滤
  12. +
  13. 新增热部署提高开发效率
  14. +
  15. 修复treegrid居中无效
  16. +
  17. 角色多条件查询
  18. +
-
-
-
- v1.0.52018.03.12 -
-
-
-
-
    -
  1. 新增菜单管理(新增、删除、修改、查询、图标选择)
  2. -
  3. 部门管理优化(添加责任人、联系电话、邮箱、修改者)
  4. -
-
+
+
+
+
+ v1.1.52018.05.28 +
+
+
+
+
    +
  1. 优化登录失败刷新验证码
  2. +
  3. 新增用户登陆地址时间
  4. +
  5. 修复ajax超时退出问题
  6. +
  7. 新增html调用数据字典(若依首创)
  8. +
  9. 调整系统部分样式
  10. +
  11. 新增用户逻辑删除
  12. +
  13. 新增管理员不允许删除修改
  14. +
  15. 升级bootstrapTable到最新版本1.12.1
  16. +
  17. 升级layer到最新版本3.1.1
  18. +
-
-
-
- v1.0.42018.03.11 -
-
-
-
-
    -
  1. 新增角色管理(新增、删除、修改、查询、菜单选择)
  2. -
-
+
+
+
+
+ v1.1.42018.05.20 +
+
+
+
+
    +
  1. 新增参数管理
  2. +
  3. 修复头像上传bug
  4. +
  5. 手机邮箱唯一校验
  6. +
  7. 支持手机邮箱登录
  8. +
  9. 代码生成优化
  10. +
  11. 支持模糊查询
  12. +
  13. 支持切换主题皮肤
  14. +
  15. 修改权限即时生效
  16. +
  17. 修复页签Tab关闭问题
  18. +
-
-
-
- v1.0.32018.03.08 -
-
-
-
-
    -
  1. 新增用户管理(新增、删除、修改、查询、部门选择)
  2. -
-
+
+
+
+
+ v1.1.32018.05.14 +
+
+
+
+
    +
  1. 新增验证码(数组计算、字符验证)
  2. +
  3. 新增cookie记住我
  4. +
  5. 新增头像上传
  6. +
  7. 用户名密码长度限制
  8. +
  9. 通用字段提取
  10. +
  11. 支持自定义条件查询
  12. +
  13. 部门名称必填、时间格式调整
  14. +
  15. 其他细节优化
  16. +
-
-
-
- v1.0.22018.03.04 -
-
-
-
-
    -
  1. 新增部门管理 (新增、删除、修改、查询)
  2. -
-
+
+
+
+
+ v1.1.22018.05.07 +
+
+
+
+
    +
  1. 新增个人信息修改
  2. +
  3. 菜单存在子菜单不允许删除
  4. +
  5. 菜单分配角色不允许删除
  6. +
  7. 角色分配人员不允许删除
  8. +
  9. 岗位使用后不允许删除
  10. +
  11. 保证用户的数据完整性加入事物
  12. +
  13. 新增环境使用手册、数据建模
  14. +
  15. Thymeleaf升级到3.0
  16. +
  17. 支持非ROOT部署
  18. +
-
-
-
- v1.0.12018.03.03 -
-
-
-
-
    -
  1. 新增在线用户 (批量强退、单条强退、查询)
  2. -
  3. 新增登录日志 (批量删除、查询)
  4. -
  5. 新增操作日志 (批量删除、查询、详细)
  6. -
  7. 新增数据监控 (监控DB池连接和SQL的执行)
  8. -
-
+
+
+
+
+ v1.1.12018.04.23 +
+
+
+
+
    +
  1. 新增表单构建器
  2. +
  3. 代码生成优化
  4. +
  5. 支持新增主部门
  6. +
  7. 支持选择上级部门、上级菜单
  8. +
  9. 新增字典管理单条删除
  10. +
  11. 优化一些其他细节
  12. +
-
-
-

- v1.0.02018.03.01 -

+
+
+
+
+ v1.1.02018.04.20 +
+
+
+
+
    +
  1. 支持密码盐
  2. +
  3. 支持新增主目录
  4. +
  5. 支持批量生成代码
  6. +
  7. 支持表格导出(csv、txt、doc、excel)
  8. +
  9. 自动适应宽高模式窗体
  10. +
  11. 重复校验(角色名、菜单名、部门名)
  12. +
  13. 优化一些其他细节
  14. +
-
-
-
    -
  1. 若依管理系统正式发布。
  2. -
-
+
+
+
+
+
+ v1.0.92018.04.14 +
+
+
+
+
    +
  1. 新增代码生成(生成包括 java、html、js、xml、sql)
  2. +
  3. 新增按钮权限控制隐藏(若依首创)
  4. +
+
+
+
+
+
+
+ v1.0.82018.04.08 +
+
+
+
+
    +
  1. 新增定时任务(新增、修改、删除、查询、启动/暂停)
  2. +
  3. 新增调度日志(查询、删除)
  4. +
+
+
+
+
+
+
+ v1.0.72018.04.04 +
+
+
+
+
    +
  1. 新增岗位管理(新增、修改、删除、查询)
  2. +
  3. 优化用户管理,菜单管理部分细节
  4. +
+
+
+
+
+
+
+ v1.0.62018.03.15 +
+
+
+
+
    +
  1. 新增字典管理(新增、删除、修改、查询、数据选择)
  2. +
  3. 新增用户密码重置
  4. +
  5. 优化一些其他细节
  6. +
+
+
+
+
+
+
+ v1.0.52018.03.12 +
+
+
+
+
    +
  1. 新增菜单管理(新增、删除、修改、查询、图标选择)
  2. +
  3. 部门管理优化(添加责任人、联系电话、邮箱、修改者)
  4. +
+
+
+
+
+
+
+ v1.0.42018.03.11 +
+
+
+
+
    +
  1. 新增角色管理(新增、删除、修改、查询、菜单选择)
  2. +
+
+
+
+
+
+
+ v1.0.32018.03.08 +
+
+
+
+
    +
  1. 新增用户管理(新增、删除、修改、查询、部门选择)
  2. +
+
+
+
+
+
+
+ v1.0.22018.03.04 +
+
+
+
+
    +
  1. 新增部门管理 (新增、删除、修改、查询)
  2. +
+
+
+
+
+
+
+ v1.0.12018.03.03 +
+
+
+
+
    +
  1. 新增在线用户 (批量强退、单条强退、查询)
  2. +
  3. 新增登录日志 (批量删除、查询)
  4. +
  5. 新增操作日志 (批量删除、查询、详细)
  6. +
  7. 新增数据监控 (监控DB池连接和SQL的执行)
  8. +
+
+
+
+
+
+

+ v1.0.02018.03.01 +

+
+
+
+
    +
  1. 若依管理系统正式发布。
  2. +
@@ -586,26 +574,10 @@
-
-
-
-
捐赠
-
-
-
- 请作者喝杯咖啡。 -
-

- 请使用手机支付宝或者微信扫码支付 - -

- -
-
-
- - +
+ + diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/util/ShiroUtils.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/util/ShiroUtils.java index dfb73ec45..7da77dcae 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/util/ShiroUtils.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/util/ShiroUtils.java @@ -14,6 +14,14 @@ import org.apache.shiro.subject.Subject; /** * shiro 工具类 + * Subject:主体.每个用户登录后都会对应一个Subject对象,所有用户信息都存储到Subject中 + * Security Manager:Shiro最大的容器.Shiro所有功能都封装在Security Manager中 1:编写代码时,想要使用Shiro第一个步骤获取到Security Manager 2:在整个程序中保证Security Manager有且只有一个 + * Authenticator: 认证器.执行认证过程调用的组件. + * Authorizer:授权器.执行授权时调用的组件. + * Session Manager: Session管理器. + * Cache Manager: 缓存管理器.Shiro支持很多第三方缓存工具.例如Ehcache等. + * SessionDao: 操作Session内容的组件 + * Realm:该组件的作用负责获取到数据库中数据并根据用户自定义逻辑进行授权和认证等操作. 1:Shiro 框架和数据库没有关系.没有对数据库设计有认证强制要求 2:如果Shiro想要访问数据库都是通过Realm组件. 3:如果Shiro数据不是来源于数据库,可以使用.ini文件设置静态数据. * * @author ruoyi */ @@ -52,7 +60,7 @@ public class ShiroUtils { */ public static void setSysUser(SysUser user) { Subject subject = getSubject(); - //获取当事人的信息 + //获取当事人的信息,身份.代表用户名,邮箱,手机等能够唯一确认身份的信息 PrincipalCollection principalCollection = subject.getPrincipals(); String realmName = principalCollection.getRealmNames().iterator().next(); PrincipalCollection newPrincipalCollection = new SimplePrincipalCollection(user, realmName); diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/util/SpringUtils.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/util/SpringUtils.java index 99b0f05b4..0677dbdf6 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/util/SpringUtils.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/util/SpringUtils.java @@ -8,18 +8,18 @@ import org.springframework.stereotype.Component; /** * spring工具类 方便在非spring管理环境中获取bean - * + * * @author ruoyi */ @Component -public final class SpringUtils implements BeanFactoryPostProcessor -{ - /** Spring应用上下文环境 */ +public final class SpringUtils implements BeanFactoryPostProcessor { + /** + * Spring应用上下文环境 + */ private static ConfigurableListableBeanFactory beanFactory; @Override - public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException - { + public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringUtils.beanFactory = beanFactory; } @@ -29,11 +29,9 @@ public final class SpringUtils implements BeanFactoryPostProcessor * @param name * @return Object 一个以所给名字注册的bean的实例 * @throws org.springframework.beans.BeansException - * */ @SuppressWarnings("unchecked") - public static T getBean(String name) throws BeansException - { + public static T getBean(String name) throws BeansException { return (T) beanFactory.getBean(name); } @@ -43,10 +41,8 @@ public final class SpringUtils implements BeanFactoryPostProcessor * @param clz * @return * @throws org.springframework.beans.BeansException - * */ - public static T getBean(Class clz) throws BeansException - { + public static T getBean(Class clz) throws BeansException { T result = (T) beanFactory.getBean(clz); return result; } @@ -57,8 +53,7 @@ public final class SpringUtils implements BeanFactoryPostProcessor * @param name * @return boolean */ - public static boolean containsBean(String name) - { + public static boolean containsBean(String name) { return beanFactory.containsBean(name); } @@ -68,10 +63,8 @@ public final class SpringUtils implements BeanFactoryPostProcessor * @param name * @return boolean * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException - * */ - public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException - { + public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException { return beanFactory.isSingleton(name); } @@ -79,10 +72,8 @@ public final class SpringUtils implements BeanFactoryPostProcessor * @param name * @return Class 注册对象的类型 * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException - * */ - public static Class getType(String name) throws NoSuchBeanDefinitionException - { + public static Class getType(String name) throws NoSuchBeanDefinitionException { return beanFactory.getType(name); } @@ -92,10 +83,8 @@ public final class SpringUtils implements BeanFactoryPostProcessor * @param name * @return * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException - * */ - public static String[] getAliases(String name) throws NoSuchBeanDefinitionException - { + public static String[] getAliases(String name) throws NoSuchBeanDefinitionException { return beanFactory.getAliases(name); } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/base/BaseController.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/base/BaseController.java index 2d971e50c..c6e4510ce 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/base/BaseController.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/base/BaseController.java @@ -1,10 +1,5 @@ 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; @@ -15,41 +10,41 @@ import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.framework.web.page.TableSupport; import com.ruoyi.system.domain.SysUser; +import org.springframework.web.bind.WebDataBinder; +import org.springframework.web.bind.annotation.InitBinder; + +import java.beans.PropertyEditorSupport; +import java.util.Date; +import java.util.List; /** * web层通用数据处理 - * + * * @author ruoyi */ -public class BaseController -{ +public class BaseController { /** * 将前台传递过来的日期格式的字符串,自动转化为Date类型 */ @InitBinder - public void initBinder(WebDataBinder binder) - { + public void initBinder(WebDataBinder binder) { // Date 类型转换 - binder.registerCustomEditor(Date.class, new PropertyEditorSupport() - { + binder.registerCustomEditor(Date.class, new PropertyEditorSupport() { @Override - public void setAsText(String text) - { + public void setAsText(String text) { setValue(DateUtils.parseDate(text)); } }); } /** - * 设置请求分页数据 + * 设置请求分页数据,查询的时候调用分页查询 */ - protected void startPage() - { + protected void startPage() { PageDomain pageDomain = TableSupport.buildPageRequest(); Integer pageNum = pageDomain.getPageNum(); Integer pageSize = pageDomain.getPageSize(); - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) - { + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { String orderBy = pageDomain.getOrderBy(); PageHelper.startPage(pageNum, pageSize, orderBy); } @@ -57,10 +52,10 @@ public class BaseController /** * 响应请求分页数据 + * 分页返回的数据 */ - @SuppressWarnings({ "rawtypes", "unchecked" }) - protected TableDataInfo getDataTable(List list) - { + @SuppressWarnings({"rawtypes", "unchecked"}) + protected TableDataInfo getDataTable(List list) { TableDataInfo rspData = new TableDataInfo(); rspData.setCode(0); rspData.setRows(list); @@ -69,92 +64,80 @@ public class BaseController } /** - * 响应返回结果 - * + * 响应返回结果,如果查询出的行数 > 0的话,就返回成功,否则返回错误 + * * @param rows 影响行数 * @return 操作结果 */ - protected AjaxResult toAjax(int rows) - { + protected AjaxResult toAjax(int rows) { return rows > 0 ? success() : error(); } /** * 响应返回结果 - * + * * @param result 结果 * @return 操作结果 */ - protected AjaxResult toAjax(boolean result) - { + protected AjaxResult toAjax(boolean result) { return result ? success() : error(); } /** * 返回成功 */ - public AjaxResult success() - { + public AjaxResult success() { return AjaxResult.success(); } /** * 返回失败消息 */ - public AjaxResult error() - { + public AjaxResult error() { return AjaxResult.error(); } /** * 返回成功消息 */ - public AjaxResult success(String message) - { + public AjaxResult success(String message) { return AjaxResult.success(message); } /** * 返回失败消息 */ - public AjaxResult error(String message) - { + public AjaxResult error(String message) { return AjaxResult.error(message); } /** * 返回错误码消息 */ - public AjaxResult error(int code, String message) - { + public AjaxResult error(int code, String message) { return AjaxResult.error(code, message); } /** * 页面跳转 */ - public String redirect(String url) - { + public String redirect(String url) { return StringUtils.format("redirect:{}", url); } - public SysUser getSysUser() - { + public SysUser getSysUser() { return ShiroUtils.getSysUser(); } - public void setSysUser(SysUser user) - { + public void setSysUser(SysUser user) { ShiroUtils.setSysUser(user); } - public Long getUserId() - { + public Long getUserId() { return getSysUser().getUserId(); } - public String getLoginName() - { + public String getLoginName() { return getSysUser().getLoginName(); } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java index 26aed47db..9cddeb3bd 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java @@ -1,16 +1,8 @@ package com.ruoyi.framework.web.domain; -import java.net.UnknownHostException; -import java.util.LinkedList; -import java.util.List; -import java.util.Properties; import com.ruoyi.common.utils.Arith; import com.ruoyi.common.utils.IpUtils; -import com.ruoyi.framework.web.domain.server.Cpu; -import com.ruoyi.framework.web.domain.server.Jvm; -import com.ruoyi.framework.web.domain.server.Mem; -import com.ruoyi.framework.web.domain.server.Sys; -import com.ruoyi.framework.web.domain.server.SysFile; +import com.ruoyi.framework.web.domain.server.*; import oshi.SystemInfo; import oshi.hardware.CentralProcessor; import oshi.hardware.CentralProcessor.TickType; @@ -21,16 +13,20 @@ import oshi.software.os.OSFileStore; import oshi.software.os.OperatingSystem; import oshi.util.Util; +import java.net.UnknownHostException; +import java.util.LinkedList; +import java.util.List; +import java.util.Properties; + /** - * 服务器相关信息 - * + * 服务器相关信息:包含CPU、JVM、内存、磁盘、服务器相关信息 + * * @author ruoyi */ -public class Server -{ - +public class Server { + private static final int OSHI_WAIT_SECOND = 1000; - + /** * CPU相关信息 */ @@ -56,58 +52,47 @@ public class Server */ private List sysFiles = new LinkedList(); - public Cpu getCpu() - { + public Cpu getCpu() { return cpu; } - public void setCpu(Cpu cpu) - { + public void setCpu(Cpu cpu) { this.cpu = cpu; } - public Mem getMem() - { + public Mem getMem() { return mem; } - public void setMem(Mem mem) - { + public void setMem(Mem mem) { this.mem = mem; } - public Jvm getJvm() - { + public Jvm getJvm() { return jvm; } - public void setJvm(Jvm jvm) - { + public void setJvm(Jvm jvm) { this.jvm = jvm; } - public Sys getSys() - { + public Sys getSys() { return sys; } - public void setSys(Sys sys) - { + public void setSys(Sys sys) { this.sys = sys; } - public List getSysFiles() - { + public List getSysFiles() { return sysFiles; } - public void setSysFiles(List sysFiles) - { + public void setSysFiles(List sysFiles) { this.sysFiles = sysFiles; } - public void copyTo() throws Exception - { + public void copyTo() throws Exception { SystemInfo si = new SystemInfo(); HardwareAbstractionLayer hal = si.getHardware(); @@ -125,8 +110,7 @@ public class Server /** * 设置CPU信息 */ - private void setCpuInfo(CentralProcessor processor) - { + private void setCpuInfo(CentralProcessor processor) { // CPU信息 long[] prevTicks = processor.getSystemCpuLoadTicks(); Util.sleep(OSHI_WAIT_SECOND); @@ -151,8 +135,7 @@ public class Server /** * 设置内存信息 */ - private void setMemInfo(GlobalMemory memory) - { + private void setMemInfo(GlobalMemory memory) { mem.setTotal(memory.getTotal()); mem.setUsed(memory.getTotal() - memory.getAvailable()); mem.setFree(memory.getAvailable()); @@ -161,8 +144,7 @@ public class Server /** * 设置服务器信息 */ - private void setSysInfo() - { + private void setSysInfo() { Properties props = System.getProperties(); sys.setComputerName(IpUtils.getHostName()); sys.setComputerIp(IpUtils.getHostIp()); @@ -174,8 +156,7 @@ public class Server /** * 设置Java虚拟机 */ - private void setJvmInfo() throws UnknownHostException - { + private void setJvmInfo() throws UnknownHostException { Properties props = System.getProperties(); jvm.setTotal(Runtime.getRuntime().totalMemory()); jvm.setMax(Runtime.getRuntime().maxMemory()); @@ -187,12 +168,10 @@ public class Server /** * 设置磁盘信息 */ - private void setSysFiles(OperatingSystem os) - { + private void setSysFiles(OperatingSystem os) { FileSystem fileSystem = os.getFileSystem(); OSFileStore[] fsArray = fileSystem.getFileStores(); - for (OSFileStore fs : fsArray) - { + for (OSFileStore fs : fsArray) { long free = fs.getUsableSpace(); long total = fs.getTotalSpace(); long used = total - free; @@ -210,31 +189,23 @@ public class Server /** * 字节转换 - * + * * @param size 字节大小 * @return 转换后值 */ - public String convertFileSize(long size) - { + public String convertFileSize(long size) { long kb = 1024; long mb = kb * 1024; long gb = mb * 1024; - if (size >= gb) - { + if (size >= gb) { return String.format("%.1f GB", (float) size / gb); - } - else if (size >= mb) - { + } else if (size >= mb) { float f = (float) size / mb; return String.format(f > 100 ? "%.0f MB" : "%.1f MB", f); - } - else if (size >= kb) - { + } else if (size >= kb) { float f = (float) size / kb; return String.format(f > 100 ? "%.0f KB" : "%.1f KB", f); - } - else - { + } else { return String.format("%d B", size); } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Cpu.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Cpu.java index cf7b46e1e..e45da15c5 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Cpu.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Cpu.java @@ -3,12 +3,11 @@ package com.ruoyi.framework.web.domain.server; import com.ruoyi.common.utils.Arith; /** - * CPU相关信息 - * + * CPU实体类:CPU相关信息 + * * @author ruoyi */ -public class Cpu -{ +public class Cpu { /** * 核心数 */ @@ -39,63 +38,51 @@ public class Cpu */ private double free; - public int getCpuNum() - { + public int getCpuNum() { return cpuNum; } - public void setCpuNum(int cpuNum) - { + public void setCpuNum(int cpuNum) { this.cpuNum = cpuNum; } - public double getTotal() - { + public double getTotal() { return Arith.round(Arith.mul(total, 100), 2); } - public void setTotal(double total) - { + public void setTotal(double total) { this.total = total; } - public double getSys() - { + public double getSys() { return Arith.round(Arith.mul(sys / total, 100), 2); } - public void setSys(double sys) - { + public void setSys(double sys) { this.sys = sys; } - public double getUsed() - { + public double getUsed() { return Arith.round(Arith.mul(used / total, 100), 2); } - public void setUsed(double used) - { + public void setUsed(double used) { this.used = used; } - public double getWait() - { + public double getWait() { return Arith.round(Arith.mul(wait / total, 100), 2); } - public void setWait(double wait) - { + public void setWait(double wait) { this.wait = wait; } - public double getFree() - { + public double getFree() { return Arith.round(Arith.mul(free / total, 100), 2); } - public void setFree(double free) - { + public void setFree(double free) { this.free = free; } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Jvm.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Jvm.java index f29d2cbe6..feafe1cbf 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Jvm.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Jvm.java @@ -1,16 +1,16 @@ package com.ruoyi.framework.web.domain.server; -import java.lang.management.ManagementFactory; import com.ruoyi.common.utils.Arith; import com.ruoyi.common.utils.DateUtils; +import java.lang.management.ManagementFactory; + /** - * JVM相关信息 - * + * JVM实体类:JVM相关信息 + * * @author ruoyi */ -public class Jvm -{ +public class Jvm { /** * 当前JVM占用的内存总数(M) */ @@ -36,87 +36,72 @@ public class Jvm */ private String home; - public double getTotal() - { + public double getTotal() { return Arith.div(total, (1024 * 1024), 2); } - public void setTotal(double total) - { + public void setTotal(double total) { this.total = total; } - public double getMax() - { + public double getMax() { return Arith.div(max, (1024 * 1024), 2); } - public void setMax(double max) - { + public void setMax(double max) { this.max = max; } - public double getFree() - { + public double getFree() { return Arith.div(free, (1024 * 1024), 2); } - public void setFree(double free) - { + public void setFree(double free) { this.free = free; } - public double getUsed() - { + public double getUsed() { return Arith.div(total - free, (1024 * 1024), 2); } - public double getUsage() - { + public double getUsage() { return Arith.mul(Arith.div(total - free, total, 4), 100); } /** * 获取JDK名称 */ - public String getName() - { + public String getName() { return ManagementFactory.getRuntimeMXBean().getVmName(); } - public String getVersion() - { + public String getVersion() { return version; } - public void setVersion(String version) - { + public void setVersion(String version) { this.version = version; } - public String getHome() - { + public String getHome() { return home; } - public void setHome(String home) - { + public void setHome(String home) { this.home = home; } /** * JDK启动时间 */ - public String getStartTime() - { + public String getStartTime() { return DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.getServerStartDate()); } /** * JDK运行时间 */ - public String getRunTime() - { + public String getRunTime() { return DateUtils.getDatePoor(DateUtils.getNowDate(), DateUtils.getServerStartDate()); } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Mem.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Mem.java index ac715049a..fd7f7f196 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Mem.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Mem.java @@ -3,12 +3,11 @@ package com.ruoyi.framework.web.domain.server; import com.ruoyi.common.utils.Arith; /** - * 內存相关信息 - * + * 内存实体类:內存相关信息 + * * @author ruoyi */ -public class Mem -{ +public class Mem { /** * 内存总量 */ @@ -24,38 +23,31 @@ public class Mem */ private double free; - public double getTotal() - { + public double getTotal() { return Arith.div(total, (1024 * 1024 * 1024), 2); } - public void setTotal(long total) - { + public void setTotal(long total) { this.total = total; } - public double getUsed() - { + public double getUsed() { return Arith.div(used, (1024 * 1024 * 1024), 2); } - public void setUsed(long used) - { + public void setUsed(long used) { this.used = used; } - public double getFree() - { + public double getFree() { return Arith.div(free, (1024 * 1024 * 1024), 2); } - public void setFree(long free) - { + public void setFree(long free) { this.free = free; } - public double getUsage() - { + public double getUsage() { return Arith.mul(Arith.div(used, total, 4), 100); } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Sys.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Sys.java index a5f65e46e..53fed344b 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Sys.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Sys.java @@ -1,12 +1,11 @@ package com.ruoyi.framework.web.domain.server; /** - * 系统相关信息 - * + * 系统实体类:系统相关信息 + * * @author ruoyi */ -public class Sys -{ +public class Sys { /** * 服务器名称 */ @@ -32,53 +31,43 @@ public class Sys */ private String osArch; - public String getComputerName() - { + public String getComputerName() { return computerName; } - public void setComputerName(String computerName) - { + public void setComputerName(String computerName) { this.computerName = computerName; } - public String getComputerIp() - { + public String getComputerIp() { return computerIp; } - public void setComputerIp(String computerIp) - { + public void setComputerIp(String computerIp) { this.computerIp = computerIp; } - public String getUserDir() - { + public String getUserDir() { return userDir; } - public void setUserDir(String userDir) - { + public void setUserDir(String userDir) { this.userDir = userDir; } - public String getOsName() - { + public String getOsName() { return osName; } - public void setOsName(String osName) - { + public void setOsName(String osName) { this.osName = osName; } - public String getOsArch() - { + public String getOsArch() { return osArch; } - public void setOsArch(String osArch) - { + public void setOsArch(String osArch) { this.osArch = osArch; } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/SysFile.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/SysFile.java index 47ecf3f3e..8ccc43ec1 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/SysFile.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/SysFile.java @@ -1,12 +1,11 @@ package com.ruoyi.framework.web.domain.server; /** - * 系统文件相关信息 - * + * 系统文件:系统文件相关信息 + * * @author ruoyi */ -public class SysFile -{ +public class SysFile { /** * 盘符路径 */ @@ -42,73 +41,59 @@ public class SysFile */ private double usage; - public String getDirName() - { + public String getDirName() { return dirName; } - public void setDirName(String dirName) - { + public void setDirName(String dirName) { this.dirName = dirName; } - public String getSysTypeName() - { + public String getSysTypeName() { return sysTypeName; } - public void setSysTypeName(String sysTypeName) - { + public void setSysTypeName(String sysTypeName) { this.sysTypeName = sysTypeName; } - public String getTypeName() - { + public String getTypeName() { return typeName; } - public void setTypeName(String typeName) - { + public void setTypeName(String typeName) { this.typeName = typeName; } - public String getTotal() - { + public String getTotal() { return total; } - public void setTotal(String total) - { + public void setTotal(String total) { this.total = total; } - public String getFree() - { + public String getFree() { return free; } - public void setFree(String free) - { + public void setFree(String free) { this.free = free; } - public String getUsed() - { + public String getUsed() { return used; } - public void setUsed(String used) - { + public void setUsed(String used) { this.used = used; } - public double getUsage() - { + public double getUsage() { return usage; } - public void setUsage(double usage) - { + public void setUsage(double usage) { this.usage = usage; } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/DefaultExceptionHandler.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/DefaultExceptionHandler.java index fece7ba37..cc2e47356 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/DefaultExceptionHandler.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/DefaultExceptionHandler.java @@ -1,32 +1,30 @@ package com.ruoyi.framework.web.exception; +import com.ruoyi.common.base.AjaxResult; +import com.ruoyi.common.exception.BusinessException; +import com.ruoyi.common.exception.DemoModeException; +import com.ruoyi.framework.util.PermissionUtils; import org.apache.shiro.authz.AuthorizationException; import org.slf4j.Logger; 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.exception.BusinessException; -import com.ruoyi.common.exception.DemoModeException; -import com.ruoyi.framework.util.PermissionUtils; /** * 自定义异常处理器 - * + * * @author ruoyi */ @RestControllerAdvice -public class DefaultExceptionHandler -{ +public class DefaultExceptionHandler { private static final Logger log = LoggerFactory.getLogger(DefaultExceptionHandler.class); /** * 权限校验失败 */ @ExceptionHandler(AuthorizationException.class) - public AjaxResult handleAuthorizationException(AuthorizationException e) - { + public AjaxResult handleAuthorizationException(AuthorizationException e) { log.error(e.getMessage(), e); return AjaxResult.error(PermissionUtils.getMsg(e.getMessage())); } @@ -34,9 +32,8 @@ public class DefaultExceptionHandler /** * 请求方式不支持 */ - @ExceptionHandler({ HttpRequestMethodNotSupportedException.class }) - public AjaxResult handleException(HttpRequestMethodNotSupportedException e) - { + @ExceptionHandler({HttpRequestMethodNotSupportedException.class}) + public AjaxResult handleException(HttpRequestMethodNotSupportedException e) { log.error(e.getMessage(), e); return AjaxResult.error("不支持' " + e.getMethod() + "'请求"); } @@ -45,8 +42,7 @@ public class DefaultExceptionHandler * 拦截未知的运行时异常 */ @ExceptionHandler(RuntimeException.class) - public AjaxResult notFount(RuntimeException e) - { + public AjaxResult notFount(RuntimeException e) { log.error("运行时异常:", e); return AjaxResult.error("运行时异常:" + e.getMessage()); } @@ -55,8 +51,7 @@ public class DefaultExceptionHandler * 系统异常 */ @ExceptionHandler(Exception.class) - public AjaxResult handleException(Exception e) - { + public AjaxResult handleException(Exception e) { log.error(e.getMessage(), e); return AjaxResult.error("服务器错误,请联系管理员"); } @@ -65,8 +60,7 @@ public class DefaultExceptionHandler * 业务异常 */ @ExceptionHandler(BusinessException.class) - public AjaxResult businessException(BusinessException e) - { + public AjaxResult businessException(BusinessException e) { log.error(e.getMessage(), e); return AjaxResult.error(e.getMessage()); } @@ -75,8 +69,7 @@ public class DefaultExceptionHandler * 演示模式异常 */ @ExceptionHandler(DemoModeException.class) - public AjaxResult demoModeException(DemoModeException e) - { + public AjaxResult demoModeException(DemoModeException e) { return AjaxResult.error("演示模式,不允许操作"); } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/base/BaseException.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/base/BaseException.java index a1e33f6f0..65ca5ae0b 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/base/BaseException.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/base/BaseException.java @@ -4,12 +4,11 @@ import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.util.MessageUtils; /** - * 基础异常 - * + * 基础异常,把平常容易出错且多次出现的异常封装在一起,方便管理和调用 + * * @author ruoyi */ -public class BaseException extends RuntimeException -{ +public class BaseException extends RuntimeException { private static final long serialVersionUID = 1L; /** @@ -32,66 +31,54 @@ public class BaseException extends RuntimeException */ private String defaultMessage; - public BaseException(String module, String code, Object[] args, String defaultMessage) - { + public BaseException(String module, String code, Object[] args, String defaultMessage) { this.module = module; this.code = code; this.args = args; this.defaultMessage = defaultMessage; } - public BaseException(String module, String code, Object[] args) - { + public BaseException(String module, String code, Object[] args) { this(module, code, args, null); } - public BaseException(String module, String defaultMessage) - { + public BaseException(String module, String defaultMessage) { this(module, null, null, defaultMessage); } - public BaseException(String code, Object[] args) - { + public BaseException(String code, Object[] args) { this(null, code, args, null); } - public BaseException(String defaultMessage) - { + public BaseException(String defaultMessage) { this(null, null, null, defaultMessage); } @Override - public String getMessage() - { + public String getMessage() { String message = null; - if (!StringUtils.isEmpty(code)) - { + if (!StringUtils.isEmpty(code)) { message = MessageUtils.message(code, args); } - if (message == null) - { + if (message == null) { message = defaultMessage; } return message; } - public String getModule() - { + public String getModule() { return module; } - public String getCode() - { + public String getCode() { return code; } - public Object[] getArgs() - { + public Object[] getArgs() { return args; } - public String getDefaultMessage() - { + public String getDefaultMessage() { return defaultMessage; } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/ConfigService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/ConfigService.java index 5ee1b3d8c..733ca38b8 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/ConfigService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/ConfigService.java @@ -1,28 +1,26 @@ package com.ruoyi.framework.web.service; +import com.ruoyi.system.service.ISysConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.ruoyi.system.service.ISysConfigService; /** - * RuoYi首创 html调用 thymeleaf 实现参数管理 - * + * 首创 html调用 thymeleaf 实现参数管理 + * * @author ruoyi */ @Service("config") -public class ConfigService -{ +public class ConfigService { @Autowired private ISysConfigService configService; /** * 根据键名查询参数配置信息 - * - * @param configName 参数名称 + * + * @param configKey 参数名称 * @return 参数键值 */ - public String getKey(String configKey) - { + public String getKey(String configKey) { return configService.selectConfigByKey(configKey); } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/DictService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/DictService.java index 64e7c8a0e..83a1a212e 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/DictService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/DictService.java @@ -1,42 +1,40 @@ package com.ruoyi.framework.web.service; -import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; import com.ruoyi.system.domain.SysDictData; import com.ruoyi.system.service.ISysDictDataService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; /** - * RuoYi首创 html调用 thymeleaf 实现字典读取 - * + * 首创 html调用 thymeleaf 实现字典读取 + * * @author ruoyi */ @Service("dict") -public class DictService -{ +public class DictService { @Autowired private ISysDictDataService dictDataService; /** * 根据字典类型查询字典数据信息 - * + * * @param dictType 字典类型 * @return 参数键值 */ - public List getType(String dictType) - { + public List getType(String dictType) { return dictDataService.selectDictDataByType(dictType); } /** * 根据字典类型和字典键值查询字典数据信息 - * - * @param dictType 字典类型 + * + * @param dictType 字典类型 * @param dictValue 字典键值 * @return 字典标签 */ - public String getLabel(String dictType, String dictValue) - { + public String getLabel(String dictType, String dictValue) { return dictDataService.selectDictLabel(dictType, dictValue); } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java index da0a352d6..dfaf29965 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java @@ -4,20 +4,17 @@ import org.apache.shiro.SecurityUtils; import org.springframework.stereotype.Service; /** - * RuoYi首创 js调用 thymeleaf 实现按钮权限可见性 - * + * 首创 js调用 thymeleaf 实现按钮权限可见性 + * * @author ruoyi */ @Service("permission") -public class PermissionService -{ - public String hasPermi(String permission) - { +public class PermissionService { + public String hasPermi(String permission) { return isPermittedOperator(permission) ? "" : "hidden"; } - private boolean isPermittedOperator(String permission) - { + private boolean isPermittedOperator(String permission) { return SecurityUtils.getSubject().isPermitted(permission); } }