From c9c2487e41e49fc22e7a776fed30f17b4abd6c43 Mon Sep 17 00:00:00 2001 From: AprilWind <2100166581@qq.com> Date: Wed, 4 Nov 2026 11:11:38 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=89=A9=E5=B1=95=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=96=B9=E6=B3=95=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=B1=BB=E5=88=AB=E5=92=8C=E7=88=B6=E7=BA=A7?= =?UTF-8?q?ID=E5=AD=97=E6=AE=B5=EF=BC=8C=E5=B9=B6=E6=8C=89=E5=B1=82?= =?UTF-8?q?=E7=BA=A7=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/dromara/system/service/impl/SysDeptServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java index 700f1068f..1a5aa7793 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java @@ -180,9 +180,11 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService { @Override public List selectDeptByIds(Collection deptIds) { return deptMapper.selectDeptList(deptMapper.lambda() - .select(SysDept::getDeptId, SysDept::getDeptName, SysDept::getLeader) + .select(SysDept::getDeptId, SysDept::getDeptName, SysDept::getLeader, + SysDept::getDeptCategory, SysDept::getParentId, SysDept::getAncestors) .eq(SysDept::getStatus, SystemConstants.NORMAL) .in(CollUtil.isNotEmpty(deptIds), SysDept::getDeptId, deptIds) + .orderByAsc(SysDept::getAncestors, SysDept::getParentId, SysDept::getOrderNum, SysDept::getDeptId) .build()); }