From 99476ad708202f3653e58478ad72ed23519745ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 3 Mar 2022 14:34:26 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90=20=E4=BB=8E=20aop=20=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=88=B0=20=E6=8B=A6=E6=88=AA=E5=99=A8=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BB=A3=E7=90=86=E5=A4=B1=E8=B4=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 3 +-- .../com/ruoyi/system/service/impl/SysRoleServiceImpl.java | 5 ++--- .../com/ruoyi/system/service/impl/SysUserServiceImpl.java | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index efddb0ed..f99bd455 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.ruoyi.common.core.constant.UserConstants; import com.ruoyi.common.core.exception.ServiceException; -import com.ruoyi.common.core.utils.SpringUtils; import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.core.utils.TreeBuildUtils; import com.ruoyi.common.satoken.utils.LoginHelper; @@ -163,7 +162,7 @@ public class SysDeptServiceImpl implements ISysDeptService { if (!LoginHelper.isAdmin()) { SysDept dept = new SysDept(); dept.setDeptId(deptId); - List depts = SpringUtils.getAopProxy(this).selectDeptList(dept); + List depts = this.selectDeptList(dept); if (CollUtil.isEmpty(depts)) { throw new ServiceException("没有权限访问部门数据!"); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java index ac74d658..e2242814 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java @@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.constant.UserConstants; import com.ruoyi.common.core.exception.ServiceException; -import com.ruoyi.common.core.utils.SpringUtils; import com.ruoyi.common.mybatis.core.page.PageQuery; import com.ruoyi.common.mybatis.core.page.TableDataInfo; import com.ruoyi.common.satoken.utils.LoginHelper; @@ -102,7 +101,7 @@ public class SysRoleServiceImpl implements ISysRoleService { */ @Override public List selectRoleAll() { - return SpringUtils.getAopProxy(this).selectRoleList(new SysRole()); + return this.selectRoleList(new SysRole()); } /** @@ -183,7 +182,7 @@ public class SysRoleServiceImpl implements ISysRoleService { if (!LoginHelper.isAdmin()) { SysRole role = new SysRole(); role.setRoleId(roleId); - List roles = SpringUtils.getAopProxy(this).selectRoleList(role); + List roles = this.selectRoleList(role); if (CollUtil.isEmpty(roles)) { throw new ServiceException("没有权限访问角色数据!"); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java index 5579b018..518ae301 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java @@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.constant.UserConstants; import com.ruoyi.common.core.exception.ServiceException; -import com.ruoyi.common.core.utils.SpringUtils; import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.mybatis.core.page.PageQuery; import com.ruoyi.common.mybatis.core.page.TableDataInfo; @@ -210,7 +209,7 @@ public class SysUserServiceImpl implements ISysUserService { if (!LoginHelper.isAdmin()) { SysUser user = new SysUser(); user.setUserId(userId); - List users = SpringUtils.getAopProxy(this).selectUserList(user); + List users = this.selectUserList(user); if (CollUtil.isEmpty(users)) { throw new ServiceException("没有权限访问用户数据!"); }