mirror of https://gitee.com/stylefeng/roses
【7.6.0】【org】获取职务对应的用户列表接口
parent
8bdb40568f
commit
01ae37719b
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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<>();
|
||||
|
|
Loading…
Reference in New Issue