预约申请
This commit is contained in:
@@ -69,6 +69,7 @@ public enum ErrorCodeEnum {
|
|||||||
CREATE_CALENDAR_EVENT_FAIL(1021109, "创建面试安排失败!", null),
|
CREATE_CALENDAR_EVENT_FAIL(1021109, "创建面试安排失败!", null),
|
||||||
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),
|
||||||
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),
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
<result column="record_time" jdbcType="TIMESTAMP" property="recordTime" />
|
<result column="record_time" jdbcType="TIMESTAMP" property="recordTime" />
|
||||||
<result column="summary" jdbcType="VARCHAR" property="summary" />
|
<result column="summary" jdbcType="VARCHAR" property="summary" />
|
||||||
<result column="auth_code" jdbcType="VARCHAR" property="authCode" />
|
<result column="auth_code" jdbcType="VARCHAR" property="authCode" />
|
||||||
<result column="qualify_verify_id" jdbcType="VARCHAR" property="qualifyVerifyId" />
|
<result column="pass_pdf_url" jdbcType="VARCHAR" property="passPdfUrl" />
|
||||||
<result column="pass_file_url" jdbcType="VARCHAR" property="passFileUrl" />
|
<result column="pass_image_url" jdbcType="VARCHAR" property="passImageUrl" />
|
||||||
<result column="expiry_date" jdbcType="TIMESTAMP" property="expiryDate" />
|
<result column="expiry_date" jdbcType="TIMESTAMP" property="expiryDate" />
|
||||||
<result column="latest_log_message" jdbcType="VARCHAR" property="latestLogMessage" />
|
<result column="latest_log_message" jdbcType="VARCHAR" property="latestLogMessage" />
|
||||||
<result column="pass_reason" jdbcType="VARCHAR" property="passReason" />
|
<result column="pass_reason" jdbcType="VARCHAR" property="passReason" />
|
||||||
@@ -87,8 +87,11 @@
|
|||||||
<if test="record.authCode != null">
|
<if test="record.authCode != null">
|
||||||
auth_code,
|
auth_code,
|
||||||
</if>
|
</if>
|
||||||
<if test="record.passFileUrl != null">
|
<if test="record.passPdfUrl != null">
|
||||||
pass_file_url,
|
pass_pdf_url,
|
||||||
|
</if>
|
||||||
|
<if test="record.passImageUrl != null">
|
||||||
|
pass_image_url,
|
||||||
</if>
|
</if>
|
||||||
<if test="record.expiryDate != null">
|
<if test="record.expiryDate != null">
|
||||||
expiry_date,
|
expiry_date,
|
||||||
@@ -152,8 +155,11 @@
|
|||||||
<if test="record.authCode != null">
|
<if test="record.authCode != null">
|
||||||
#{record.authCode},
|
#{record.authCode},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.passFileUrl != null">
|
<if test="record.passPdfUrl != null">
|
||||||
#{record.passFileUrl},
|
#{record.passPdfUrl},
|
||||||
|
</if>
|
||||||
|
<if test="record.passImageUrl != null">
|
||||||
|
#{record.passImageUrl},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.expiryDate != null">
|
<if test="record.expiryDate != null">
|
||||||
#{record.expiryDate},
|
#{record.expiryDate},
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||||
<result column="is_partner_interview" jdbcType="TINYINT" property="isPartnerInterview" />
|
<result column="is_partner_interview" jdbcType="TINYINT" property="isPartnerInterview" />
|
||||||
|
<result column="application_approved" jdbcType="TINYINT" property="applicationApproved" />
|
||||||
<result column="actual_start_time" jdbcType="TIMESTAMP" property="actualStartTime" />
|
<result column="actual_start_time" jdbcType="TIMESTAMP" property="actualStartTime" />
|
||||||
<result column="actual_end_time" jdbcType="TIMESTAMP" property="actualEndTime" />
|
<result column="actual_end_time" jdbcType="TIMESTAMP" property="actualEndTime" />
|
||||||
<result column="room_id" jdbcType="VARCHAR" property="roomId" />
|
<result column="room_id" jdbcType="VARCHAR" property="roomId" />
|
||||||
@@ -74,6 +75,9 @@
|
|||||||
<if test="record.updateTime != null">
|
<if test="record.updateTime != null">
|
||||||
update_time,
|
update_time,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.applicationApproved != null">
|
||||||
|
application_approved,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="record.partnerLineId != null">
|
<if test="record.partnerLineId != null">
|
||||||
@@ -121,6 +125,9 @@
|
|||||||
<if test="record.updateTime != null">
|
<if test="record.updateTime != null">
|
||||||
#{record.updateTime},
|
#{record.updateTime},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.applicationApproved != null">
|
||||||
|
#{record.applicationApproved},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateByPrimaryKeySelective">
|
<update id="updateByPrimaryKeySelective">
|
||||||
|
|||||||
@@ -66,6 +66,9 @@ public class HyPartnerInterviewPlanDO implements Serializable {
|
|||||||
@ApiModelProperty("更新时间")
|
@ApiModelProperty("更新时间")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("预约是否通过审核:0.未审核1.通过审核")
|
||||||
|
private Integer applicationApproved;
|
||||||
|
|
||||||
@ApiModelProperty("飞书日历id")
|
@ApiModelProperty("飞书日历id")
|
||||||
private String feishuCalendarId;
|
private String feishuCalendarId;
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public interface InterviewService {
|
|||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
CreateAppointmentVO createAppointment(CreateAppointmentReq request);
|
CreateAppointmentVO createAppointment(CreateAppointmentReq request) throws ApiException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同意面试预约
|
* 同意面试预约
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ import com.cool.store.vo.EnterpriseUserBaseInfoVO;
|
|||||||
import com.cool.store.vo.interview.CreateAppointmentVO;
|
import com.cool.store.vo.interview.CreateAppointmentVO;
|
||||||
import com.cool.store.vo.interview.InterviewVO;
|
import com.cool.store.vo.interview.InterviewVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -208,7 +208,13 @@ public class InterviewServiceImpl implements InterviewService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public CreateAppointmentVO createAppointment(CreateAppointmentReq request) {
|
public CreateAppointmentVO createAppointment(CreateAppointmentReq request) throws ApiException {
|
||||||
|
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);
|
||||||
|
}
|
||||||
CreateAppointmentVO vo = new CreateAppointmentVO();
|
CreateAppointmentVO vo = new CreateAppointmentVO();
|
||||||
//1.创建面试计划
|
//1.创建面试计划
|
||||||
HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO();
|
HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO();
|
||||||
@@ -227,16 +233,19 @@ public class InterviewServiceImpl implements InterviewService {
|
|||||||
record.setRoomId(StringUtil.generateRoomId(startBookingTime));
|
record.setRoomId(StringUtil.generateRoomId(startBookingTime));
|
||||||
record.setRoomStatus(RoomStatus.WAIT_FOR_OPEN.getCode());
|
record.setRoomStatus(RoomStatus.WAIT_FOR_OPEN.getCode());
|
||||||
record.setDeleted(false);
|
record.setDeleted(false);
|
||||||
|
record.setApplicationApproved(0);
|
||||||
hyPartnerInterviewPlanMapper.insertSelective(record);
|
hyPartnerInterviewPlanMapper.insertSelective(record);
|
||||||
|
|
||||||
HyPartnerInterviewPlanDO hyPartnerInterviewPlanDO = new HyPartnerInterviewPlanDO();
|
List<HyPartnerInterviewPlanDO> interviewPlanDOS = hyPartnerInterviewPlanMapper.selectBySelective(hyPartnerInterviewPlanDO);
|
||||||
hyPartnerInterviewPlanMapper.selectBySelective(hyPartnerInterviewPlanDO);
|
if(CollectionUtils.isEmpty(interviewPlanDOS)){
|
||||||
|
throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_NOT_EXIST);
|
||||||
// vo.setInterviewPlanId(String.valueOf(interviewPlanId));
|
}
|
||||||
|
Long interviewPlanId = interviewPlanDOS.get(0).getId();
|
||||||
|
vo.setInterviewPlanId(String.valueOf(interviewPlanId));
|
||||||
|
|
||||||
//2.创建面试信息
|
//2.创建面试信息
|
||||||
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
|
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
|
||||||
// hyPartnerInterviewDO.setInterviewPlanId(interviewPlanId);
|
hyPartnerInterviewDO.setInterviewPlanId(interviewPlanId);
|
||||||
hyPartnerInterviewDO.setPartnerLineId(request.getPartnerLineId());
|
hyPartnerInterviewDO.setPartnerLineId(request.getPartnerLineId());
|
||||||
hyPartnerInterviewDO.setPartnerId(request.getPartnerId());
|
hyPartnerInterviewDO.setPartnerId(request.getPartnerId());
|
||||||
hyPartnerInterviewDO.setInterviewer(request.getInterviewerId());
|
hyPartnerInterviewDO.setInterviewer(request.getInterviewerId());
|
||||||
@@ -250,6 +259,7 @@ public class InterviewServiceImpl implements InterviewService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void approveAppointment(ApproveAppointmentReq request) throws ApiException {
|
public void approveAppointment(ApproveAppointmentReq request) throws ApiException {
|
||||||
|
|
||||||
//查询面试计划信息
|
//查询面试计划信息
|
||||||
InterviewVO interviewVO = hyPartnerInterviewPlanMapper.getInterviewInfo(request.getInterviewPlanId());
|
InterviewVO interviewVO = hyPartnerInterviewPlanMapper.getInterviewInfo(request.getInterviewPlanId());
|
||||||
//如果面试计划不存在,抛出异常
|
//如果面试计划不存在,抛出异常
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
@Api(tags = "加盟商资格面试")
|
@Api(tags = "加盟商资格面试")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("interview")
|
@RequestMapping("/interview")
|
||||||
public class InterviewController {
|
public class InterviewController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -47,7 +47,7 @@ public class InterviewController {
|
|||||||
|
|
||||||
@PostMapping("/appointment/submit")
|
@PostMapping("/appointment/submit")
|
||||||
@ApiOperation("预约面试")
|
@ApiOperation("预约面试")
|
||||||
public ResponseResult<CreateAppointmentVO> createAppointment(@RequestBody CreateAppointmentReq request) {
|
public ResponseResult<CreateAppointmentVO> createAppointment(@RequestBody CreateAppointmentReq request) throws ApiException {
|
||||||
return ResponseResult.success(interviewBaseService.createAppointment(request));
|
return ResponseResult.success(interviewBaseService.createAppointment(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user