面试预约申请
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.partner.EnterInterviewDto;
|
||||
import com.cool.store.request.EntrustOthersReq;
|
||||
import com.cool.store.request.FinishInterviewReq;
|
||||
import com.cool.store.request.GetInterviewListReq;
|
||||
import com.cool.store.request.ModifyInterviewTimeReq;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.vo.EnterInterviewVO;
|
||||
import com.cool.store.vo.interview.CreateAppointmentVO;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -50,4 +48,11 @@ public interface InterviewService {
|
||||
*/
|
||||
EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto);
|
||||
|
||||
/**
|
||||
* 创建面试预约信息
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
CreateAppointmentVO createAppointment(CreateAppointmentReq request);
|
||||
|
||||
}
|
||||
|
||||
@@ -6,17 +6,18 @@ import com.cool.store.dto.partner.EnterInterviewDto;
|
||||
import com.cool.store.entity.HyPartnerInterviewDO;
|
||||
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.RoomStatus;
|
||||
import com.cool.store.enums.WorkflowStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.HyPartnerInterviewMapper;
|
||||
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
|
||||
import com.cool.store.request.EntrustOthersReq;
|
||||
import com.cool.store.request.FinishInterviewReq;
|
||||
import com.cool.store.request.GetInterviewListReq;
|
||||
import com.cool.store.request.ModifyInterviewTimeReq;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.service.InterviewService;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.utils.TRTCUtils;
|
||||
import com.cool.store.vo.EnterInterviewVO;
|
||||
import com.cool.store.vo.EnterpriseUserBaseInfoVO;
|
||||
import com.cool.store.vo.interview.CreateAppointmentVO;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -152,5 +153,42 @@ public class InterviewServiceImpl implements InterviewService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreateAppointmentVO createAppointment(CreateAppointmentReq request) {
|
||||
CreateAppointmentVO vo = new CreateAppointmentVO();
|
||||
//1.创建面试计划
|
||||
HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO();
|
||||
String startBookingTime = request.getStartBookingTime();
|
||||
String startDate = startBookingTime.substring(0, 10);
|
||||
record.setInterviewDate(Convert.toDate(startDate));
|
||||
record.setCreateTime(new Date());
|
||||
record.setUpdateTime(new Date());
|
||||
record.setStartTime(Convert.toDate(request.getStartBookingTime()));
|
||||
record.setEndTime(Convert.toDate(request.getEndBookingTime()));
|
||||
record.setPartnerId(request.getPartnerId());
|
||||
record.setPartnerLineId(request.getPartnerLineId());
|
||||
record.setInterviewer(request.getInterviewerId());
|
||||
record.setIsPartnerInterview(0);
|
||||
//生成房间号
|
||||
record.setRoomId(StringUtil.generateRoomId(startBookingTime));
|
||||
record.setRoomStatus(RoomStatus.WAIT_FOR_OPEN.getCode());
|
||||
record.setDeleted(false);
|
||||
long interviewPlanId = hyPartnerInterviewPlanMapper.insertSelective(record);
|
||||
vo.setInterviewPlanId(String.valueOf(interviewPlanId));
|
||||
|
||||
//2.创建面试信息
|
||||
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
|
||||
hyPartnerInterviewDO.setInterviewPlanId(interviewPlanId);
|
||||
hyPartnerInterviewDO.setPartnerId(request.getPartnerId());
|
||||
hyPartnerInterviewDO.setPartnerLineId(request.getPartnerLineId());
|
||||
hyPartnerInterviewDO.setInterviewer(request.getInterviewerId());
|
||||
hyPartnerInterviewDO.setCreateTime(new Date());
|
||||
hyPartnerInterviewDO.setUpdateTime(new Date());
|
||||
hyPartnerInterviewDO.setStatus(Integer.valueOf(WorkflowStatusEnum.RESERVATION_1.getCode()));
|
||||
hyPartnerInterviewMapper.insertSelective(hyPartnerInterviewDO);
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user