mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	fix 修复 数据权限 从 aop 切换到 拦截器 导致获取代理失败问题
This commit is contained in:
		@@ -155,7 +155,7 @@ public class SysDeptServiceImpl implements ISysDeptService {
 | 
			
		||||
        if (!LoginHelper.isAdmin()) {
 | 
			
		||||
            SysDept dept = new SysDept();
 | 
			
		||||
            dept.setDeptId(deptId);
 | 
			
		||||
            List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept);
 | 
			
		||||
            List<SysDept> depts = this.selectDeptList(dept);
 | 
			
		||||
            if (CollUtil.isEmpty(depts)) {
 | 
			
		||||
                throw new ServiceException("没有权限访问部门数据!");
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -102,7 +102,7 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysRole> selectRoleAll() {
 | 
			
		||||
        return SpringUtils.getAopProxy(this).selectRoleList(new SysRole());
 | 
			
		||||
        return this.selectRoleList(new SysRole());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -183,7 +183,7 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
        if (!LoginHelper.isAdmin()) {
 | 
			
		||||
            SysRole role = new SysRole();
 | 
			
		||||
            role.setRoleId(roleId);
 | 
			
		||||
            List<SysRole> roles = SpringUtils.getAopProxy(this).selectRoleList(role);
 | 
			
		||||
            List<SysRole> roles = this.selectRoleList(role);
 | 
			
		||||
            if (CollUtil.isEmpty(roles)) {
 | 
			
		||||
                throw new ServiceException("没有权限访问角色数据!");
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -209,7 +209,7 @@ public class SysUserServiceImpl implements ISysUserService {
 | 
			
		||||
        if (!LoginHelper.isAdmin()) {
 | 
			
		||||
            SysUser user = new SysUser();
 | 
			
		||||
            user.setUserId(userId);
 | 
			
		||||
            List<SysUser> users = SpringUtils.getAopProxy(this).selectUserList(user);
 | 
			
		||||
            List<SysUser> users = this.selectUserList(user);
 | 
			
		||||
            if (CollUtil.isEmpty(users)) {
 | 
			
		||||
                throw new ServiceException("没有权限访问用户数据!");
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user