【7.6.0】【org】获取职务对应的用户列表接口

dev-7.6.0-hang
fengshuonan 2023-05-26 13:44:51 +08:00
parent 8bdb40568f
commit 01ae37719b
2 changed files with 25 additions and 0 deletions

View File

@ -79,4 +79,12 @@ public interface UserOrgServiceApi {
*/
List<HrOrganizationDTO> getUserCompanyList();
/**
*
*
* @author fengshuonan
* @since 2023/5/26 11:29
*/
List<Long> getPositionUserList(Long orgId, Long positionId);
}

View File

@ -257,6 +257,23 @@ public class SysUserOrgServiceServiceImpl extends ServiceImpl<SysUserOrgMapper,
return results;
}
@Override
public List<Long> getPositionUserList(Long orgId, Long positionId) {
UserOrgRequest userOrgRequest = new UserOrgRequest();
userOrgRequest.setOrgId(orgId);
userOrgRequest.setPositionId(positionId);
LambdaQueryWrapper<SysUserOrg> wrapper = this.createWrapper(userOrgRequest);
List<SysUserOrg> list = this.list(wrapper);
if (ObjectUtil.isNotEmpty(list)) {
return list.stream().map(SysUserOrg::getUserId).collect(Collectors.toList());
} else {
return new ArrayList<>();
}
}
@Override
public Boolean getUserOrgFlag(Long orgId, Long positionId) {
LambdaQueryWrapper<SysUserOrg> queryWrapper = new LambdaQueryWrapper<>();