【8.0】【org】更新分页查询机构条件组装

pull/57/head
fengshuonan 2023-07-14 19:14:04 +08:00
parent 3332890113
commit 73971934d3
1 changed files with 3 additions and 1 deletions

View File

@ -508,7 +508,9 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
Long orgId = hrOrganizationRequest.getOrgId(); Long orgId = hrOrganizationRequest.getOrgId();
if (orgId != null) { if (orgId != null) {
// 查询orgId对应的所有子机构包含本orgId // 查询orgId对应的所有子机构包含本orgId
queryWrapper.eq(HrOrganization::getOrgParentId, orgId); queryWrapper.nested(wrap -> {
wrap.eq(HrOrganization::getOrgParentId, orgId).or().eq(HrOrganization::getOrgId, orgId);
});
} }
// 根据排序正序查询 // 根据排序正序查询