update: 扩展部门查询方法,增加部门类别和父级ID字段,并按层级排序

This commit is contained in:
AprilWind 2026-11-04 11:11:38 +08:00
parent 0e8d63ca47
commit c9c2487e41

View File

@ -180,9 +180,11 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
@Override
public List<SysDeptVo> selectDeptByIds(Collection<Long> 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());
}