From fcebda8987a21a1a30e1fd3ec690bafed794b91f Mon Sep 17 00:00:00 2001 From: QianRj <14974713+qianrj@user.noreply.gitee.com> Date: Fri, 13 Dec 2024 20:37:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=BC=93=E5=AD=98=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dromara/system/service/impl/SysDataScopeServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDataScopeServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDataScopeServiceImpl.java index 470646f35..12a507203 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDataScopeServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDataScopeServiceImpl.java @@ -38,7 +38,7 @@ public class SysDataScopeServiceImpl implements ISysDataScopeService { * @param roleId 角色Id * @return 部门Id组 */ - @Cacheable(cacheNames = CacheNames.SYS_ROLE_CUSTOM, key = "#roleId") + @Cacheable(cacheNames = CacheNames.SYS_ROLE_CUSTOM, key = "#roleId", condition = "#roleId != null") @Override public String getRoleCustom(Long roleId) { if (ObjectUtil.isNull(roleId)) { @@ -60,7 +60,7 @@ public class SysDataScopeServiceImpl implements ISysDataScopeService { * @param deptId 部门Id * @return 部门Id组 */ - @Cacheable(cacheNames = CacheNames.SYS_DEPT_AND_CHILD, key = "#deptId") + @Cacheable(cacheNames = CacheNames.SYS_DEPT_AND_CHILD, key = "#deptId", condition = "#deptId != null") @Override public String getDeptAndChild(Long deptId) { if (ObjectUtil.isNull(deptId)) {