fix 修复 数据权限 从 aop 切换到 拦截器 导致获取代理失败问题

This commit is contained in:
疯狂的狮子Li 2022-03-28 21:03:52 +08:00
parent 2cf283b8c6
commit 7c04240317
3 changed files with 4 additions and 4 deletions

View File

@ -155,7 +155,7 @@ public class SysDeptServiceImpl implements ISysDeptService {
if (!LoginHelper.isAdmin()) { if (!LoginHelper.isAdmin()) {
SysDept dept = new SysDept(); SysDept dept = new SysDept();
dept.setDeptId(deptId); dept.setDeptId(deptId);
List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept); List<SysDept> depts = this.selectDeptList(dept);
if (CollUtil.isEmpty(depts)) { if (CollUtil.isEmpty(depts)) {
throw new ServiceException("没有权限访问部门数据!"); throw new ServiceException("没有权限访问部门数据!");
} }

View File

@ -102,7 +102,7 @@ public class SysRoleServiceImpl implements ISysRoleService {
*/ */
@Override @Override
public List<SysRole> selectRoleAll() { 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()) { if (!LoginHelper.isAdmin()) {
SysRole role = new SysRole(); SysRole role = new SysRole();
role.setRoleId(roleId); role.setRoleId(roleId);
List<SysRole> roles = SpringUtils.getAopProxy(this).selectRoleList(role); List<SysRole> roles = this.selectRoleList(role);
if (CollUtil.isEmpty(roles)) { if (CollUtil.isEmpty(roles)) {
throw new ServiceException("没有权限访问角色数据!"); throw new ServiceException("没有权限访问角色数据!");
} }

View File

@ -209,7 +209,7 @@ public class SysUserServiceImpl implements ISysUserService {
if (!LoginHelper.isAdmin()) { if (!LoginHelper.isAdmin()) {
SysUser user = new SysUser(); SysUser user = new SysUser();
user.setUserId(userId); user.setUserId(userId);
List<SysUser> users = SpringUtils.getAopProxy(this).selectUserList(user); List<SysUser> users = this.selectUserList(user);
if (CollUtil.isEmpty(users)) { if (CollUtil.isEmpty(users)) {
throw new ServiceException("没有权限访问用户数据!"); throw new ServiceException("没有权限访问用户数据!");
} }