From 78d0e67987ae1d8cc350308e8369fe817019290d Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 09 三月 2022 12:11:34 +0800 Subject: [PATCH] update 处理 find_in_set 函数多类型数据库兼容性问题 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 4 ++-- 1 files changed, 2 insertions(+), 2 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 3875c91..3ef5eb8 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 @@ -108,7 +108,7 @@ public long selectNormalChildrenDeptById(Long deptId) { return baseMapper.selectCount(new LambdaQueryWrapper<SysDept>() .eq(SysDept::getStatus, UserConstants.DEPT_NORMAL) - .apply("find_in_set({0}, ancestors)", deptId)); + .apply("find_in_set({0}, ancestors) <> 0", deptId)); } /** @@ -234,7 +234,7 @@ */ public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) { List<SysDept> children = baseMapper.selectList(new LambdaQueryWrapper<SysDept>() - .apply("find_in_set({0},ancestors)", deptId)); + .apply("find_in_set({0},ancestors) <> 0", deptId)); List<SysDept> list = new ArrayList<>(); for (SysDept child : children) { SysDept dept = new SysDept(); -- Gitblit v1.9.3