fix 修复 数据权限缓存处理错误 null的清空下应该不缓存 直接返回-1

dev
疯狂的狮子Li 1 year ago
parent d812c74535
commit d5a91261a5

@ -40,7 +40,7 @@ public class RemoteDataScopeServiceImpl implements RemoteDataScopeService {
* @param roleId ID
* @return null
*/
@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)) {
@ -62,7 +62,7 @@ public class RemoteDataScopeServiceImpl implements RemoteDataScopeService {
* @param deptId ID
* @return null
*/
@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)) {

Loading…
Cancel
Save