预约申请
This commit is contained in:
@@ -70,6 +70,7 @@ public enum ErrorCodeEnum {
|
|||||||
FEISHU_UPDATE_SCHEDULE_ERROR(1021110, "修改面试安排失败!", null),
|
FEISHU_UPDATE_SCHEDULE_ERROR(1021110, "修改面试安排失败!", null),
|
||||||
INTERVIEW_STATUS_ERROR(1021111, "面试状态错误!", null),
|
INTERVIEW_STATUS_ERROR(1021111, "面试状态错误!", null),
|
||||||
INTERVIEW_PLAN_ALREADY_EXIST(1021112, "面试计划已存在,请勿重复申请!", null),
|
INTERVIEW_PLAN_ALREADY_EXIST(1021112, "面试计划已存在,请勿重复申请!", null),
|
||||||
|
INTERVIEW_PLAN_ID_IS_NULL(1021113, "面试计划Id为空!", null),
|
||||||
SIGN_FAIL(600000, "验签失败", null),
|
SIGN_FAIL(600000, "验签失败", null),
|
||||||
GET_ACCESSTOKEN_ERROR(600001, "获取小程序TOKEN错误!", null),
|
GET_ACCESSTOKEN_ERROR(600001, "获取小程序TOKEN错误!", null),
|
||||||
NEW_MOBILE_HAS_EXIST(600002,"加盟商用户信息已存在",null),
|
NEW_MOBILE_HAS_EXIST(600002,"加盟商用户信息已存在",null),
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
|
|
||||||
@ApiModel(description = "面试预约")
|
@ApiModel(description = "面试预约")
|
||||||
public class CreateAppointmentReq {
|
public class CreateAppointmentReq {
|
||||||
@ApiModelProperty(value = "加盟商用户ID")
|
@ApiModelProperty(value = "加盟商用户ID", required = true)
|
||||||
private String partnerId;
|
private String partnerId;
|
||||||
@ApiModelProperty(value = "面试官id")
|
@ApiModelProperty(value = "面试官id")
|
||||||
private String interviewerId;
|
private String interviewerId;
|
||||||
@@ -15,7 +15,7 @@ public class CreateAppointmentReq {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "预约结束时间 (YYYY-MM-DD hh:mm:ss)", required = true)
|
@ApiModelProperty(value = "预约结束时间 (YYYY-MM-DD hh:mm:ss)", required = true)
|
||||||
private String endBookingTime;
|
private String endBookingTime;
|
||||||
@ApiModelProperty(value = "线索id(如果面试官id,会根据加盟商id和线索id查询面试官)")
|
@ApiModelProperty(value = "线索id(如果面试官id,会根据加盟商id和线索id查询面试官)", required = true)
|
||||||
private Long partnerLineId;
|
private Long partnerLineId;
|
||||||
|
|
||||||
public String getPartnerId() {
|
public String getPartnerId() {
|
||||||
|
|||||||
@@ -107,8 +107,7 @@ public class InterviewServiceImpl implements InterviewService {
|
|||||||
DeleteCalendarEventDTO deleteCalendarEventDTO = new DeleteCalendarEventDTO();
|
DeleteCalendarEventDTO deleteCalendarEventDTO = new DeleteCalendarEventDTO();
|
||||||
deleteCalendarEventDTO.setCalendarId(interviewInfo.getFeishuCalendarId());
|
deleteCalendarEventDTO.setCalendarId(interviewInfo.getFeishuCalendarId());
|
||||||
deleteCalendarEventDTO.setEventId(interviewInfo.getFeishuScheduleId());
|
deleteCalendarEventDTO.setEventId(interviewInfo.getFeishuScheduleId());
|
||||||
//TODO 这里的userId是原面试官的userId还是新的?
|
deleteCalendarEventDTO.setUserId(interviewInfo.getInterviewerId());
|
||||||
deleteCalendarEventDTO.setUserId(request.getNewInterviewerId());
|
|
||||||
UserCalendarsEventDTO userCalendarsEventDTO = isvHttpRequest.deleteUserCalendarEvent(deleteCalendarEventDTO);
|
UserCalendarsEventDTO userCalendarsEventDTO = isvHttpRequest.deleteUserCalendarEvent(deleteCalendarEventDTO);
|
||||||
if(userCalendarsEventDTO == null ){
|
if(userCalendarsEventDTO == null ){
|
||||||
throw new ApiException(ErrorCodeEnum.FEISHU_DELETE_SCHEDULE_ERROR);
|
throw new ApiException(ErrorCodeEnum.FEISHU_DELETE_SCHEDULE_ERROR);
|
||||||
@@ -214,11 +213,14 @@ public class InterviewServiceImpl implements InterviewService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public CreateAppointmentVO createAppointment(CreateAppointmentReq request) throws ApiException {
|
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 hyPartnerInterviewPlanDO = new HyPartnerInterviewPlanDO();
|
||||||
hyPartnerInterviewPlanDO.setPartnerLineId(request.getPartnerLineId());
|
hyPartnerInterviewPlanDO.setPartnerLineId(request.getPartnerLineId());
|
||||||
List<HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOS = hyPartnerInterviewPlanMapper.selectBySelective(hyPartnerInterviewPlanDO);
|
List<HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOS = hyPartnerInterviewPlanMapper.selectBySelective(hyPartnerInterviewPlanDO);
|
||||||
if(CollectionUtils.isNotEmpty(hyPartnerInterviewPlanDOS)){
|
if(CollectionUtils.isNotEmpty(hyPartnerInterviewPlanDOS)&&hyPartnerInterviewPlanDOS.get(0).getId()!=null){
|
||||||
throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_ALREADY_EXIST);
|
throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_ID_IS_NULL);
|
||||||
}
|
}
|
||||||
String interviewrId = request.getInterviewerId();
|
String interviewrId = request.getInterviewerId();
|
||||||
if(StringUtils.isEmpty(interviewrId)){
|
if(StringUtils.isEmpty(interviewrId)){
|
||||||
|
|||||||
Reference in New Issue
Block a user