加盟商资格面试查询面试信息

This commit is contained in:
pserimal
2023-06-09 17:50:48 +08:00
parent 58d3e65fc2
commit 803625b20a
6 changed files with 317 additions and 230 deletions

View File

@@ -1,6 +1,7 @@
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.vo.PartnerInterviewInfoVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
/** /**
@@ -22,4 +23,12 @@ public interface HyPartnerInterviewMapper {
* dateTime:2023-05-29 03:52 * dateTime:2023-05-29 03:52
*/ */
int updateByPrimaryKeySelective(@Param("record") HyPartnerInterviewDO record); int updateByPrimaryKeySelective(@Param("record") HyPartnerInterviewDO record);
/**
* 根据加盟商id查询面试信息
* @param partnerId
* @return
*/
PartnerInterviewInfoVO queryByPartnerId(@Param("partnerId") String partnerId);
} }

View File

@@ -1,205 +1,233 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.HyPartnerInterviewMapper"> <mapper namespace="com.cool.store.mapper.HyPartnerInterviewMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerInterviewDO"> <resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerInterviewDO">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="status" jdbcType="TINYINT" property="status" /> <result column="status" jdbcType="TINYINT" property="status" />
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" /> <result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
<result column="interview_arrangement_id" jdbcType="BIGINT" property="interviewArrangementId" /> <result column="interview_arrangement_id" jdbcType="BIGINT" property="interviewArrangementId" />
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" /> <result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="deadline" jdbcType="TIMESTAMP" property="deadline" /> <result column="deadline" jdbcType="TIMESTAMP" property="deadline" />
<result column="interviewer" jdbcType="VARCHAR" property="interviewer" /> <result column="interviewer" jdbcType="VARCHAR" property="interviewer" />
<result column="recorder" jdbcType="VARCHAR" property="recorder" /> <result column="recorder" jdbcType="VARCHAR" property="recorder" />
<result column="process_info" jdbcType="VARCHAR" property="processInfo" /> <result column="process_info" jdbcType="VARCHAR" property="processInfo" />
<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="pass_file_url" jdbcType="VARCHAR" property="passFileUrl" /> <result column="pass_file_url" jdbcType="VARCHAR" property="passFileUrl" />
<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" />
<result column="certify_file" jdbcType="VARCHAR" property="certifyFile" /> <result column="certify_file" jdbcType="VARCHAR" property="certifyFile" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List">
id, status, partner_line_id, interview_arrangement_id, partner_id, deadline, interviewer, <resultMap id="PartnerInterviewInfoVO" type="com.cool.store.vo.PartnerInterviewInfoVO">
recorder, process_info, record_time, summary, auth_code, pass_file_url, expiry_date, <id column="interviewId" property="interviewId"/>
latest_log_message, pass_reason, certify_file, create_time, update_time <result column="partnerId" property="partnerId"/>
</sql> <result column="interviewerId" property="interviewerId"/>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true"> <association property="partnerName" column="partnerId" select="queryPartnerName" javaType="string"/>
insert into hy_partner_interview <association property="interviewerName" column="interviewerId" select="queryInterviewerName" javaType="string"/>
<trim prefix="(" suffix=")" suffixOverrides=","> </resultMap>
<if test="record.status != null">
status, <sql id="Base_Column_List">
</if> id, status, partner_line_id, interview_arrangement_id, partner_id, deadline, interviewer,
<if test="record.partnerLineId != null"> recorder, process_info, record_time, summary, auth_code, pass_file_url, expiry_date,
partner_line_id, latest_log_message, pass_reason, certify_file, create_time, update_time
</if> </sql>
<if test="record.interviewArrangementId != null"> <insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
interview_arrangement_id, insert into hy_partner_interview
</if> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="record.partnerId != null"> <if test="record.status != null">
partner_id, status,
</if> </if>
<if test="record.deadline != null"> <if test="record.partnerLineId != null">
deadline, partner_line_id,
</if> </if>
<if test="record.interviewer != null"> <if test="record.interviewArrangementId != null">
interviewer, interview_arrangement_id,
</if> </if>
<if test="record.recorder != null"> <if test="record.partnerId != null">
recorder, partner_id,
</if> </if>
<if test="record.processInfo != null"> <if test="record.deadline != null">
process_info, deadline,
</if> </if>
<if test="record.recordTime != null"> <if test="record.interviewer != null">
record_time, interviewer,
</if> </if>
<if test="record.summary != null"> <if test="record.recorder != null">
summary, recorder,
</if> </if>
<if test="record.authCode != null"> <if test="record.processInfo != null">
auth_code, process_info,
</if> </if>
<if test="record.passFileUrl != null"> <if test="record.recordTime != null">
pass_file_url, record_time,
</if> </if>
<if test="record.expiryDate != null"> <if test="record.summary != null">
expiry_date, summary,
</if> </if>
<if test="record.latestLogMessage != null"> <if test="record.authCode != null">
latest_log_message, auth_code,
</if> </if>
<if test="record.passReason != null"> <if test="record.passFileUrl != null">
pass_reason, pass_file_url,
</if> </if>
<if test="record.certifyFile != null"> <if test="record.expiryDate != null">
certify_file, expiry_date,
</if> </if>
<if test="record.createTime != null"> <if test="record.latestLogMessage != null">
create_time, latest_log_message,
</if> </if>
<if test="record.updateTime != null"> <if test="record.passReason != null">
update_time, pass_reason,
</if> </if>
</trim> <if test="record.certifyFile != null">
<trim prefix="values (" suffix=")" suffixOverrides=","> certify_file,
<if test="record.status != null"> </if>
#{record.status}, <if test="record.createTime != null">
</if> create_time,
<if test="record.partnerLineId != null"> </if>
#{record.partnerLineId}, <if test="record.updateTime != null">
</if> update_time,
<if test="record.interviewArrangementId != null"> </if>
#{record.interviewArrangementId}, </trim>
</if> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.partnerId != null"> <if test="record.status != null">
#{record.partnerId}, #{record.status},
</if> </if>
<if test="record.deadline != null"> <if test="record.partnerLineId != null">
#{record.deadline}, #{record.partnerLineId},
</if> </if>
<if test="record.interviewer != null"> <if test="record.interviewArrangementId != null">
#{record.interviewer}, #{record.interviewArrangementId},
</if> </if>
<if test="record.recorder != null"> <if test="record.partnerId != null">
#{record.recorder}, #{record.partnerId},
</if> </if>
<if test="record.processInfo != null"> <if test="record.deadline != null">
#{record.processInfo}, #{record.deadline},
</if> </if>
<if test="record.recordTime != null"> <if test="record.interviewer != null">
#{record.recordTime}, #{record.interviewer},
</if> </if>
<if test="record.summary != null"> <if test="record.recorder != null">
#{record.summary}, #{record.recorder},
</if> </if>
<if test="record.authCode != null"> <if test="record.processInfo != null">
#{record.authCode}, #{record.processInfo},
</if> </if>
<if test="record.passFileUrl != null"> <if test="record.recordTime != null">
#{record.passFileUrl}, #{record.recordTime},
</if> </if>
<if test="record.expiryDate != null"> <if test="record.summary != null">
#{record.expiryDate}, #{record.summary},
</if> </if>
<if test="record.latestLogMessage != null"> <if test="record.authCode != null">
#{record.latestLogMessage}, #{record.authCode},
</if> </if>
<if test="record.passReason != null"> <if test="record.passFileUrl != null">
#{record.passReason}, #{record.passFileUrl},
</if> </if>
<if test="record.certifyFile != null"> <if test="record.expiryDate != null">
#{record.certifyFile}, #{record.expiryDate},
</if> </if>
<if test="record.createTime != null"> <if test="record.latestLogMessage != null">
#{record.createTime}, #{record.latestLogMessage},
</if> </if>
<if test="record.updateTime != null"> <if test="record.passReason != null">
#{record.updateTime}, #{record.passReason},
</if> </if>
</trim> <if test="record.certifyFile != null">
</insert> #{record.certifyFile},
<update id="updateByPrimaryKeySelective"> </if>
update hy_partner_interview <if test="record.createTime != null">
<set> #{record.createTime},
<if test="record.status != null"> </if>
status = #{record.status}, <if test="record.updateTime != null">
</if> #{record.updateTime},
<if test="record.partnerLineId != null"> </if>
partner_line_id = #{record.partnerLineId}, </trim>
</if> </insert>
<if test="record.interviewArrangementId != null"> <update id="updateByPrimaryKeySelective">
interview_arrangement_id = #{record.interviewArrangementId}, update hy_partner_interview
</if> <set>
<if test="record.partnerId != null"> <if test="record.status != null">
partner_id = #{record.partnerId}, status = #{record.status},
</if> </if>
<if test="record.deadline != null"> <if test="record.partnerLineId != null">
deadline = #{record.deadline}, partner_line_id = #{record.partnerLineId},
</if> </if>
<if test="record.interviewer != null"> <if test="record.interviewArrangementId != null">
interviewer = #{record.interviewer}, interview_arrangement_id = #{record.interviewArrangementId},
</if> </if>
<if test="record.recorder != null"> <if test="record.partnerId != null">
recorder = #{record.recorder}, partner_id = #{record.partnerId},
</if> </if>
<if test="record.processInfo != null"> <if test="record.deadline != null">
process_info = #{record.processInfo}, deadline = #{record.deadline},
</if> </if>
<if test="record.recordTime != null"> <if test="record.interviewer != null">
record_time = #{record.recordTime}, interviewer = #{record.interviewer},
</if> </if>
<if test="record.summary != null"> <if test="record.recorder != null">
summary = #{record.summary}, recorder = #{record.recorder},
</if> </if>
<if test="record.authCode != null"> <if test="record.processInfo != null">
auth_code = #{record.authCode}, process_info = #{record.processInfo},
</if> </if>
<if test="record.passFileUrl != null"> <if test="record.recordTime != null">
pass_file_url = #{record.passFileUrl}, record_time = #{record.recordTime},
</if> </if>
<if test="record.expiryDate != null"> <if test="record.summary != null">
expiry_date = #{record.expiryDate}, summary = #{record.summary},
</if> </if>
<if test="record.latestLogMessage != null"> <if test="record.authCode != null">
latest_log_message = #{record.latestLogMessage}, auth_code = #{record.authCode},
</if> </if>
<if test="record.passReason != null"> <if test="record.passFileUrl != null">
pass_reason = #{record.passReason}, pass_file_url = #{record.passFileUrl},
</if> </if>
<if test="record.certifyFile != null"> <if test="record.expiryDate != null">
certify_file = #{record.certifyFile}, expiry_date = #{record.expiryDate},
</if> </if>
<if test="record.createTime != null"> <if test="record.latestLogMessage != null">
create_time = #{record.createTime}, latest_log_message = #{record.latestLogMessage},
</if> </if>
<if test="record.updateTime != null"> <if test="record.passReason != null">
update_time = #{record.updateTime}, pass_reason = #{record.passReason},
</if> </if>
</set> <if test="record.certifyFile != null">
where id = #{record.id} certify_file = #{record.certifyFile},
</update> </if>
<if test="record.createTime != null">
create_time = #{record.createTime},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime},
</if>
</set>
where id = #{record.id}
</update>
<!-- 根据加盟商id查询面试信息 -->
<select id="queryByPartnerId" resultMap="PartnerInterviewInfoVO">
SELECT t1.id interviewId, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId
FROM hy_partner_interview t1
LEFT JOIN hy_partner_interview_plan t2 ON t1.interview_arrangement_id = t2.id
WHERE t1.partner_id = #{partnerId}
</select>
<select id="queryPartnerName" resultType="string">
SELECT username
FROM hy_partner_user_info
WHERE partner_id = #{partnerId}
</select>
<select id="queryInterviewerName" resultType="string">
SELECT name
FROM enterprise_user
WHERE deleted = 0
AND user_id = #{interview}
</select>
</mapper> </mapper>

View File

@@ -15,48 +15,31 @@ import java.util.Date;
@ApiModel @ApiModel
public class PartnerInterviewInfoVO { public class PartnerInterviewInfoVO {
@ApiModelProperty("会议id")
@ApiModelProperty("") private String interviewId;
private Long id;
@ApiModelProperty("加盟商用户名称")
private String partnerUserName;
@ApiModelProperty("预约状态 0 待预约;1待面试;2已开始;3待审核;4审批中;5审批通过;6拒绝") @ApiModelProperty("预约状态 0 待预约;1待面试;2已开始;3待审核;4审批中;5审批通过;6拒绝")
private Integer status; private Integer status;
@ApiModelProperty("hy_partner_line_info.id") @ApiModelProperty("会议开始时间")
private Long partnerLineId; private String startTime;
@ApiModelProperty("hy_partner_interview_arrangement.id") @ApiModelProperty("会议结束时间")
private Long interviewArrangementId; private String endTime;
@ApiModelProperty("房间号")
private String roomId;
@ApiModelProperty("加盟商用户ID") @ApiModelProperty("加盟商用户ID")
private String partnerId; private String partnerId;
@ApiModelProperty("截止时间") @ApiModelProperty("加盟商用户名称")
private Date deadline; private String partnerName;
@ApiModelProperty("审批发起时间")
private Date approveTime;
@ApiModelProperty("意向合同号")
private String authCode;
@ApiModelProperty("面试开始时间")
private Date startTime;
@ApiModelProperty("面试官ID") @ApiModelProperty("面试官ID")
private String interviewer; private String interviewerId;
@ApiModelProperty("面试官名称") @ApiModelProperty("面试官名称")
private String interviewerName; private String interviewerName;
@ApiModelProperty("预约时间")
private Date createTime;
@ApiModelProperty("房间号")
private String roomId;
@ApiModelProperty("过程信息")
private String processInfo;
} }

View File

@@ -0,0 +1,14 @@
package com.cool.store.service;
import com.cool.store.vo.PartnerInterviewInfoVO;
public interface PartnerInterviewService {
/**
* 加盟商查询面试信息
* @param partnerId
* @return
*/
PartnerInterviewInfoVO queryByPartnerId(String partnerId);
}

View File

@@ -0,0 +1,25 @@
package com.cool.store.service.impl;
import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.service.PartnerInterviewService;
import com.cool.store.vo.PartnerInterviewInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class PartnerInterviewServiceImpl implements PartnerInterviewService {
@Autowired
private HyPartnerInterviewMapper interviewMapper;
/**
* 加盟商查询面试信息
* @param partnerId
* @return
*/
@Override
public PartnerInterviewInfoVO queryByPartnerId(String partnerId) {
return interviewMapper.queryByPartnerId(partnerId);
}
}

View File

@@ -0,0 +1,28 @@
package com.cool.store.controller;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.PartnerInterviewService;
import com.cool.store.vo.PartnerInterviewInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "加盟商资格面试")
@RestController
@RequestMapping("interview")
public class InterviewController {
@Autowired
private PartnerInterviewService interviewService;
@PostMapping("/queryByPartnerId")
@ApiOperation("根据用户id查询面试信息")
public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestParam String partnerId) {
return ResponseResult.success(interviewService.queryByPartnerId(partnerId));
}
}