预约申请

This commit is contained in:
俞扬
2023-06-20 15:58:30 +08:00
parent 1d94752a53
commit 1d3b44b70a
3 changed files with 9 additions and 6 deletions

View File

@@ -70,6 +70,7 @@ public enum ErrorCodeEnum {
FEISHU_UPDATE_SCHEDULE_ERROR(1021110, "修改面试安排失败!", null),
INTERVIEW_STATUS_ERROR(1021111, "面试状态错误!", null),
INTERVIEW_PLAN_ALREADY_EXIST(1021112, "面试计划已存在,请勿重复申请!", null),
INTERVIEW_PLAN_ID_IS_NULL(1021113, "面试计划Id为空", null),
SIGN_FAIL(600000, "验签失败", null),
GET_ACCESSTOKEN_ERROR(600001, "获取小程序TOKEN错误", null),
NEW_MOBILE_HAS_EXIST(600002,"加盟商用户信息已存在",null),

View File

@@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
@ApiModel(description = "面试预约")
public class CreateAppointmentReq {
@ApiModelProperty(value = "加盟商用户ID")
@ApiModelProperty(value = "加盟商用户ID", required = true)
private String partnerId;
@ApiModelProperty(value = "面试官id")
private String interviewerId;
@@ -15,7 +15,7 @@ public class CreateAppointmentReq {
@ApiModelProperty(value = "预约结束时间 (YYYY-MM-DD hh:mm:ss)", required = true)
private String endBookingTime;
@ApiModelProperty(value = "线索id(如果面试官id会根据加盟商id和线索id查询面试官)")
@ApiModelProperty(value = "线索id(如果面试官id会根据加盟商id和线索id查询面试官)", required = true)
private Long partnerLineId;
public String getPartnerId() {

View File

@@ -107,8 +107,7 @@ public class InterviewServiceImpl implements InterviewService {
DeleteCalendarEventDTO deleteCalendarEventDTO = new DeleteCalendarEventDTO();
deleteCalendarEventDTO.setCalendarId(interviewInfo.getFeishuCalendarId());
deleteCalendarEventDTO.setEventId(interviewInfo.getFeishuScheduleId());
//TODO 这里的userId是原面试官的userId还是新的
deleteCalendarEventDTO.setUserId(request.getNewInterviewerId());
deleteCalendarEventDTO.setUserId(interviewInfo.getInterviewerId());
UserCalendarsEventDTO userCalendarsEventDTO = isvHttpRequest.deleteUserCalendarEvent(deleteCalendarEventDTO);
if(userCalendarsEventDTO == null ){
throw new ApiException(ErrorCodeEnum.FEISHU_DELETE_SCHEDULE_ERROR);
@@ -214,11 +213,14 @@ public class InterviewServiceImpl implements InterviewService {
@Override
@Transactional
public CreateAppointmentVO createAppointment(CreateAppointmentReq request) throws ApiException {
if(request.getPartnerLineId() == null || request.getPartnerLineId()<=0){
throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_ID_IS_NULL);
}
HyPartnerInterviewPlanDO hyPartnerInterviewPlanDO = new HyPartnerInterviewPlanDO();
hyPartnerInterviewPlanDO.setPartnerLineId(request.getPartnerLineId());
List<HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOS = hyPartnerInterviewPlanMapper.selectBySelective(hyPartnerInterviewPlanDO);
if(CollectionUtils.isNotEmpty(hyPartnerInterviewPlanDOS)){
throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_ALREADY_EXIST);
if(CollectionUtils.isNotEmpty(hyPartnerInterviewPlanDOS)&&hyPartnerInterviewPlanDOS.get(0).getId()!=null){
throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_ID_IS_NULL);
}
String interviewrId = request.getInterviewerId();
if(StringUtils.isEmpty(interviewrId)){