From f3c4c02d73fd30f0d3c301e96bbb6deb27999211 Mon Sep 17 00:00:00 2001 From: AprilWind <2100166581@qq.com> Date: Fri, 4 Jul 2025 18:39:54 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=98=AF=E5=90=A6=E6=9C=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/dromara/system/service/impl/SysRoleServiceImpl.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysRoleServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysRoleServiceImpl.java index 985743dbe..ff0bc2311 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysRoleServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysRoleServiceImpl.java @@ -257,11 +257,9 @@ public class SysRoleServiceImpl implements ISysRoleService, RoleService { if (LoginHelper.isSuperAdmin()) { return; } - List roles = this.selectRoleList(new SysRoleBo(roleId)); - if (CollUtil.isEmpty(roles)) { + if (baseMapper.selectRoleCount(Collections.singletonList(roleId)) == 0) { throw new ServiceException("没有权限访问角色数据!"); } - } /**