From 01b59e1f66551349145466fed25c68f90c6a95f2 Mon Sep 17 00:00:00 2001 From: zhuyy Date: Wed, 11 Oct 2023 16:33:31 +0800 Subject: [PATCH] update --- .../staff/service/impl/RecruitmentServiceImpl.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ydool/staff/service/impl/RecruitmentServiceImpl.java b/src/main/java/com/ydool/staff/service/impl/RecruitmentServiceImpl.java index 791ec14..0873427 100644 --- a/src/main/java/com/ydool/staff/service/impl/RecruitmentServiceImpl.java +++ b/src/main/java/com/ydool/staff/service/impl/RecruitmentServiceImpl.java @@ -158,9 +158,18 @@ public class RecruitmentServiceImpl extends BaseService 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 params = new HashMap<>(); params.put("name", companyName.getCompanyName()); params.put("check", organization.getCheckNumber());