From cc2624d08e422c36a4f93cc15d0ca0f0b7b4951a Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 17 一月 2022 15:46:28 +0800 Subject: [PATCH] update 优化加载字典缓存数据 --- ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java | 17 ++++------------- 1 files changed, 4 insertions(+), 13 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java index ea6afa2..70fda9a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java @@ -1,7 +1,6 @@ package com.ruoyi.system.service; -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.common.core.domain.TreeSelect; +import cn.hutool.core.lang.tree.Tree; import com.ruoyi.common.core.domain.entity.SysDept; import java.util.List; @@ -11,7 +10,7 @@ * * @author Lion Li */ -public interface ISysDeptService extends IService<SysDept> { +public interface ISysDeptService { /** * 鏌ヨ閮ㄩ棬绠$悊鏁版嵁 * @@ -21,20 +20,12 @@ List<SysDept> selectDeptList(SysDept dept); /** - * 鏋勫缓鍓嶇鎵�闇�瑕佹爲缁撴瀯 - * - * @param depts 閮ㄩ棬鍒楄〃 - * @return 鏍戠粨鏋勫垪琛� - */ - List<SysDept> buildDeptTree(List<SysDept> depts); - - /** * 鏋勫缓鍓嶇鎵�闇�瑕佷笅鎷夋爲缁撴瀯 * * @param depts 閮ㄩ棬鍒楄〃 * @return 涓嬫媺鏍戠粨鏋勫垪琛� */ - List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts); + List<Tree<Long>> buildDeptTreeSelect(List<SysDept> depts); /** * 鏍规嵁瑙掕壊ID鏌ヨ閮ㄩ棬鏍戜俊鎭� @@ -42,7 +33,7 @@ * @param roleId 瑙掕壊ID * @return 閫変腑閮ㄩ棬鍒楄〃 */ - List<Integer> selectDeptListByRoleId(Long roleId); + List<Long> selectDeptListByRoleId(Long roleId); /** * 鏍规嵁閮ㄩ棬ID鏌ヨ淇℃伅 -- Gitblit v1.9.3