diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/RedisKeyConstants.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/RedisKeyConstants.java index 24ad2f37..5db4eae5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/RedisKeyConstants.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/RedisKeyConstants.java @@ -17,6 +17,14 @@ public interface RedisKeyConstants { */ String DEPT_CHILDREN_ID_LIST = "dept_children_ids"; + /** + * 指定部门的所有子部门编号数组的缓存 + *
+ * KEY 格式:dept_child_ids:{id} + * VALUE 数据类型:String 子部门编号集合 + */ + String DEPT_CHILD_ID_LIST = "dept_child_ids"; + /** * 角色的缓存 *
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java
index 7a50dd1f..fc84275c 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java
@@ -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