mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-11-05 14:49:43 +08:00
update: 扩展部门查询方法,增加部门类别和父级ID字段,并按层级排序
This commit is contained in:
parent
0e8d63ca47
commit
c9c2487e41
@ -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());
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user