update
This commit is contained in:
parent
d9cdc7293c
commit
01b59e1f66
|
@ -158,9 +158,18 @@ public class RecruitmentServiceImpl extends BaseService<RecruitmentMapper, Recru
|
|||
to.mkdirs();
|
||||
}
|
||||
Organization organization = organizationMapper.selectById(id);
|
||||
if (ObjectUtil.isNull(organization)) {
|
||||
throw new ResultException("数据不存在!");
|
||||
}
|
||||
CompanyName companyName = companyNameMapper.selectById(organization.getCompanyId());
|
||||
if (ObjectUtil.isNull(companyName)) {
|
||||
throw new ResultException("数据不存在!");
|
||||
}
|
||||
List<Recruitment> recruitments = recruitmentMapper.selectList(Wrappers.lambdaQuery(Recruitment.class).eq(Recruitment::getCompanyId, organization.getId()));
|
||||
long sum = recruitments.stream().mapToLong(Recruitment::getPlaces).sum();
|
||||
long sum = 0;
|
||||
if (CollUtil.isNotEmpty(recruitments)) {
|
||||
sum = recruitments.stream().mapToLong(Recruitment::getPlaces).sum();
|
||||
}
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("name", companyName.getCompanyName());
|
||||
params.put("check", organization.getCheckNumber());
|
||||
|
|
Loading…
Reference in New Issue