refactor(system): 重命名部门子集缓存键

-将 DEPT_CHILDREN_ID_LIST重命名为 DEPT_CHILD_ID_LIST- 更新缓存键名以更好地反映其存储内容
This commit is contained in:
furongxin 2025-01-02 10:30:14 +08:00
parent fc212f9d9e
commit c2af2a8374
2 changed files with 9 additions and 1 deletions

View File

@ -17,6 +17,14 @@ public interface RedisKeyConstants {
*/
String DEPT_CHILDREN_ID_LIST = "dept_children_ids";
/**
* 指定部门的所有子部门编号数组的缓存
* <p>
* KEY 格式dept_child_ids:{id}
* VALUE 数据类型String 子部门编号集合
*/
String DEPT_CHILD_ID_LIST = "dept_child_ids";
/**
* 角色的缓存
* <p>

View File

@ -270,7 +270,7 @@ public class DeptServiceImpl implements DeptService {
@Override
@DataPermission(enable = false)
@Cacheable(cacheNames = RedisKeyConstants.DEPT_CHILDREN_ID_LIST, key = "#id")
@Cacheable(cacheNames = RedisKeyConstants.DEPT_CHILD_ID_LIST, key = "#id")
public List<DeptDO> getChildDept(Long id) {
return deptMapper.selectList(new LambdaQueryWrapperX<DeptDO>()