面试流程逻辑修改-全流程测试

This commit is contained in:
俞扬
2023-06-24 22:18:59 +08:00
parent d72f99348d
commit 10aceade69
25 changed files with 445 additions and 194 deletions

View File

@@ -74,6 +74,7 @@ public enum ErrorCodeEnum {
INTERVIEW_LINE_ID_IS_NULL(1021113, "线索id为空", null), INTERVIEW_LINE_ID_IS_NULL(1021113, "线索id为空", null),
INTERVIEW_INTERVIEW_TIME_IS_UNUSABLE(1021114, "当前预约时间不可用,请和线索用户协商其他时间后确定预约时间\n面试人{0} 手机号:{1}", null), INTERVIEW_INTERVIEW_TIME_IS_UNUSABLE(1021114, "当前预约时间不可用,请和线索用户协商其他时间后确定预约时间\n面试人{0} 手机号:{1}", null),
INTERVIEW_PARTNER_NOT_EXIST(1021115, "线索下的加盟商不存在!", null), INTERVIEW_PARTNER_NOT_EXIST(1021115, "线索下的加盟商不存在!", null),
ROOM_STATUS_ERROR(10211156, "当前面试房间状态不允许进行该操作!", 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),

View File

@@ -16,7 +16,7 @@ public enum WorkflowStatusEnum {
RESERVATION_0("0","待预约"), RESERVATION_0("0","待预约"),
RESERVATION_1("1","预约时间待审核"), RESERVATION_1("1","预约时间待审核"),
RESERVATION_7("7","拒绝"), RESERVATION_7("7","拒绝"),
RESERVATION_8("8","到期未预约"), RESERVATION_8("8","超时"),//超时未预约或未参加
//合格资格面试 //合格资格面试

View File

@@ -1,25 +0,0 @@
package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerInterviewLogDO;
import org.apache.ibatis.annotations.Param;
/**
* @author zhangchenbiao
* @date 2023-05-29 03:52
*/
public interface HyPartnerInterviewLogMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2023-05-29 03:52
*/
int insertSelective(@Param("record") HyPartnerInterviewLogDO record);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2023-05-29 03:52
*/
int updateByPrimaryKeySelective(@Param("record") HyPartnerInterviewLogDO record);
}

View File

@@ -1,12 +1,14 @@
package com.cool.store.mapper; package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerInterviewDO; import com.cool.store.entity.HyPartnerInterviewDO;
import com.cool.store.request.GetInterviewListReq;
import com.cool.store.vo.EnterInterviewVO; import com.cool.store.vo.EnterInterviewVO;
import com.cool.store.vo.EnterpriseUserBaseInfoVO;
import com.cool.store.vo.PartnerInterviewInfoVO; import com.cool.store.vo.PartnerInterviewInfoVO;
import com.cool.store.vo.PartnerPassLetterDetailVO; import com.cool.store.vo.PartnerPassLetterDetailVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* @author zhangchenbiao * @author zhangchenbiao
* @date 2023-06-09 05:51 * @date 2023-06-09 05:51
@@ -60,4 +62,12 @@ public interface HyPartnerInterviewMapper {
* @return * @return
*/ */
String getVerifyCityByInterviewId(@Param("interviewId") String interviewId); String getVerifyCityByInterviewId(@Param("interviewId") String interviewId);
/**
* 查询面试基本信息列表
* @param request
* @return
*/
List<HyPartnerInterviewDO> getInterviewBaseInfoList(@Param("record") GetInterviewListReq request);
void batchUpdateInterviewStatus(@Param("interviewIds") List<Long> interviewIdList, @Param("interviewStatus") Integer interviewStatus);
} }

View File

@@ -102,4 +102,33 @@ public interface HyPartnerInterviewPlanMapper {
* @return * @return
*/ */
List<HyPartnerInterviewPlanDO> selectBySelective(@Param("record") HyPartnerInterviewPlanDO record); List<HyPartnerInterviewPlanDO> selectBySelective(@Param("record") HyPartnerInterviewPlanDO record);
/**
* 批量软删面试计划
* @param record
* @return
*/
void batchDeleteInterviewPlans(@Param("interviewPlanIds")List<Long> interviewIds);
/**
* 通用更新房间状态方法
* @param record
* @param roomStatus
*/
void updateInterviewRoomStatus(@Param("record") HyPartnerInterviewPlanDO record,@Param("roomStatus")Integer roomStatus);
/**
* 仅适用于开启面试房间
* @param record
* @param roomStatus
*/
void openInterviewRoom(@Param("record") HyPartnerInterviewPlanDO record,@Param("roomStatus")Integer roomStatus);
/**
* 仅适用于关闭面试房间
* @param record
* @param roomStatus
*/
void closeInterviewRoom(@Param("record") HyPartnerInterviewPlanDO record,@Param("roomStatus")Integer roomStatus);
} }

View File

@@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.HyPartnerInterviewLogMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerInterviewLogDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
<result column="partner_interview_id" jdbcType="BIGINT" property="partnerInterviewId" />
<result column="message" jdbcType="VARCHAR" property="message" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.entity.HyPartnerInterviewLogDO">
<result column="change_before_cpoy" jdbcType="LONGVARCHAR" property="changeBeforeCpoy" />
</resultMap>
<sql id="Base_Column_List">
id, partner_line_id, partner_interview_id, message, create_time, update_time
</sql>
<sql id="Blob_Column_List">
change_before_cpoy
</sql>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_interview_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="record.partnerLineId != null">
partner_line_id,
</if>
<if test="record.partnerInterviewId != null">
partner_interview_id,
</if>
<if test="record.message != null">
message,
</if>
<if test="record.createTime != null">
create_time,
</if>
<if test="record.updateTime != null">
update_time,
</if>
<if test="record.changeBeforeCpoy != null">
change_before_cpoy,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.partnerLineId != null">
#{record.partnerLineId},
</if>
<if test="record.partnerInterviewId != null">
#{record.partnerInterviewId},
</if>
<if test="record.message != null">
#{record.message},
</if>
<if test="record.createTime != null">
#{record.createTime},
</if>
<if test="record.updateTime != null">
#{record.updateTime},
</if>
<if test="record.changeBeforeCpoy != null">
#{record.changeBeforeCpoy},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
update hy_partner_interview_log
<set>
<if test="record.partnerLineId != null">
partner_line_id = #{record.partnerLineId},
</if>
<if test="record.partnerInterviewId != null">
partner_interview_id = #{record.partnerInterviewId},
</if>
<if test="record.message != null">
message = #{record.message},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime},
</if>
<if test="record.changeBeforeCpoy != null">
change_before_cpoy = #{record.changeBeforeCpoy},
</if>
</set>
where id = #{record.id}
</update>
</mapper>

View File

@@ -25,6 +25,7 @@
<result column="approve_time" jdbcType="TIMESTAMP" property="approveTime" /> <result column="approve_time" jdbcType="TIMESTAMP" property="approveTime" />
<result column="partner_enter_time" jdbcType="TIMESTAMP" property="partnerEnterTime" /> <result column="partner_enter_time" jdbcType="TIMESTAMP" property="partnerEnterTime" />
<result column="interviewer_enter_time" jdbcType="TIMESTAMP" property="interviewerEnterTime" /> <result column="interviewer_enter_time" jdbcType="TIMESTAMP" property="interviewerEnterTime" />
<result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap> </resultMap>
<resultMap id="PartnerInterviewInfoVO" type="com.cool.store.vo.PartnerInterviewInfoVO"> <resultMap id="PartnerInterviewInfoVO" type="com.cool.store.vo.PartnerInterviewInfoVO">
@@ -49,7 +50,7 @@
id, status, partner_line_id, interview_plan_id, partner_id, deadline, interviewer, id, status, partner_line_id, interview_plan_id, partner_id, deadline, interviewer,
recorder, process_info, record_time, summary, auth_code, pass_pdf_url, pass_image_url, expiry_date, recorder, process_info, record_time, summary, auth_code, pass_pdf_url, pass_image_url, expiry_date,
latest_log_message, pass_reason, certify_file, create_time, update_time, approve_time, latest_log_message, pass_reason, certify_file, create_time, update_time, approve_time,
partner_enter_time, interviewer_enter_time partner_enter_time, interviewer_enter_time,deleted
</sql> </sql>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_interview insert into hy_partner_interview
@@ -120,6 +121,9 @@
<if test="record.interviewerEnterTime != null"> <if test="record.interviewerEnterTime != null">
interviewer_enter_time, interviewer_enter_time,
</if> </if>
<if test="record.deleted != null">
deleted,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.status != null"> <if test="record.status != null">
@@ -188,6 +192,9 @@
<if test="record.interviewerEnterTime != null"> <if test="record.interviewerEnterTime != null">
#{record.interviewerEnterTime}, #{record.interviewerEnterTime},
</if> </if>
<if test="record.deleted != null">
#{record.deleted},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective"> <update id="updateByPrimaryKeySelective">
@@ -265,6 +272,9 @@
<if test="interviewerEnterTime != null"> <if test="interviewerEnterTime != null">
interviewer_enter_time = #{interviewerEnterTime}, interviewer_enter_time = #{interviewerEnterTime},
</if> </if>
<if test="deleted != null">
deleted = #{deleted},
</if>
</set> </set>
<where> <where>
1 = 0 1 = 0
@@ -282,7 +292,7 @@
SELECT t1.id interviewId, t1.id interview_id, t2.id as interviewPlanId, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId SELECT t1.id interviewId, t1.id interview_id, t2.id as interviewPlanId, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId
FROM hy_partner_interview t1 FROM hy_partner_interview t1
LEFT JOIN hy_partner_interview_plan t2 ON t1.interview_plan_id = t2.id LEFT JOIN hy_partner_interview_plan t2 ON t1.interview_plan_id = t2.id
WHERE t1.partner_id = #{partnerId} WHERE t1.partner_id = #{partnerId} and deleted = 0
</select> </select>
<select id="queryPartnerName" resultType="string"> <select id="queryPartnerName" resultType="string">
SELECT username SELECT username
@@ -300,14 +310,14 @@
<select id="getInterviewerByInterviewPlanId" resultMap="partnerEnterInterviewVO"> <select id="getInterviewerByInterviewPlanId" resultMap="partnerEnterInterviewVO">
SELECT interviewer, interviewer interviewer_id, partner_id SELECT interviewer, interviewer interviewer_id, partner_id
FROM hy_partner_interview FROM hy_partner_interview
WHERE interview_plan_id = #{interviewPlanId} WHERE interview_plan_id = #{interviewPlanId} and deleted = 0
</select> </select>
<!-- 获取通知函详情 --> <!-- 获取通知函详情 -->
<select id="getPassLetterDetail" resultMap="passLetterDetail"> <select id="getPassLetterDetail" resultMap="passLetterDetail">
SELECT auth_code, pass_code, pass_pdf_url, pass_image_url, expiry_date, partner_id SELECT auth_code, pass_code, pass_pdf_url, pass_image_url, expiry_date, partner_id
FROM hy_partner_interview FROM hy_partner_interview
WHERE interview_plan_id = #{interviewPlanId} WHERE interview_plan_id = #{interviewPlanId} and deleted = 0
</select> </select>
<!-- 获取意向开店区域 --> <!-- 获取意向开店区域 -->
<select id="getVerifyCity" resultType="string"> <select id="getVerifyCity" resultType="string">
@@ -348,6 +358,18 @@
</set> </set>
WHERE id = #{interviewId} WHERE id = #{interviewId}
</update> </update>
<update id="batchUpdateInterviewStatus">
UPDATE hy_partner_interview
<set>
<if test="interviewStatus != null and interviewStatus != ''">
status = #{status}
</if>
</set>
WHERE id in
<foreach collection="interviewIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<!-- 根据 interviewId 获取意向区域 --> <!-- 根据 interviewId 获取意向区域 -->
<select id="getVerifyCityByInterviewId" resultType="java.lang.String"> <select id="getVerifyCityByInterviewId" resultType="java.lang.String">
@@ -359,9 +381,32 @@
WHERE partner_line_id = ( WHERE partner_line_id = (
SELECT partner_line_id SELECT partner_line_id
FROM hy_partner_interview FROM hy_partner_interview
WHERE id = #{interviewId} WHERE id = #{interviewId} and deleted = 0
) )
) )
</select> </select>
<select id="getInterviewBaseInfoList" resultType="com.cool.store.entity.HyPartnerInterviewDO">
select
<include refid="Base_Column_List"/>
from hy_partner_interview_plan hpip
left join hy_partner_interview hpi on hpi.interview_plan_id = hpip.id
<where>
<if test="record.status != null">
and hpi.status = #{record.status}
</if>
<if test="record.startTime != null">
and hpip.start_time &gt;= #{record.startTime}
</if>
<if test="record.endTime != null">
and hpip.end_time &lt;= #{record.endTime}
</if>
<if test="record.deleted != null">
and hpi.deleted = #{record.deleted} and hpip.deleted = #{record.deleted}
</if>
<if test="record.isPartnerInterview != null">
and hpip.is_partner_interview = #{record.isPartnerInterview}
</if>
</where>
</select>
</mapper> </mapper>

View File

@@ -190,7 +190,70 @@
</set> </set>
where id = #{record.id} where id = #{record.id}
</update> </update>
<update id="batchDeleteInterviewPlans">
update hy_partner_interview_plan
set deleted = 1
where id in
<foreach collection="interviewPlanIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<update id="updateInterviewRoomStatus">
update hy_partner_interview_plan
set room_status = #{roomStatus},update_time = now()
<where>
<if test="record.roomStatus !=null and record.roomStatus!=''">
and hpip.room_status = #{record.roomStatus}
</if>
<if test="record.startTime !=null and record.startTime!=''">
and hpip.start_time &gt;= #{record.startTime}
</if>
<if test="record.endTime !=null and record.endTime!=''">
and hpip.end_time &lt;= #{record.endTime}
</if>
<if test="record.deleted !=null and record.deleted!=''">
and hpip.deleted = #{deleted}
</if>
</where>
</update>
<update id="openInterviewRoom">
update hy_partner_interview_plan
set room_status = #{roomStatus},update_time = now()
<where>
<if test="record.roomStatus !=null and record.roomStatus!=''">
and hpip.room_status = #{record.roomStatus}
</if>
<if test="record.startTime !=null and record.startTime!=''">
and hpip.start_time &gt;= #{record.startTime}
</if>
<if test="record.endTime !=null and record.endTime!=''">
and hpip.start_time &lt;= #{record.endTime}
</if>
<if test="record.deleted !=null and record.deleted!=''">
and hpip.deleted = #{deleted}
</if>
</where>
</update>
<update id="closeInterviewRoom">
update hy_partner_interview_plan
set room_status = #{roomStatus},update_time = now()
<where>
<if test="record.roomStatus !=null and record.roomStatus!=''">
and hpip.room_status = #{record.roomStatus}
</if>
<if test="record.startTime !=null and record.startTime!=''">
and hpip.end_time &gt;= #{record.startTime}
</if>
<if test="record.endTime !=null and record.endTime!=''">
and hpip.end_time &lt;= #{record.endTime}
</if>
<if test="record.deleted !=null and record.deleted!=''">
and hpip.deleted = #{deleted}
</if>
</where>
</update>
<select id="getCurrentDateInterviewCount" resultType="java.lang.Integer"> <select id="getCurrentDateInterviewCount" resultType="java.lang.Integer">
select count(1) from hy_partner_interview_plan select count(1) from hy_partner_interview_plan
<where> <where>
@@ -296,6 +359,9 @@
<if test="record.endTime !=null and record.endTime!=''"> <if test="record.endTime !=null and record.endTime!=''">
and hpip.end_time &lt;= #{record.endTime} and hpip.end_time &lt;= #{record.endTime}
</if> </if>
<if test="record.deleted !=null and record.deleted!=''">
and hpip.deleted = #{deleted}
</if>
</where> </where>
</select> </select>
@@ -333,7 +399,7 @@
left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id
left join hy_partner_interview hpi on hpip.id = hpi.interview_plan_id left join hy_partner_interview hpi on hpip.id = hpi.interview_plan_id
left join hy_partner_certification_info hpci on hpci.partner_interview_id = hpi.id left join hy_partner_certification_info hpci on hpci.partner_interview_id = hpi.id
where hpip.id = #{interviewPlanId} where hpip.id = #{interviewPlanId} and hpip.deleted = 0 and hpi.deleted = 0
</select> </select>
<select id="selectBySelective" resultType="com.cool.store.entity.HyPartnerInterviewPlanDO"> <select id="selectBySelective" resultType="com.cool.store.entity.HyPartnerInterviewPlanDO">
select select
@@ -370,6 +436,9 @@
<if test="record.interviewDate !=null and record.interviewDate!=''"> <if test="record.interviewDate !=null and record.interviewDate!=''">
and interview_date = #{record.interviewDate} and interview_date = #{record.interviewDate}
</if> </if>
<if test="record.deleted !=null">
and deleted = #{record.deleted}
</if>
</where> </where>
</select> </select>

View File

@@ -92,4 +92,7 @@ public class HyPartnerInterviewDO implements Serializable {
@ApiModelProperty("面试官进入面试时间") @ApiModelProperty("面试官进入面试时间")
private Date interviewerEnterTime; private Date interviewerEnterTime;
@ApiModelProperty("删除标识")
private Boolean deleted;
} }

View File

@@ -1,41 +0,0 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* @author zhangchenbiao
* @date 2023-05-29 03:52
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HyPartnerInterviewLogDO implements Serializable {
@ApiModelProperty("")
private Long id;
@ApiModelProperty("hy_partner_line_info.id")
private Long partnerLineId;
@ApiModelProperty("hy_partner_interview.id")
private Long partnerInterviewId;
@ApiModelProperty("日志消息")
private String message;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("更改前副本,重新预约时才有值")
private String changeBeforeCpoy;
}

View File

@@ -0,0 +1,19 @@
package com.cool.store.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: young.yu
* @Date: 2023-06-22 19:31
* @Description:
*/
@Data
public class BasicReq {
@ApiModelProperty(value = "操作人Id", required = true)
private String operatorId;
@ApiModelProperty(value = "操作人姓名", required = true)
private String operatorName;
}

View File

@@ -12,7 +12,7 @@ import lombok.Data;
@Data @Data
@ApiModel @ApiModel
public class EntrustOthersReq { public class EntrustOthersReq {
@ApiModelProperty("会议编号") @ApiModelProperty("会议安排编号")
private String interviewPlanId; private String interviewPlanId;
@ApiModelProperty("新面试官编号") @ApiModelProperty("新面试官编号")

View File

@@ -12,6 +12,6 @@ import lombok.Data;
@Data @Data
@ApiModel @ApiModel
public class FinishInterviewReq { public class FinishInterviewReq {
@ApiModelProperty("会议编号") @ApiModelProperty("会议安排编号")
private String interviewId; private String interviewPlanId;
} }

View File

@@ -29,4 +29,10 @@ public class GetInterviewListReq extends PageBasicInfo {
private String startTime; private String startTime;
@ApiModelProperty("结束时间") @ApiModelProperty("结束时间")
private String endTime; private String endTime;
@ApiModelProperty("删除标识")
private Boolean deleted;
@ApiModelProperty("面试状态 0待预约;1预约面试待审核2待面试;3已开始;4待审核;5审批中;6审批通过;7拒绝8.超时未预约")
private Integer status;
@ApiModelProperty("0未参加1参加")
private Integer isPartnerInterview;
} }

View File

@@ -6,7 +6,7 @@ import lombok.Data;
@Data @Data
@ApiModel(description = "拒绝面试") @ApiModel(description = "拒绝面试")
public class RejectInterviewReq { public class RejectInterviewReq extends BasicReq{
@ApiModelProperty(value = "会议安排ID", required = true, example = "12345") @ApiModelProperty(value = "会议安排ID", required = true, example = "12345")
private String interviewPlanId; private String interviewPlanId;

View File

@@ -1,9 +1,11 @@
package com.cool.store.job; package com.cool.store.job;
import com.cool.store.service.EnterpriseSyncService; import com.cool.store.service.EnterpriseSyncService;
import com.cool.store.service.HyPartnerInterviewPlanService;
import com.xxl.job.core.context.XxlJobHelper; import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@@ -21,6 +23,9 @@ public class JobHandler {
@Resource @Resource
private EnterpriseSyncService enterpriseSyncService; private EnterpriseSyncService enterpriseSyncService;
@Autowired
private HyPartnerInterviewPlanService hyPartnerInterviewPlanService;
@XxlJob("syncOrganization") @XxlJob("syncOrganization")
public void syncOrganization(){ public void syncOrganization(){
log.info("组织架构定时同步开始"); log.info("组织架构定时同步开始");
@@ -29,4 +34,31 @@ public class JobHandler {
XxlJobHelper.handleSuccess(); XxlJobHelper.handleSuccess();
} }
/**
* 更新面试预约超时状态
*/
@XxlJob("updateInterviewOverTime")
public void updateInterviewOverTime(){
log.info("面试超时定时任务开始");
hyPartnerInterviewPlanService.updateInterviewOverTime();
log.info("面试超时定时任务结束");
XxlJobHelper.handleSuccess();
}
@XxlJob("openInterviewRoom")
public void openInterviewRoom(){
log.info("房间状态开启定时任务开始");
hyPartnerInterviewPlanService.openInterviewRoom();
log.info("房间状态开启定时任务结束");
XxlJobHelper.handleSuccess();
}
public void updateAbsentInterview(){
log.info("面试缺席定时任务开始");
hyPartnerInterviewPlanService.updateAbsentInterview();
log.info("面试缺席定时任务结束");
XxlJobHelper.handleSuccess();
}
} }

View File

@@ -39,4 +39,25 @@ public interface HyPartnerInterviewPlanService {
* @return * @return
*/ */
PageInfo<PartnerInterviewInfoVO> getQualifiedInterviewList(String userId,String type,Integer pageSize,Integer pageNumber); PageInfo<PartnerInterviewInfoVO> getQualifiedInterviewList(String userId,String type,Integer pageSize,Integer pageNumber);
/**
* 批量更新超时未预约面试
* updateInterviewOverTime
* @return
*/
void updateInterviewOverTime();
/**
* 批量打开十分钟之内开始的面试房间
* updateInterviewOverTime
* @return
*/
void openInterviewRoom();
/**
* 批量关闭十分钟之内结束的面试房间
* updateInterviewOverTime
* @return
*/
void updateAbsentInterview();
} }

View File

@@ -39,7 +39,7 @@ public interface InterviewService {
* 结束面试 * 结束面试
* @param request * @param request
*/ */
void finishInterview(FinishInterviewReq request); void finishInterview(FinishInterviewReq request) throws ApiException;
/** /**
* 进入面试间的方法 * 进入面试间的方法

View File

@@ -127,7 +127,7 @@ public class FlowServiceImpl implements FlowService {
partnerCertificationInfoDO.setPartnerLineId(Long.valueOf(request.getLineId())); partnerCertificationInfoDO.setPartnerLineId(Long.valueOf(request.getLineId()));
partnerCertificationInfoDO.setPartnerInterviewId(Long.valueOf(request.getInterviewId())); partnerCertificationInfoDO.setPartnerInterviewId(Long.valueOf(request.getInterviewId()));
partnerCertificationInfoDO.setPartnership(String.valueOf(request.getPartnership())); partnerCertificationInfoDO.setPartnership(String.valueOf(request.getPartnership()));
partnerCertificationInfoDO.setWantSignTime(DateUtil.parseDate(request.getWantSignTime())); partnerCertificationInfoDO.setWantSignTime(DateUtil.parse(request.getWantSignTime()));
partnerCertificationInfoDO.setPartnerFee(request.getPartnerFee()); partnerCertificationInfoDO.setPartnerFee(request.getPartnerFee());
partnerCertificationInfoDO.setSecurityFund(request.getSecurityFund()); partnerCertificationInfoDO.setSecurityFund(request.getSecurityFund());
partnerCertificationInfoDO.setTechnicalServiceFee(request.getTechnicalServiceFee()); partnerCertificationInfoDO.setTechnicalServiceFee(request.getTechnicalServiceFee());
@@ -156,7 +156,7 @@ public class FlowServiceImpl implements FlowService {
} }
hyPartnerInterviewDO.setUpdateTime(new Date()); hyPartnerInterviewDO.setUpdateTime(new Date());
//更新 //更新
hyPartnerInterviewDO.setStatus(Integer.valueOf(WorkflowStatusEnum.INTERVIEW_4.getCode())); hyPartnerInterviewDO.setStatus(Integer.valueOf(WorkflowStatusEnum.INTERVIEW_5.getCode()));
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO); hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
//4. 更新线索信息(开发主管) //4. 更新线索信息(开发主管)

View File

@@ -6,12 +6,19 @@ import com.cool.store.dao.HyPartnerInterviewPlanDAO;
import com.cool.store.dao.HyPartnerLineInfoDAO; import com.cool.store.dao.HyPartnerLineInfoDAO;
import com.cool.store.dao.HyPartnerUserInfoDAO; import com.cool.store.dao.HyPartnerUserInfoDAO;
import com.cool.store.dto.partner.PartnerInterviewInfoDTO; import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
import com.cool.store.entity.HyPartnerInterviewDO;
import com.cool.store.entity.HyPartnerInterviewPlanDO; import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.entity.HyPartnerLineInfoDO; import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerUserInfoDO; import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.enums.RoomStatus;
import com.cool.store.enums.WorkflowStageEnum; import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowStatusEnum; import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.cool.store.request.CloseFollowRequest;
import com.cool.store.request.GetInterviewListReq;
import com.cool.store.service.HyPartnerInterviewPlanService; import com.cool.store.service.HyPartnerInterviewPlanService;
import com.cool.store.service.HyPartnerLineInfoService;
import com.cool.store.utils.CoolDateUtils; import com.cool.store.utils.CoolDateUtils;
import com.cool.store.vo.InterviewDetailInfoVO; import com.cool.store.vo.InterviewDetailInfoVO;
import com.cool.store.vo.PartnerInterviewInfoVO; import com.cool.store.vo.PartnerInterviewInfoVO;
@@ -19,6 +26,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@@ -44,6 +52,15 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
@Resource @Resource
HyPartnerLineInfoDAO hyPartnerLineInfoDAO; HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
@Autowired
HyPartnerInterviewPlanMapper hyPartnerInterviewPlanMapper;
@Autowired
HyPartnerInterviewMapper hyPartnerInterviewMapper;
@Autowired
HyPartnerLineInfoService hyPartnerLineInfoService;
@Override @Override
public List<InterviewDetailInfoVO> getInterviewPlanList(String userId) { public List<InterviewDetailInfoVO> getInterviewPlanList(String userId) {
String currentTime = DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_DAY); String currentTime = DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_DAY);
@@ -137,7 +154,74 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
return partnerInterviewInfoList; return partnerInterviewInfoList;
} }
@Override
public void updateInterviewOverTime() {
//查询三天前到两天前未预约的数据
String startTime = DateUtil.formatDate(DateUtil.offsetDay(new Date(),-3));
String endTime = DateUtil.formatDate(DateUtil.offsetDay(new Date(),-2));
GetInterviewListReq getInterviewListReq = new GetInterviewListReq();
getInterviewListReq.setStartTime(startTime);
getInterviewListReq.setEndTime(endTime);
getInterviewListReq.setStatus(Integer.valueOf(WorkflowStatusEnum.RESERVATION_0.getCode()));
List<HyPartnerInterviewDO> interviewBaseInfoList = hyPartnerInterviewMapper.getInterviewBaseInfoList(getInterviewListReq);
if(CollectionUtils.isEmpty(interviewBaseInfoList)){
return;
}
handleOverTimeInterview(interviewBaseInfoList,"超时未预约");
}
@Override
public void openInterviewRoom() {
//更新会议开始时间为十分钟之内的房间状态为开启
Date startTime = new Date();
HyPartnerInterviewPlanDO hyPartnerInterviewPlanDO = new HyPartnerInterviewPlanDO();
hyPartnerInterviewPlanDO.setStartTime(startTime);
hyPartnerInterviewPlanDO.setEndTime(DateUtil.offsetMinute(startTime,10));
hyPartnerInterviewPlanDO.setRoomStatus(RoomStatus.WAIT_FOR_OPEN.getCode());
hyPartnerInterviewPlanDO.setDeleted(false);
hyPartnerInterviewPlanMapper.openInterviewRoom(hyPartnerInterviewPlanDO, RoomStatus.OPEN.getCode());
}
@Override
public void updateAbsentInterview() {
Date now = new Date();
//查询当天未参加的面试
String startTime = DateUtil.formatDate(DateUtil.offsetHour(now,-6));
String endTime = DateUtil.formatDate(now);
GetInterviewListReq getInterviewListReq = new GetInterviewListReq();
getInterviewListReq.setStartTime(startTime);
getInterviewListReq.setEndTime(endTime);
getInterviewListReq.setStatus(Integer.valueOf(WorkflowStatusEnum.RESERVATION_0.getCode()));
getInterviewListReq.setIsPartnerInterview(0);
List<HyPartnerInterviewDO> interviewBaseInfoList = hyPartnerInterviewMapper.getInterviewBaseInfoList(getInterviewListReq);
if(CollectionUtils.isEmpty(interviewBaseInfoList)){
return;
}
handleOverTimeInterview(interviewBaseInfoList,"超时未面试");
}
/**
* 统一处理面试超时情况,包括超时未预约和超时未面试
* @param interviewBaseInfoList
* @param rejectPublicReason
*/
public void handleOverTimeInterview(List<HyPartnerInterviewDO> interviewBaseInfoList,String rejectPublicReason){
//1.更新面试信息表中超时未预约的面试信息
List<Long> interviewIds = interviewBaseInfoList.stream().map(HyPartnerInterviewDO::getId).distinct().collect(Collectors.toList());
hyPartnerInterviewMapper.batchUpdateInterviewStatus(interviewIds,Integer.valueOf(WorkflowStatusEnum.RESERVATION_8.getCode()));
//2.更新面试计划表中超时未预约的信息
List<Long> interviewPlanIds = interviewBaseInfoList.stream().map(HyPartnerInterviewDO::getInterviewPlanId).distinct().collect(Collectors.toList());
hyPartnerInterviewPlanMapper.batchDeleteInterviewPlans(interviewPlanIds);
//3.更新线索表中超时未预约的线路信息
List<Long> lineIds = interviewBaseInfoList.stream().map(HyPartnerInterviewDO::getPartnerLineId).distinct().collect(Collectors.toList());
for (Long lineId : lineIds) {
CloseFollowRequest closeFollowRequest = new CloseFollowRequest();
closeFollowRequest.setRejectPublicReason("超时未面试");
closeFollowRequest.setLineId(lineId);
closeFollowRequest.setType("overtime_interview");
hyPartnerLineInfoService.closeOrPassFollow(null,closeFollowRequest);
}
}
/** /**
* convertDoToInterviewDetailInfoVO * convertDoToInterviewDetailInfoVO
* @param hyPartnerInterviewPlanDO * @param hyPartnerInterviewPlanDO

View File

@@ -284,6 +284,20 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
hyPartnerLineInfoDO.setCloseTime(new Date()); hyPartnerLineInfoDO.setCloseTime(new Date());
hyPartnerLineInfoDO.setCloseUserId(userId); hyPartnerLineInfoDO.setCloseUserId(userId);
} }
//面试超时
if ("overtime_interview".equals(closeFollowRequest.getType())){
//面试超时未预约
hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.RESERVATION_8.getCode());
//15天 冷静期
String coolingPeriodFirstLoginCacheKey = MessageFormat.format(RedisConstant.COOLINGPERIOD_FIRSTLOGIN_KEY, closeFollowRequest.getLineId());
redisUtilPool.setString(coolingPeriodFirstLoginCacheKey,JSONObject.toJSONString(closeFollowRequest));
hyPartnerLineInfoDO.setDeadline(CoolDateUtils.getDateBefore(new Date(),15));
hyPartnerLineInfoDO.setRejectPublicReason(closeFollowRequest.getRejectPublicReason());
hyPartnerLineInfoDO.setRejectRealReason(closeFollowRequest.getRejectRealReason());
hyPartnerLineInfoDO.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
hyPartnerLineInfoDO.setCloseTime(new Date());
}
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO); hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
return Boolean.TRUE; return Boolean.TRUE;
} }

View File

@@ -19,6 +19,7 @@ import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.cool.store.mapper.HyPartnerLineInfoMapper; import com.cool.store.mapper.HyPartnerLineInfoMapper;
import com.cool.store.request.*; import com.cool.store.request.*;
import com.cool.store.service.EnterpriseUserService; import com.cool.store.service.EnterpriseUserService;
import com.cool.store.service.HyPartnerLineInfoService;
import com.cool.store.service.InterviewService; import com.cool.store.service.InterviewService;
import com.cool.store.service.SmsService; import com.cool.store.service.SmsService;
import com.cool.store.utils.StringUtil; import com.cool.store.utils.StringUtil;
@@ -82,6 +83,9 @@ public class InterviewServiceImpl implements InterviewService {
@Autowired @Autowired
private SmsService smsService; private SmsService smsService;
@Autowired
private HyPartnerLineInfoService hyPartnerLineInfoService;
@Override @Override
public List<InterviewVO> getInterviewList(GetInterviewListReq request) { public List<InterviewVO> getInterviewList(GetInterviewListReq request) {
List<InterviewVO> interviewList = hyPartnerInterviewPlanMapper.getInterviewList(request); List<InterviewVO> interviewList = hyPartnerInterviewPlanMapper.getInterviewList(request);
@@ -124,6 +128,7 @@ public class InterviewServiceImpl implements InterviewService {
} }
@Override @Override
@Transactional
public void entrustOthers(EntrustOthersReq request) throws ApiException { public void entrustOthers(EntrustOthersReq request) throws ApiException {
InterviewVO interviewInfo = hyPartnerInterviewPlanMapper.getInterviewInfo(request.getInterviewPlanId()); InterviewVO interviewInfo = hyPartnerInterviewPlanMapper.getInterviewInfo(request.getInterviewPlanId());
@@ -131,6 +136,9 @@ public class InterviewServiceImpl implements InterviewService {
if (interviewInfo == null) { if (interviewInfo == null) {
throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_NOT_EXIST); throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_NOT_EXIST);
} }
if(RoomStatus.WAIT_FOR_OPEN.getCode() != Integer.parseInt(interviewInfo.getRoomStatus())){
throw new ApiException(ErrorCodeEnum.ROOM_STATUS_ERROR);
}
//1.原面试官日程删除 //1.原面试官日程删除
DeleteCalendarEventDTO deleteCalendarEventDTO = new DeleteCalendarEventDTO(); DeleteCalendarEventDTO deleteCalendarEventDTO = new DeleteCalendarEventDTO();
deleteCalendarEventDTO.setCalendarId(interviewInfo.getFeishuCalendarId()); deleteCalendarEventDTO.setCalendarId(interviewInfo.getFeishuCalendarId());
@@ -142,8 +150,8 @@ public class InterviewServiceImpl implements InterviewService {
} }
//2.新面试官日程新增 //2.新面试官日程新增
CreateCalendarEventDTO createCalendarEventDTO = new CreateCalendarEventDTO(); CreateCalendarEventDTO createCalendarEventDTO = new CreateCalendarEventDTO();
createCalendarEventDTO.setStartTime(DateUtil.parseDate(interviewInfo.getStartTime()).getTime()); createCalendarEventDTO.setStartTime(DateUtil.parse(interviewInfo.getStartTime()).getTime());
createCalendarEventDTO.setEndTime(DateUtil.parseDate(interviewInfo.getEndTime()).getTime()); createCalendarEventDTO.setEndTime(DateUtil.parse(interviewInfo.getEndTime()).getTime());
createCalendarEventDTO.setUserId(request.getNewInterviewerId()); createCalendarEventDTO.setUserId(request.getNewInterviewerId());
createCalendarEventDTO.setJoinUserIds(Arrays.asList(request.getNewInterviewerId())); createCalendarEventDTO.setJoinUserIds(Arrays.asList(request.getNewInterviewerId()));
createCalendarEventDTO.setSummary(generateInterviewTitle(request.getPartnerLineId())); createCalendarEventDTO.setSummary(generateInterviewTitle(request.getPartnerLineId()));
@@ -158,9 +166,11 @@ public class InterviewServiceImpl implements InterviewService {
record.setUpdateTime(new Date()); record.setUpdateTime(new Date());
hyPartnerInterviewPlanMapper.updateByPrimaryKeySelective(record); hyPartnerInterviewPlanMapper.updateByPrimaryKeySelective(record);
//更新面试计划信息
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO(); HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
hyPartnerInterviewDO.setInterviewPlanId(Long.valueOf(request.getInterviewPlanId())); hyPartnerInterviewDO.setInterviewPlanId(Long.valueOf(request.getInterviewPlanId()));
record.setFeishuCalendarId(userCalendarEvent.getCalendarId());
record.setFeishuScheduleId(userCalendarEvent.getEventId());
hyPartnerInterviewDO.setInterviewer(request.getNewInterviewerId()); hyPartnerInterviewDO.setInterviewer(request.getNewInterviewerId());
hyPartnerInterviewDO.setUpdateTime(new Date()); hyPartnerInterviewDO.setUpdateTime(new Date());
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO); hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
@@ -179,16 +189,9 @@ public class InterviewServiceImpl implements InterviewService {
if (interviewInfo == null) { if (interviewInfo == null) {
throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_NOT_EXIST); throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_NOT_EXIST);
} }
// UpdateCalendarEventDTO updateCalendarEventDTO = new UpdateCalendarEventDTO(); if(RoomStatus.WAIT_FOR_OPEN.getCode() != Integer.parseInt(interviewInfo.getRoomStatus())){
// updateCalendarEventDTO.setCalendarId(interviewInfo.getFeishuCalendarId()); throw new ApiException(ErrorCodeEnum.ROOM_STATUS_ERROR);
// updateCalendarEventDTO.setEventId(interviewInfo.getFeishuScheduleId()); }
// updateCalendarEventDTO.setStartTime(DateUtil.parseDate(request.getNewStartBookingTime()).getTime());
// updateCalendarEventDTO.setEndTime(DateUtil.parseDate(request.getNewEndBookingTime()).getTime());
// updateCalendarEventDTO.setUserId(interviewInfo.getInterviewerId());
// UserCalendarsEventDTO userCalendarsEventDTO = isvHttpRequest.updateUserCalendarEvent(updateCalendarEventDTO);
// if(userCalendarsEventDTO == null ){
// throw new ApiException(ErrorCodeEnum.FEISHU_UPDATE_SCHEDULE_ERROR);
// }
HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO(); HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO();
record.setId(Long.valueOf(request.getInterviewPlanId())); record.setId(Long.valueOf(request.getInterviewPlanId()));
record.setStartTime(Convert.toDate(request.getNewStartBookingTime())); record.setStartTime(Convert.toDate(request.getNewStartBookingTime()));
@@ -198,22 +201,27 @@ public class InterviewServiceImpl implements InterviewService {
} }
@Override @Override
public void finishInterview(FinishInterviewReq request) { public void finishInterview(FinishInterviewReq request) throws ApiException {
InterviewVO interviewInfo = hyPartnerInterviewPlanMapper.getInterviewInfo(request.getInterviewPlanId());
//如果面试信息为空,抛出异常
if (interviewInfo == null) {
throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_NOT_EXIST);
}
Date now = new Date();
//更新面试计划信息 //更新面试计划信息
HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO(); HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO();
record.setId(Long.valueOf(request.getInterviewId())); record.setId(Long.valueOf(request.getInterviewPlanId()));
record.setRoomStatus(0); record.setRoomStatus(RoomStatus.CLOSED.getCode());
record.setUpdateTime(new Date()); record.setUpdateTime(now);
record.setActualEndTime(now);
hyPartnerInterviewPlanMapper.updateByPrimaryKeySelective(record); hyPartnerInterviewPlanMapper.updateByPrimaryKeySelective(record);
//更新面试信息 //更新面试信息
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO(); HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
hyPartnerInterviewDO.setInterviewPlanId(Long.valueOf(request.getInterviewId())); hyPartnerInterviewDO.setInterviewPlanId(Long.valueOf(interviewInfo.getInterviewPlanId()));
hyPartnerInterviewDO.setStatus(3); hyPartnerInterviewDO.setStatus(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_4.getCode()));
hyPartnerInterviewDO.setUpdateTime(new Date()); hyPartnerInterviewDO.setUpdateTime(now);
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO); hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
} }
/** /**
@@ -268,6 +276,7 @@ public class InterviewServiceImpl implements InterviewService {
} }
HyPartnerInterviewPlanDO hyPartnerInterviewPlanDO = new HyPartnerInterviewPlanDO(); HyPartnerInterviewPlanDO hyPartnerInterviewPlanDO = new HyPartnerInterviewPlanDO();
hyPartnerInterviewPlanDO.setPartnerLineId(request.getPartnerLineId()); hyPartnerInterviewPlanDO.setPartnerLineId(request.getPartnerLineId());
hyPartnerInterviewPlanDO.setDeleted(false);
List<HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOS = hyPartnerInterviewPlanMapper.selectBySelective(hyPartnerInterviewPlanDO); List<HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOS = hyPartnerInterviewPlanMapper.selectBySelective(hyPartnerInterviewPlanDO);
if(CollectionUtils.isNotEmpty(hyPartnerInterviewPlanDOS)&&hyPartnerInterviewPlanDOS.get(0).getId()!=null){ if(CollectionUtils.isNotEmpty(hyPartnerInterviewPlanDOS)&&hyPartnerInterviewPlanDOS.get(0).getId()!=null){
throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_ALREADY_EXIST); throw new ApiException(ErrorCodeEnum.INTERVIEW_PLAN_ALREADY_EXIST);
@@ -313,6 +322,7 @@ public class InterviewServiceImpl implements InterviewService {
hyPartnerInterviewDO.setCreateTime(new Date()); hyPartnerInterviewDO.setCreateTime(new Date());
hyPartnerInterviewDO.setUpdateTime(new Date()); hyPartnerInterviewDO.setUpdateTime(new Date());
hyPartnerInterviewDO.setStatus(Integer.valueOf(WorkflowStatusEnum.RESERVATION_1.getCode())); hyPartnerInterviewDO.setStatus(Integer.valueOf(WorkflowStatusEnum.RESERVATION_1.getCode()));
hyPartnerInterviewDO.setDeleted(false);
hyPartnerInterviewMapper.insertSelective(hyPartnerInterviewDO); hyPartnerInterviewMapper.insertSelective(hyPartnerInterviewDO);
//修改线索状态 //修改线索状态
@@ -337,6 +347,7 @@ public class InterviewServiceImpl implements InterviewService {
} }
@Override @Override
@Transactional
public void approveAppointment(ApproveAppointmentReq request) throws ApiException { public void approveAppointment(ApproveAppointmentReq request) throws ApiException {
//查询面试计划信息 //查询面试计划信息
@@ -396,13 +407,71 @@ public class InterviewServiceImpl implements InterviewService {
} }
@Override @Override
@Transactional
public void reInterview(ReInterviewReq request) throws ApiException { public void reInterview(ReInterviewReq request) throws ApiException {
//查询面试计划信息
InterviewVO interviewVO = hyPartnerInterviewPlanMapper.getInterviewInfo(request.getInterviewPlanId());
//如果面试计划不存在,抛出异常
if (interviewVO == null||StringUtil.isEmpty(interviewVO.getInterviewPlanId())) {
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PLAN_NOT_EXIST);
}
//更新面试信息
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
hyPartnerInterviewDO.setId(Long.valueOf(interviewVO.getInterviewId()));
hyPartnerInterviewDO.setDeleted(true);
hyPartnerInterviewDO.setUpdateTime(new Date());
hyPartnerInterviewDO.setSummary(request.getReason());
hyPartnerInterviewDO.setCertifyFile(request.getCertifyFile());
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
//更新面试计划信息
HyPartnerInterviewPlanDO hyPartnerInterviewPlanDO = new HyPartnerInterviewPlanDO();
hyPartnerInterviewPlanDO.setId(Long.valueOf(request.getInterviewPlanId()));
hyPartnerInterviewPlanDO.setDeleted(true);
hyPartnerInterviewPlanDO.setUpdateTime(new Date());
hyPartnerInterviewPlanMapper.updateByPrimaryKeySelective(hyPartnerInterviewPlanDO);
//更新线索状态
HyPartnerLineInfoDO hyPartnerLineDO = new HyPartnerLineInfoDO();
hyPartnerLineDO.setId(Long.valueOf(request.getInterviewPlanId()));
hyPartnerLineDO.setWorkflowStage(WorkflowStageEnum.RESERVATION.getCode());
hyPartnerLineDO.setWorkflowStatus(WorkflowStatusEnum.RESERVATION_0.getCode());
hyPartnerLineDO.setUpdateTime(new Date());
hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineDO);
} }
@Override @Override
@Transactional
public void rejectInterview(RejectInterviewReq request) throws ApiException { public void rejectInterview(RejectInterviewReq request) throws ApiException {
//查询面试计划信息
InterviewVO interviewVO = hyPartnerInterviewPlanMapper.getInterviewInfo(request.getInterviewPlanId());
//如果面试计划不存在,抛出异常
if (interviewVO == null||StringUtil.isEmpty(interviewVO.getInterviewPlanId())) {
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PLAN_NOT_EXIST);
}
//更新面试信息
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
hyPartnerInterviewDO.setId(Long.valueOf(interviewVO.getInterviewId()));
hyPartnerInterviewDO.setDeleted(true);
hyPartnerInterviewDO.setUpdateTime(new Date());
hyPartnerInterviewDO.setCertifyFile(request.getCertifyFile());
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
//更新面试计划信息
HyPartnerInterviewPlanDO hyPartnerInterviewPlanDO = new HyPartnerInterviewPlanDO();
hyPartnerInterviewPlanDO.setId(Long.valueOf(request.getInterviewPlanId()));
hyPartnerInterviewPlanDO.setDeleted(true);
hyPartnerInterviewPlanDO.setUpdateTime(new Date());
hyPartnerInterviewPlanMapper.updateByPrimaryKeySelective(hyPartnerInterviewPlanDO);
//更新线索状态
CloseFollowRequest closeFollowRequest = new CloseFollowRequest();
closeFollowRequest.setRejectPublicReason(request.getRejectPublicReason());
closeFollowRequest.setRejectRealReason(request.getRejectRealReason());
closeFollowRequest.setLineId(Long.valueOf(request.getLineId()));
closeFollowRequest.setType("reject");
if(StringUtils.isNotEmpty(request.getCertifyFile())){
closeFollowRequest.setCertifyFile(Arrays.asList(request.getCertifyFile().split(",")));
}
hyPartnerLineInfoService.closeOrPassFollow(request.getOperatorId(),closeFollowRequest);
} }
public String generateFeiShuInterviewMsg(String partnerName, String partnerMobile, String interviewTime){ public String generateFeiShuInterviewMsg(String partnerName, String partnerMobile, String interviewTime){

View File

@@ -7,6 +7,7 @@ import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.entity.HyPartnerInterviewDO; import com.cool.store.entity.HyPartnerInterviewDO;
import com.cool.store.entity.HyPartnerInterviewPlanDO; import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.RoomStatus;
import com.cool.store.enums.WorkflowStatusEnum; import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.exception.ApiException; import com.cool.store.exception.ApiException;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
@@ -88,7 +89,6 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
hyPartnerInterviewPlanDO.setIsPartnerInterview(1); hyPartnerInterviewPlanDO.setIsPartnerInterview(1);
} }
//6. 修改房间状态为已开放 //6. 修改房间状态为已开放
hyPartnerInterviewPlanDO.setRoomStatus(1);
interviewPlanMapper.updateByPrimaryKeySelective(hyPartnerInterviewPlanDO); interviewPlanMapper.updateByPrimaryKeySelective(hyPartnerInterviewPlanDO);
//7. 查询对应的面试官id、姓名及加盟商姓名 //7. 查询对应的面试官id、姓名及加盟商姓名
EnterInterviewVO vo = interviewMapper.getInterviewerByInterviewPlanId(dto.getInterviewPlanId()); EnterInterviewVO vo = interviewMapper.getInterviewerByInterviewPlanId(dto.getInterviewPlanId());
@@ -135,6 +135,9 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
if (interviewInfo.getStatus() != Integer.parseInt(WorkflowStatusEnum.RESERVATION_1.getCode())) { if (interviewInfo.getStatus() != Integer.parseInt(WorkflowStatusEnum.RESERVATION_1.getCode())) {
throw new ApiException(ErrorCodeEnum.INTERVIEW_STATUS_ERROR); throw new ApiException(ErrorCodeEnum.INTERVIEW_STATUS_ERROR);
} }
if(RoomStatus.WAIT_FOR_OPEN.getCode() != Integer.parseInt(interviewInfo.getRoomStatus())){
throw new ApiException(ErrorCodeEnum.ROOM_STATUS_ERROR);
}
HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO(); HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO();
record.setId(Long.valueOf(request.getInterviewPlanId())); record.setId(Long.valueOf(request.getInterviewPlanId()));
record.setStartTime(Convert.toDate(request.getNewStartBookingTime())); record.setStartTime(Convert.toDate(request.getNewStartBookingTime()));

View File

@@ -63,7 +63,7 @@ public class InterviewController {
@PostMapping("/finish") @PostMapping("/finish")
@ApiOperation("结束面试") @ApiOperation("结束面试")
public ResponseResult finishInterview(@RequestBody FinishInterviewReq request) { public ResponseResult finishInterview(@RequestBody FinishInterviewReq request) throws ApiException {
interviewService.finishInterview(request); interviewService.finishInterview(request);
return ResponseResult.success(); return ResponseResult.success();
} }

View File

@@ -36,7 +36,7 @@ customize_sub_table_size=10
mybatis.configuration.call-setters-on-nulls=true mybatis.configuration.call-setters-on-nulls=true
mybatis.configuration.map-underscore-to-camel-case=true mybatis.configuration.map-underscore-to-camel-case=true
isv.domain = http://localhost:31100/isv isv.domain = https://abstore-isv.coolstore.cn/isv
#rocketmq \u914D\u7F6E #rocketmq \u914D\u7F6E
rocketmq.accessKey=zK2oVEz4G1ts23d2 rocketmq.accessKey=zK2oVEz4G1ts23d2