diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewService.java b/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewService.java index 66009c093..bc2621e35 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewService.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewService.java @@ -1,7 +1,6 @@ package com.cool.store.service; import com.cool.store.dto.partner.EnterInterviewDto; -import com.cool.store.entity.HyPartnerInterviewPlanDO; import com.cool.store.exception.ApiException; import com.cool.store.request.*; import com.cool.store.vo.EnterInterviewVO; @@ -88,5 +87,5 @@ public interface InterviewService { * @return interview: {@link com.cool.store.entity.HyPartnerInterviewDO}; interviewPlan: {@link com.cool.store.entity.HyPartnerInterviewPlanDO} * @throws ApiException */ - Map agreeInterviewWithoutBook(CreateAppointmentReq request, Boolean whetherBeginInterview, String interviewerId) throws ApiException; + Map agreeInterviewWithoutBook(CreateAppointmentReq request, Boolean whetherBeginInterview, String interviewerId, Boolean needSendSms) throws ApiException; } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java index 61764e4ab..ebf27bbfe 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java @@ -761,12 +761,12 @@ public class InterviewServiceImpl implements InterviewService { if (interviewStartTime.isBeforeOrEquals(new Date())) { whetherBeginInterview = true; } - HyPartnerInterviewPlanDO interviewPlanDO = (HyPartnerInterviewPlanDO) agreeInterviewWithoutBook(request, whetherBeginInterview, interviewerId).get("interviewPlan"); + HyPartnerInterviewPlanDO interviewPlanDO = (HyPartnerInterviewPlanDO) agreeInterviewWithoutBook(request, whetherBeginInterview, interviewerId, Boolean.TRUE).get("interviewPlan"); return new CreateAppointmentVO(interviewPlanDO.getId().toString()); } @Transactional - public Map agreeInterviewWithoutBook(CreateAppointmentReq request, Boolean whetherBeginInterview, String interviewerId) throws ApiException { + public Map agreeInterviewWithoutBook(CreateAppointmentReq request, Boolean whetherBeginInterview, String interviewerId, Boolean needSendSms) throws ApiException { //1.创建面试计划 HyPartnerInterviewPlanDO interviewPlanDO = new HyPartnerInterviewPlanDO(); Date now = new Date(); @@ -824,11 +824,13 @@ public class InterviewServiceImpl implements InterviewService { hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineDO); //4. 异步发送短信给加盟商 - HyPartnerBaseInfoDO partnerBaseInfo = hyPartnerBaseInfoMapper.getByPartnerLineId(request.getPartnerLineId()); - if(partnerBaseInfo == null){ - throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST); + if (Boolean.TRUE.equals(needSendSms)) { + HyPartnerBaseInfoDO partnerBaseInfo = hyPartnerBaseInfoMapper.getByPartnerLineId(request.getPartnerLineId()); + if(partnerBaseInfo == null){ + throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST); + } + eventCenterHttpRequest.sendSmsVariable(partnerBaseInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS, DateUtil.format(DateUtil.parseDateTime(request.getStartBookingTime()), DatePattern.NORM_DATETIME_MINUTE_PATTERN), wechatMiniAppService.getMiniAppUrl()); } - eventCenterHttpRequest.sendSmsVariable(partnerBaseInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS, DateUtil.format(DateUtil.parseDateTime(request.getStartBookingTime()), DatePattern.NORM_DATETIME_MINUTE_PATTERN), wechatMiniAppService.getMiniAppUrl()); //5. 记录日志 LoginUserInfo operator = CurrentUserHolder.getUser(); diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/exhibition/ExhibitionServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/exhibition/ExhibitionServiceImpl.java index 81b8b0503..cdea240f1 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/exhibition/ExhibitionServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/exhibition/ExhibitionServiceImpl.java @@ -112,7 +112,7 @@ public class ExhibitionServiceImpl implements ExhibitionService { //1.2 核验会销签到状态 if (hyPartnerExhibitionDO == null //线索未会销签到并且提交意向申请或未处在预约面试阶段 - || !(hyPartnerExhibitionDO.getParticipationStatus().equals(ExhibitionPartnerStatus.SIGNED.getCode()))) + || !(hyPartnerExhibitionDO.getParticipationStatus().equals(ExhibitionPartnerStatus.APPLIED.getCode()))) { throw new ApiException(ErrorCodeEnum.EXHIBITION_NOT_SIGNED); } @@ -134,7 +134,7 @@ public class ExhibitionServiceImpl implements ExhibitionService { String bookEndTime = DateUtil.offsetMinute(DateUtil.parseDateTime(bookStartTime), 30).toString("yyyy-MM-dd HH:mm:ss"); createAppointmentReq.setStartBookingTime(bookStartTime); createAppointmentReq.setEndBookingTime(bookEndTime); - Map interviewInfoMap = interviewService.agreeInterviewWithoutBook(createAppointmentReq, Boolean.TRUE, CurrentUserHolder.getUserId()); + Map interviewInfoMap = interviewService.agreeInterviewWithoutBook(createAppointmentReq, Boolean.TRUE, CurrentUserHolder.getUserId(), Boolean.FALSE); HyPartnerInterviewPlanDO interviewPlan = (HyPartnerInterviewPlanDO) interviewInfoMap.get("interviewPlan"); HyPartnerInterviewDO interviewInfo = (HyPartnerInterviewDO) interviewInfoMap.get("interview");