!616 fix: 修复部门数据权限缓存错误

Merge pull request !616 from QianRj/dev
This commit is contained in:
疯狂的狮子Li 2024-12-14 14:30:14 +00:00 committed by Gitee
commit 2fb1c99f56
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -38,7 +38,7 @@ public class SysDataScopeServiceImpl implements ISysDataScopeService {
* @param roleId 角色Id * @param roleId 角色Id
* @return 部门Id组 * @return 部门Id组
*/ */
@Cacheable(cacheNames = CacheNames.SYS_ROLE_CUSTOM, key = "#roleId") @Cacheable(cacheNames = CacheNames.SYS_ROLE_CUSTOM, key = "#roleId", condition = "#roleId != null")
@Override @Override
public String getRoleCustom(Long roleId) { public String getRoleCustom(Long roleId) {
if (ObjectUtil.isNull(roleId)) { if (ObjectUtil.isNull(roleId)) {
@ -60,7 +60,7 @@ public class SysDataScopeServiceImpl implements ISysDataScopeService {
* @param deptId 部门Id * @param deptId 部门Id
* @return 部门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 @Override
public String getDeptAndChild(Long deptId) { public String getDeptAndChild(Long deptId) {
if (ObjectUtil.isNull(deptId)) { if (ObjectUtil.isNull(deptId)) {