From 7e66fc3ca96b9568681cda6037b3bd9abe798d4f Mon Sep 17 00:00:00 2001 From: mash Date: Tue, 12 Nov 2024 17:29:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=85=A5=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ydool/staff/service/impl/PersonnelServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java b/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java index 3a56147..1a466c3 100644 --- a/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java +++ b/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java @@ -790,8 +790,10 @@ public class PersonnelServiceImpl extends BaseService pOptional = Optional.ofNullable(personnelMapper.selectCount(Wrappers.lambdaQuery(Personnel.class).eq(Personnel::getRecruitNumber, personnelExportVO.getRecruitNumber()))); Optional placesOptional = Optional.ofNullable(placesMapper.selectOne(Wrappers.lambdaQuery(Places.class).eq(Places::getOdd, personnelExportVO.getRecruitNumber()))); - if (pOptional.isPresent() && placesOptional.isPresent() && pOptional.get() > placesOptional.get().getSum()) { - failMsgVO.setFailMsg("招聘名额已用完!"); + if (pOptional.isPresent() && placesOptional.isPresent()) { + if (pOptional.get() >= placesOptional.get().getSum()) { + failMsgVO.setFailMsg("招聘名额已用完!"); + } } return failMsgVO;