会销开始面试bug
This commit is contained in:
@@ -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<String, Object> agreeInterviewWithoutBook(CreateAppointmentReq request, Boolean whetherBeginInterview, String interviewerId) throws ApiException;
|
||||
Map<String, Object> agreeInterviewWithoutBook(CreateAppointmentReq request, Boolean whetherBeginInterview, String interviewerId, Boolean needSendSms) throws ApiException;
|
||||
}
|
||||
|
||||
@@ -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<String, Object> agreeInterviewWithoutBook(CreateAppointmentReq request, Boolean whetherBeginInterview, String interviewerId) throws ApiException {
|
||||
public Map<String, Object> 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();
|
||||
|
||||
@@ -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<String, Object> interviewInfoMap = interviewService.agreeInterviewWithoutBook(createAppointmentReq, Boolean.TRUE, CurrentUserHolder.getUserId());
|
||||
Map<String, Object> interviewInfoMap = interviewService.agreeInterviewWithoutBook(createAppointmentReq, Boolean.TRUE, CurrentUserHolder.getUserId(), Boolean.FALSE);
|
||||
HyPartnerInterviewPlanDO interviewPlan = (HyPartnerInterviewPlanDO) interviewInfoMap.get("interviewPlan");
|
||||
HyPartnerInterviewDO interviewInfo = (HyPartnerInterviewDO) interviewInfoMap.get("interview");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user