From c2af2a8374d479ed650c02a02031627834cd3186 Mon Sep 17 00:00:00 2001 From: furongxin <419481438@qq.com> Date: Thu, 2 Jan 2025 10:30:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor(system):=20=E9=87=8D=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E5=AD=90=E9=9B=86=E7=BC=93=E5=AD=98=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -将 DEPT_CHILDREN_ID_LIST重命名为 DEPT_CHILD_ID_LIST- 更新缓存键名以更好地反映其存储内容 --- .../yudao/module/system/dal/redis/RedisKeyConstants.java | 8 ++++++++ .../yudao/module/system/service/dept/DeptServiceImpl.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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