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;