From 653bf849292826f389b8ff58f9584d1f7e179b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 13 Oct 2023 10:48:58 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9D=83=E9=99=90=20=E5=87=8F=E5=B0=91=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E6=A0=A1=E9=AA=8C=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/service/impl/SysDataScopeServiceImpl.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDataScopeServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDataScopeServiceImpl.java index 9c5a2122..d7ba934f 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDataScopeServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDataScopeServiceImpl.java @@ -49,11 +49,8 @@ public class SysDataScopeServiceImpl implements ISysDataScopeService { .apply(DataBaseHelper.findInSet(deptId, "ancestors"))); List ids = StreamUtils.toList(deptList, SysDept::getDeptId); ids.add(deptId); - List list = deptMapper.selectList(new LambdaQueryWrapper() - .select(SysDept::getDeptId) - .in(SysDept::getDeptId, ids)); - if (CollUtil.isNotEmpty(list)) { - return StreamUtils.join(list, d -> Convert.toStr(d.getDeptId())); + if (CollUtil.isNotEmpty(ids)) { + return StreamUtils.join(ids, Convert::toStr); } return null; }