Ver Fonte

权限调整

RuoYi há 4 anos atrás
pai
commit
685e090f2f
54 ficheiros alterados com 152 adições e 120 exclusões
  1. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java
  2. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
  3. 3 3
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
  4. 2 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
  5. 2 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
  6. 3 3
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java
  7. 7 6
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
  8. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
  9. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
  10. 2 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
  11. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRegisterController.java
  12. 6 5
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
  13. 6 3
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
  14. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
  15. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java
  16. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java
  17. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
  18. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java
  19. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  20. 2 4
      ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java
  21. 1 2
      ruoyi-common/src/main/java/com/ruoyi/common/utils/LogUtils.java
  22. 2 12
      ruoyi-common/src/main/java/com/ruoyi/common/utils/ShiroUtils.java
  23. 3 10
      ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
  24. 3 3
      ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
  25. 2 2
      ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java
  26. 2 2
      ruoyi-framework/src/main/java/com/ruoyi/framework/manager/factory/AsyncFactory.java
  27. 23 6
      ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/realm/UserRealm.java
  28. 2 2
      ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/service/SysLoginService.java
  29. 1 1
      ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/service/SysPasswordService.java
  30. 2 2
      ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/service/SysRegisterService.java
  31. 30 0
      ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/util/AuthorizationUtils.java
  32. 2 2
      ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/filter/LogoutFilter.java
  33. 1 1
      ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/filter/captcha/CaptchaValidateFilter.java
  34. 2 2
      ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/filter/kickout/KickoutSessionFilter.java
  35. 2 2
      ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/filter/online/OnlineSessionFilter.java
  36. 1 1
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/DictService.java
  37. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
  38. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java
  39. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java
  40. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java
  41. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java
  42. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
  43. 2 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java
  44. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java
  45. 2 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java
  46. 3 3
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java
  47. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java
  48. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
  49. 2 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
  50. 2 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java
  51. 3 3
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
  52. 3 3
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
  53. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
  54. 2 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java

@@ -16,9 +16,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.enums.OnlineStatus;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.framework.shiro.session.OnlineSession;
 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;
 

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java

@@ -17,8 +17,8 @@ import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ShiroUtils;
 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;
 

+ 3 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java

@@ -16,11 +16,11 @@ import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.Ztree;
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysRole;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysDept;
-import com.ruoyi.system.domain.SysRole;
 import com.ruoyi.system.service.ISysDeptService;
 
 /**

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java

@@ -14,11 +14,11 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysDictData;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ShiroUtils;
 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;
 
 /**

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java

@@ -16,11 +16,11 @@ import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.Ztree;
+import com.ruoyi.common.core.domain.entity.SysDictType;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ShiroUtils;
 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;
 
 /**

+ 3 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java

@@ -11,14 +11,14 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import com.ruoyi.common.config.Global;
 import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.entity.SysMenu;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.utils.CookieUtils;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysMenu;
-import com.ruoyi.system.domain.SysUser;
 import com.ruoyi.system.service.ISysConfigService;
 import com.ruoyi.system.service.ISysMenuService;
 

+ 7 - 6
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java

@@ -16,10 +16,11 @@ import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.Ztree;
+import com.ruoyi.common.core.domain.entity.SysMenu;
+import com.ruoyi.common.core.domain.entity.SysRole;
 import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysMenu;
-import com.ruoyi.system.domain.SysRole;
+import com.ruoyi.common.utils.ShiroUtils;
+import com.ruoyi.framework.shiro.util.AuthorizationUtils;
 import com.ruoyi.system.service.ISysMenuService;
 
 /**
@@ -70,7 +71,7 @@ public class SysMenuController extends BaseController
         {
             return AjaxResult.warn("菜单已分配,不允许删除");
         }
-        ShiroUtils.clearCachedAuthorizationInfo();
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
         return toAjax(menuService.deleteMenuById(menuId));
     }
 
@@ -109,7 +110,7 @@ public class SysMenuController extends BaseController
             return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
         }
         menu.setCreateBy(ShiroUtils.getLoginName());
-        ShiroUtils.clearCachedAuthorizationInfo();
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
         return toAjax(menuService.insertMenu(menu));
     }
 
@@ -137,7 +138,7 @@ public class SysMenuController extends BaseController
             return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
         }
         menu.setUpdateBy(ShiroUtils.getLoginName());
-        ShiroUtils.clearCachedAuthorizationInfo();
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
         return toAjax(menuService.updateMenu(menu));
     }
 

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java

@@ -15,7 +15,7 @@ import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.framework.util.ShiroUtils;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.system.domain.SysNotice;
 import com.ruoyi.system.service.ISysNoticeService;
 

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java

@@ -17,8 +17,8 @@ import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ShiroUtils;
 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;
 

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java

@@ -15,12 +15,12 @@ import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.config.Global;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.framework.shiro.service.SysPasswordService;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysUser;
 import com.ruoyi.system.service.ISysUserService;
 
 /**

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRegisterController.java

@@ -8,8 +8,8 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.framework.shiro.service.SysRegisterService;
-import com.ruoyi.system.domain.SysUser;
 import com.ruoyi.system.service.ISysConfigService;
 
 /**

+ 6 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java

@@ -15,12 +15,13 @@ import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysRole;
-import com.ruoyi.system.domain.SysUser;
+import com.ruoyi.framework.shiro.util.AuthorizationUtils;
 import com.ruoyi.system.domain.SysUserRole;
 import com.ruoyi.system.service.ISysRoleService;
 import com.ruoyi.system.service.ISysUserService;
@@ -97,7 +98,7 @@ public class SysRoleController extends BaseController
             return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
         }
         role.setCreateBy(ShiroUtils.getLoginName());
-        ShiroUtils.clearCachedAuthorizationInfo();
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
         return toAjax(roleService.insertRole(role));
 
     }
@@ -131,7 +132,7 @@ public class SysRoleController extends BaseController
             return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
         }
         role.setUpdateBy(ShiroUtils.getLoginName());
-        ShiroUtils.clearCachedAuthorizationInfo();
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
         return toAjax(roleService.updateRole(role));
     }
 

+ 6 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -17,14 +17,15 @@ import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ShiroUtils;
 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.system.domain.SysRole;
-import com.ruoyi.system.domain.SysUser;
+import com.ruoyi.framework.shiro.util.AuthorizationUtils;
 import com.ruoyi.system.service.ISysPostService;
 import com.ruoyi.system.service.ISysRoleService;
 import com.ruoyi.system.service.ISysUserService;
@@ -176,6 +177,7 @@ public class SysUserController extends BaseController
             return error("修改用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
         }
         user.setUpdateBy(ShiroUtils.getLoginName());
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
         return toAjax(userService.updateUser(user));
     }
 
@@ -231,6 +233,7 @@ public class SysUserController extends BaseController
     public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
     {
         userService.insertUserAuth(userId, roleIds);
+        AuthorizationUtils.clearAllCachedAuthorizationInfo();
         return success();
     }
 

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java → ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java

@@ -1,4 +1,4 @@
-package com.ruoyi.system.domain;
+package com.ruoyi.common.core.domain.entity;
 
 import javax.validation.constraints.*;
 import org.apache.commons.lang3.builder.ToStringBuilder;

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java → ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java

@@ -1,4 +1,4 @@
-package com.ruoyi.system.domain;
+package com.ruoyi.common.core.domain.entity;
 
 import javax.validation.constraints.*;
 import org.apache.commons.lang3.builder.ToStringBuilder;

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java → ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java

@@ -1,4 +1,4 @@
-package com.ruoyi.system.domain;
+package com.ruoyi.common.core.domain.entity;
 
 import javax.validation.constraints.*;
 import org.apache.commons.lang3.builder.ToStringBuilder;

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java → ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java

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

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java → ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java

@@ -1,4 +1,4 @@
-package com.ruoyi.system.domain;
+package com.ruoyi.common.core.domain.entity;
 
 import javax.validation.constraints.*;
 import org.apache.commons.lang3.builder.ToStringBuilder;

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java → ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java

@@ -1,4 +1,4 @@
-package com.ruoyi.system.domain;
+package com.ruoyi.common.core.domain.entity;
 
 import java.util.Date;
 import java.util.List;

+ 2 - 4
ruoyi-system/src/main/java/com/ruoyi/system/utils/DictUtils.java → ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java

@@ -1,11 +1,9 @@
-package com.ruoyi.system.utils;
+package com.ruoyi.common.utils;
 
 import java.util.List;
 import org.springframework.stereotype.Component;
 import com.ruoyi.common.constant.Constants;
-import com.ruoyi.common.utils.CacheUtils;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.system.domain.SysDictData;
+import com.ruoyi.common.core.domain.entity.SysDictData;
 
 /**
  * 字典工具类

+ 1 - 2
ruoyi-framework/src/main/java/com/ruoyi/framework/util/LogUtils.java → ruoyi-common/src/main/java/com/ruoyi/common/utils/LogUtils.java

@@ -1,4 +1,4 @@
-package com.ruoyi.framework.util;
+package com.ruoyi.common.utils;
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
@@ -8,7 +8,6 @@ import org.apache.shiro.SecurityUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import com.ruoyi.common.json.JSON;
-import com.ruoyi.common.utils.IpUtils;
 
 /**
  * 处理并记录日志文件

+ 2 - 12
ruoyi-framework/src/main/java/com/ruoyi/framework/util/ShiroUtils.java → ruoyi-common/src/main/java/com/ruoyi/common/utils/ShiroUtils.java

@@ -1,16 +1,13 @@
-package com.ruoyi.framework.util;
+package com.ruoyi.common.utils;
 
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.crypto.SecureRandomNumberGenerator;
-import org.apache.shiro.mgt.RealmSecurityManager;
 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.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.bean.BeanUtils;
-import com.ruoyi.framework.shiro.realm.UserRealm;
-import com.ruoyi.system.domain.SysUser;
 
 /**
  * shiro 工具类
@@ -56,13 +53,6 @@ public class ShiroUtils
         subject.runAs(newPrincipalCollection);
     }
 
-    public static void clearCachedAuthorizationInfo()
-    {
-        RealmSecurityManager rsm = (RealmSecurityManager) SecurityUtils.getSecurityManager();
-        UserRealm realm = (UserRealm) rsm.getRealms().iterator().next();
-        realm.clearCachedAuthorizationInfo();
-    }
-
     public static Long getUserId()
     {
         return getSysUser().getUserId().longValue();

+ 3 - 10
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

@@ -6,7 +6,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.lang.reflect.Field;
-import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.text.DecimalFormat;
 import java.util.ArrayList;
@@ -51,9 +50,9 @@ import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.exception.BusinessException;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.DictUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.reflect.ReflectUtils;
-import com.ruoyi.common.utils.spring.SpringUtils;
 
 /**
  * Excel相关处理
@@ -746,10 +745,7 @@ public class ExcelUtil<T>
      */
     public static String convertDictByExp(String dictValue, String dictType, String separator) throws Exception
     {
-        Object bean = SpringUtils.getBean("dictUtils");
-        String methodName = "getDictLabel";
-        Method method = bean.getClass().getDeclaredMethod(methodName, String.class, String.class, String.class);
-        return Convert.toStr(method.invoke(bean, dictType, dictValue, separator));
+        return DictUtils.getDictLabel(dictType, dictValue, separator);
     }
 
     /**
@@ -762,10 +758,7 @@ public class ExcelUtil<T>
      */
     public static String reverseDictByExp(String dictLabel, String dictType, String separator) throws Exception
     {
-        Object bean = SpringUtils.getBean("dictUtils");
-        String methodName = "getDictValue";
-        Method method = bean.getClass().getDeclaredMethod(methodName, String.class, String.class, String.class);
-        return Convert.toStr(method.invoke(bean, dictType, dictLabel, separator));
+        return DictUtils.getDictValue(dictType, dictLabel, separator);
     }
 
     /**

+ 3 - 3
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java

@@ -10,10 +10,10 @@ import org.aspectj.lang.reflect.MethodSignature;
 import org.springframework.stereotype.Component;
 import com.ruoyi.common.annotation.DataScope;
 import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysRole;
-import com.ruoyi.system.domain.SysUser;
 
 /**
  * 数据过滤处理

+ 2 - 2
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java

@@ -15,15 +15,15 @@ import org.springframework.stereotype.Component;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.support.spring.PropertyPreFilters;
 import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.enums.BusinessStatus;
 import com.ruoyi.common.json.JSON;
 import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.framework.manager.AsyncManager;
 import com.ruoyi.framework.manager.factory.AsyncFactory;
-import com.ruoyi.framework.util.ShiroUtils;
 import com.ruoyi.system.domain.SysOperLog;
-import com.ruoyi.system.domain.SysUser;
 
 /**
  * 操作日志记录处理

+ 2 - 2
ruoyi-framework/src/main/java/com/ruoyi/framework/manager/factory/AsyncFactory.java

@@ -5,12 +5,12 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.utils.AddressUtils;
+import com.ruoyi.common.utils.LogUtils;
 import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.framework.shiro.session.OnlineSession;
-import com.ruoyi.framework.util.LogUtils;
-import com.ruoyi.framework.util.ShiroUtils;
 import com.ruoyi.system.domain.SysLogininfor;
 import com.ruoyi.system.domain.SysOperLog;
 import com.ruoyi.system.domain.SysUserOnline;

+ 23 - 6
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/realm/UserRealm.java

@@ -2,7 +2,6 @@ package com.ruoyi.framework.shiro.realm;
 
 import java.util.HashSet;
 import java.util.Set;
-import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.AuthenticationInfo;
 import org.apache.shiro.authc.AuthenticationToken;
@@ -14,20 +13,22 @@ import org.apache.shiro.authc.UnknownAccountException;
 import org.apache.shiro.authc.UsernamePasswordToken;
 import org.apache.shiro.authz.AuthorizationInfo;
 import org.apache.shiro.authz.SimpleAuthorizationInfo;
+import org.apache.shiro.cache.Cache;
 import org.apache.shiro.realm.AuthorizingRealm;
 import org.apache.shiro.subject.PrincipalCollection;
+import org.apache.shiro.subject.SimplePrincipalCollection;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.exception.user.CaptchaException;
 import com.ruoyi.common.exception.user.RoleBlockedException;
 import com.ruoyi.common.exception.user.UserBlockedException;
 import com.ruoyi.common.exception.user.UserNotExistsException;
 import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
 import com.ruoyi.common.exception.user.UserPasswordRetryLimitExceedException;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.framework.shiro.service.SysLoginService;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysUser;
 import com.ruoyi.system.service.ISysMenuService;
 import com.ruoyi.system.service.ISysRoleService;
 
@@ -132,10 +133,26 @@ public class UserRealm extends AuthorizingRealm
     }
 
     /**
-     * 清理缓存权限
+     * 清理指定用户授权信息缓存
      */
-    public void clearCachedAuthorizationInfo()
+    public void clearCachedAuthorizationInfo(Object principal)
     {
-        this.clearCachedAuthorizationInfo(SecurityUtils.getSubject().getPrincipals());
+        SimplePrincipalCollection principals = new SimplePrincipalCollection(principal, getName());
+        this.clearCachedAuthorizationInfo(principals);
+    }
+
+    /**
+     * 清理所有用户授权信息缓存
+     */
+    public void clearAllCachedAuthorizationInfo()
+    {
+        Cache<Object, AuthorizationInfo> cache = getAuthorizationCache();
+        if (cache != null)
+        {
+            for (Object key : cache.keys())
+            {
+                cache.remove(key);
+            }
+        }
     }
 }

+ 2 - 2
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/service/SysLoginService.java

@@ -6,6 +6,7 @@ import org.springframework.util.StringUtils;
 import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.constant.ShiroConstants;
 import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.enums.UserStatus;
 import com.ruoyi.common.exception.user.CaptchaException;
 import com.ruoyi.common.exception.user.UserBlockedException;
@@ -15,10 +16,9 @@ import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.MessageUtils;
 import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.framework.manager.AsyncManager;
 import com.ruoyi.framework.manager.factory.AsyncFactory;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysUser;
 import com.ruoyi.system.service.ISysUserService;
 
 /**

+ 1 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/service/SysPasswordService.java

@@ -10,12 +10,12 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.constant.ShiroConstants;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
 import com.ruoyi.common.exception.user.UserPasswordRetryLimitExceedException;
 import com.ruoyi.common.utils.MessageUtils;
 import com.ruoyi.framework.manager.AsyncManager;
 import com.ruoyi.framework.manager.factory.AsyncFactory;
-import com.ruoyi.system.domain.SysUser;
 
 /**
  * 登录密码方法

+ 2 - 2
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/service/SysRegisterService.java

@@ -6,13 +6,13 @@ import org.springframework.util.StringUtils;
 import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.constant.ShiroConstants;
 import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.MessageUtils;
 import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.framework.manager.AsyncManager;
 import com.ruoyi.framework.manager.factory.AsyncFactory;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysUser;
 import com.ruoyi.system.service.ISysUserService;
 
 /**

+ 30 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/util/AuthorizationUtils.java

@@ -0,0 +1,30 @@
+package com.ruoyi.framework.shiro.util;
+
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.mgt.RealmSecurityManager;
+import com.ruoyi.framework.shiro.realm.UserRealm;
+
+/**
+ * 用户授权信息
+ * 
+ * @author ruoyi
+ */
+public class AuthorizationUtils
+{
+    /**
+     * 清理所有用户授权信息缓存
+     */
+    public static void clearAllCachedAuthorizationInfo()
+    {
+        getUserRealm().clearAllCachedAuthorizationInfo();
+    }
+
+    /**
+     * 获取自定义Realm
+     */
+    public static UserRealm getUserRealm()
+    {
+        RealmSecurityManager rsm = (RealmSecurityManager) SecurityUtils.getSecurityManager();
+        return (UserRealm) rsm.getRealms().iterator().next();
+    }
+}

+ 2 - 2
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/filter/LogoutFilter.java

@@ -7,13 +7,13 @@ import org.apache.shiro.subject.Subject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.MessageUtils;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.framework.manager.AsyncManager;
 import com.ruoyi.framework.manager.factory.AsyncFactory;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysUser;
 import com.ruoyi.system.service.ISysUserOnlineService;
 
 /**

+ 1 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/filter/captcha/CaptchaValidateFilter.java

@@ -6,8 +6,8 @@ import javax.servlet.http.HttpServletRequest;
 import org.apache.shiro.web.filter.AccessControlFilter;
 import com.google.code.kaptcha.Constants;
 import com.ruoyi.common.constant.ShiroConstants;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.framework.util.ShiroUtils;
 
 /**
  * 验证码过滤器

+ 2 - 2
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/filter/kickout/KickoutSessionFilter.java

@@ -19,9 +19,9 @@ import org.apache.shiro.web.util.WebUtils;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.ruoyi.common.constant.ShiroConstants;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.ServletUtils;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysUser;
+import com.ruoyi.common.utils.ShiroUtils;
 
 /**
  * 登录帐号控制过滤器

+ 2 - 2
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/filter/online/OnlineSessionFilter.java

@@ -10,11 +10,11 @@ import org.apache.shiro.web.util.WebUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import com.ruoyi.common.constant.ShiroConstants;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.enums.OnlineStatus;
+import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.framework.shiro.session.OnlineSession;
 import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
-import com.ruoyi.framework.util.ShiroUtils;
-import com.ruoyi.system.domain.SysUser;
 
 /**
  * 自定义访问控制

+ 1 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/DictService.java

@@ -3,7 +3,7 @@ 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.common.core.domain.entity.SysDictData;
 import com.ruoyi.system.service.ISysDictDataService;
 import com.ruoyi.system.service.ISysDictTypeService;
 

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java

@@ -2,7 +2,7 @@ package com.ruoyi.system.mapper;
 
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
-import com.ruoyi.system.domain.SysDept;
+import com.ruoyi.common.core.domain.entity.SysDept;
 
 /**
  * 部门管理 数据层

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java

@@ -2,7 +2,7 @@ package com.ruoyi.system.mapper;
 
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
-import com.ruoyi.system.domain.SysDictData;
+import com.ruoyi.common.core.domain.entity.SysDictData;
 
 /**
  * 字典表 数据层

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java

@@ -1,7 +1,7 @@
 package com.ruoyi.system.mapper;
 
 import java.util.List;
-import com.ruoyi.system.domain.SysDictType;
+import com.ruoyi.common.core.domain.entity.SysDictType;
 
 /**
  * 字典表 数据层

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java

@@ -2,7 +2,7 @@ package com.ruoyi.system.mapper;
 
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
-import com.ruoyi.system.domain.SysMenu;
+import com.ruoyi.common.core.domain.entity.SysMenu;
 
 /**
  * 菜单表 数据层

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java

@@ -1,7 +1,7 @@
 package com.ruoyi.system.mapper;
 
 import java.util.List;
-import com.ruoyi.system.domain.SysRole;
+import com.ruoyi.common.core.domain.entity.SysRole;
 
 /**
  * 角色表 数据层

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java

@@ -1,7 +1,7 @@
 package com.ruoyi.system.mapper;
 
 import java.util.List;
-import com.ruoyi.system.domain.SysUser;
+import com.ruoyi.common.core.domain.entity.SysUser;
 
 /**
  * 用户表 数据层

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java

@@ -2,8 +2,8 @@ package com.ruoyi.system.service;
 
 import java.util.List;
 import com.ruoyi.common.core.domain.Ztree;
-import com.ruoyi.system.domain.SysDept;
-import com.ruoyi.system.domain.SysRole;
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysRole;
 
 /**
  * 部门管理 服务层

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java

@@ -1,7 +1,7 @@
 package com.ruoyi.system.service;
 
 import java.util.List;
-import com.ruoyi.system.domain.SysDictData;
+import com.ruoyi.common.core.domain.entity.SysDictData;
 
 /**
  * 字典 业务层

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java

@@ -2,8 +2,8 @@ package com.ruoyi.system.service;
 
 import java.util.List;
 import com.ruoyi.common.core.domain.Ztree;
-import com.ruoyi.system.domain.SysDictData;
-import com.ruoyi.system.domain.SysDictType;
+import com.ruoyi.common.core.domain.entity.SysDictData;
+import com.ruoyi.common.core.domain.entity.SysDictType;
 
 /**
  * 字典 业务层

+ 3 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java

@@ -4,9 +4,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 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;
+import com.ruoyi.common.core.domain.entity.SysMenu;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
 
 /**
  * 菜单 业务层

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java

@@ -2,7 +2,7 @@ package com.ruoyi.system.service;
 
 import java.util.List;
 import java.util.Set;
-import com.ruoyi.system.domain.SysRole;
+import com.ruoyi.common.core.domain.entity.SysRole;
 import com.ruoyi.system.domain.SysUserRole;
 
 /**

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java

@@ -1,7 +1,7 @@
 package com.ruoyi.system.service;
 
 import java.util.List;
-import com.ruoyi.system.domain.SysUser;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.system.domain.SysUserRole;
 
 /**

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java

@@ -10,10 +10,10 @@ import org.springframework.transaction.annotation.Transactional;
 import com.ruoyi.common.annotation.DataScope;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.domain.Ztree;
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysRole;
 import com.ruoyi.common.exception.BusinessException;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.system.domain.SysDept;
-import com.ruoyi.system.domain.SysRole;
 import com.ruoyi.system.mapper.SysDeptMapper;
 import com.ruoyi.system.service.ISysDeptService;
 

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java

@@ -3,11 +3,11 @@ package com.ruoyi.system.service.impl;
 import java.util.List;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import com.ruoyi.common.core.domain.entity.SysDictData;
 import com.ruoyi.common.core.text.Convert;
-import com.ruoyi.system.domain.SysDictData;
+import com.ruoyi.common.utils.DictUtils;
 import com.ruoyi.system.mapper.SysDictDataMapper;
 import com.ruoyi.system.service.ISysDictDataService;
-import com.ruoyi.system.utils.DictUtils;
 
 /**
  * 字典 业务层处理

+ 3 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java

@@ -8,15 +8,15 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.domain.Ztree;
+import com.ruoyi.common.core.domain.entity.SysDictData;
+import com.ruoyi.common.core.domain.entity.SysDictType;
 import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.exception.BusinessException;
+import com.ruoyi.common.utils.DictUtils;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.system.domain.SysDictData;
-import com.ruoyi.system.domain.SysDictType;
 import com.ruoyi.system.mapper.SysDictDataMapper;
 import com.ruoyi.system.mapper.SysDictTypeMapper;
 import com.ruoyi.system.service.ISysDictTypeService;
-import com.ruoyi.system.utils.DictUtils;
 
 /**
  * 字典 业务层处理

+ 3 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java

@@ -13,10 +13,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.domain.Ztree;
+import com.ruoyi.common.core.domain.entity.SysMenu;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.system.domain.SysMenu;
-import com.ruoyi.system.domain.SysRole;
-import com.ruoyi.system.domain.SysUser;
 import com.ruoyi.system.mapper.SysMenuMapper;
 import com.ruoyi.system.mapper.SysRoleMenuMapper;
 import com.ruoyi.system.service.ISysMenuService;

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java

@@ -10,11 +10,11 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import com.ruoyi.common.annotation.DataScope;
 import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.domain.entity.SysRole;
 import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.exception.BusinessException;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.spring.SpringUtils;
-import com.ruoyi.system.domain.SysRole;
 import com.ruoyi.system.domain.SysRoleDept;
 import com.ruoyi.system.domain.SysRoleMenu;
 import com.ruoyi.system.domain.SysUserRole;

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java

@@ -9,13 +9,13 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import com.ruoyi.common.annotation.DataScope;
 import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.exception.BusinessException;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.security.Md5Utils;
 import com.ruoyi.system.domain.SysPost;
-import com.ruoyi.system.domain.SysRole;
-import com.ruoyi.system.domain.SysUser;
 import com.ruoyi.system.domain.SysUserPost;
 import com.ruoyi.system.domain.SysUserRole;
 import com.ruoyi.system.mapper.SysPostMapper;