From 17f0c20242c6ee3d35b9ee8f677d747ed012423c Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 02 九月 2022 16:30:20 +0800 Subject: [PATCH] remove 移除maven docker插件 过于老旧功能缺陷大 使用idea自带的docker插件替代 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index 3ef5eb8..b309386 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -11,6 +11,7 @@ import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.helper.DataBaseHelper; import com.ruoyi.common.helper.LoginHelper; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.TreeBuildUtils; @@ -58,6 +59,18 @@ } /** + * 鏌ヨ閮ㄩ棬鏍戠粨鏋勪俊鎭� + * + * @param dept 閮ㄩ棬淇℃伅 + * @return 閮ㄩ棬鏍戜俊鎭泦鍚� + */ + @Override + public List<Tree<Long>> selectDeptTreeList(SysDept dept) { + List<SysDept> depts = this.selectDeptList(dept); + return buildDeptTreeSelect(depts); + } + + /** * 鏋勫缓鍓嶇鎵�闇�瑕佷笅鎷夋爲缁撴瀯 * * @param depts 閮ㄩ棬鍒楄〃 @@ -84,7 +97,7 @@ @Override public List<Long> selectDeptListByRoleId(Long roleId) { SysRole role = roleMapper.selectById(roleId); - return baseMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly()); + return baseMapper.selectDeptListByRoleId(roleId, role.getDeptCheckStrictly()); } /** @@ -108,7 +121,7 @@ public long selectNormalChildrenDeptById(Long deptId) { return baseMapper.selectCount(new LambdaQueryWrapper<SysDept>() .eq(SysDept::getStatus, UserConstants.DEPT_NORMAL) - .apply("find_in_set({0}, ancestors) <> 0", deptId)); + .apply(DataBaseHelper.findInSet(deptId, "ancestors"))); } /** @@ -234,7 +247,7 @@ */ public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) { List<SysDept> children = baseMapper.selectList(new LambdaQueryWrapper<SysDept>() - .apply("find_in_set({0},ancestors) <> 0", deptId)); + .apply(DataBaseHelper.findInSet(deptId, "ancestors"))); List<SysDept> list = new ArrayList<>(); for (SysDept child : children) { SysDept dept = new SysDept(); -- Gitblit v1.9.3