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

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;
import com.cool.store.entity.HyPartnerInterviewDO;
import com.cool.store.vo.PartnerInterviewInfoVO;
import org.apache.ibatis.annotations.Param;
/**
@@ -22,4 +23,12 @@ public interface HyPartnerInterviewMapper {
* dateTime:2023-05-29 03:52
*/
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"?>
<!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">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerInterviewDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
<result column="interview_arrangement_id" jdbcType="BIGINT" property="interviewArrangementId" />
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="deadline" jdbcType="TIMESTAMP" property="deadline" />
<result column="interviewer" jdbcType="VARCHAR" property="interviewer" />
<result column="recorder" jdbcType="VARCHAR" property="recorder" />
<result column="process_info" jdbcType="VARCHAR" property="processInfo" />
<result column="record_time" jdbcType="TIMESTAMP" property="recordTime" />
<result column="summary" jdbcType="VARCHAR" property="summary" />
<result column="auth_code" jdbcType="VARCHAR" property="authCode" />
<result column="pass_file_url" jdbcType="VARCHAR" property="passFileUrl" />
<result column="expiry_date" jdbcType="TIMESTAMP" property="expiryDate" />
<result column="latest_log_message" jdbcType="VARCHAR" property="latestLogMessage" />
<result column="pass_reason" jdbcType="VARCHAR" property="passReason" />
<result column="certify_file" jdbcType="VARCHAR" property="certifyFile" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, status, partner_line_id, interview_arrangement_id, partner_id, deadline, interviewer,
recorder, process_info, record_time, summary, auth_code, pass_file_url, expiry_date,
latest_log_message, pass_reason, certify_file, create_time, update_time
</sql>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_interview
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="record.status != null">
status,
</if>
<if test="record.partnerLineId != null">
partner_line_id,
</if>
<if test="record.interviewArrangementId != null">
interview_arrangement_id,
</if>
<if test="record.partnerId != null">
partner_id,
</if>
<if test="record.deadline != null">
deadline,
</if>
<if test="record.interviewer != null">
interviewer,
</if>
<if test="record.recorder != null">
recorder,
</if>
<if test="record.processInfo != null">
process_info,
</if>
<if test="record.recordTime != null">
record_time,
</if>
<if test="record.summary != null">
summary,
</if>
<if test="record.authCode != null">
auth_code,
</if>
<if test="record.passFileUrl != null">
pass_file_url,
</if>
<if test="record.expiryDate != null">
expiry_date,
</if>
<if test="record.latestLogMessage != null">
latest_log_message,
</if>
<if test="record.passReason != null">
pass_reason,
</if>
<if test="record.certifyFile != null">
certify_file,
</if>
<if test="record.createTime != null">
create_time,
</if>
<if test="record.updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.status != null">
#{record.status},
</if>
<if test="record.partnerLineId != null">
#{record.partnerLineId},
</if>
<if test="record.interviewArrangementId != null">
#{record.interviewArrangementId},
</if>
<if test="record.partnerId != null">
#{record.partnerId},
</if>
<if test="record.deadline != null">
#{record.deadline},
</if>
<if test="record.interviewer != null">
#{record.interviewer},
</if>
<if test="record.recorder != null">
#{record.recorder},
</if>
<if test="record.processInfo != null">
#{record.processInfo},
</if>
<if test="record.recordTime != null">
#{record.recordTime},
</if>
<if test="record.summary != null">
#{record.summary},
</if>
<if test="record.authCode != null">
#{record.authCode},
</if>
<if test="record.passFileUrl != null">
#{record.passFileUrl},
</if>
<if test="record.expiryDate != null">
#{record.expiryDate},
</if>
<if test="record.latestLogMessage != null">
#{record.latestLogMessage},
</if>
<if test="record.passReason != null">
#{record.passReason},
</if>
<if test="record.certifyFile != null">
#{record.certifyFile},
</if>
<if test="record.createTime != null">
#{record.createTime},
</if>
<if test="record.updateTime != null">
#{record.updateTime},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
update hy_partner_interview
<set>
<if test="record.status != null">
status = #{record.status},
</if>
<if test="record.partnerLineId != null">
partner_line_id = #{record.partnerLineId},
</if>
<if test="record.interviewArrangementId != null">
interview_arrangement_id = #{record.interviewArrangementId},
</if>
<if test="record.partnerId != null">
partner_id = #{record.partnerId},
</if>
<if test="record.deadline != null">
deadline = #{record.deadline},
</if>
<if test="record.interviewer != null">
interviewer = #{record.interviewer},
</if>
<if test="record.recorder != null">
recorder = #{record.recorder},
</if>
<if test="record.processInfo != null">
process_info = #{record.processInfo},
</if>
<if test="record.recordTime != null">
record_time = #{record.recordTime},
</if>
<if test="record.summary != null">
summary = #{record.summary},
</if>
<if test="record.authCode != null">
auth_code = #{record.authCode},
</if>
<if test="record.passFileUrl != null">
pass_file_url = #{record.passFileUrl},
</if>
<if test="record.expiryDate != null">
expiry_date = #{record.expiryDate},
</if>
<if test="record.latestLogMessage != null">
latest_log_message = #{record.latestLogMessage},
</if>
<if test="record.passReason != null">
pass_reason = #{record.passReason},
</if>
<if test="record.certifyFile != null">
certify_file = #{record.certifyFile},
</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>
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerInterviewDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
<result column="interview_arrangement_id" jdbcType="BIGINT" property="interviewArrangementId" />
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="deadline" jdbcType="TIMESTAMP" property="deadline" />
<result column="interviewer" jdbcType="VARCHAR" property="interviewer" />
<result column="recorder" jdbcType="VARCHAR" property="recorder" />
<result column="process_info" jdbcType="VARCHAR" property="processInfo" />
<result column="record_time" jdbcType="TIMESTAMP" property="recordTime" />
<result column="summary" jdbcType="VARCHAR" property="summary" />
<result column="auth_code" jdbcType="VARCHAR" property="authCode" />
<result column="pass_file_url" jdbcType="VARCHAR" property="passFileUrl" />
<result column="expiry_date" jdbcType="TIMESTAMP" property="expiryDate" />
<result column="latest_log_message" jdbcType="VARCHAR" property="latestLogMessage" />
<result column="pass_reason" jdbcType="VARCHAR" property="passReason" />
<result column="certify_file" jdbcType="VARCHAR" property="certifyFile" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap id="PartnerInterviewInfoVO" type="com.cool.store.vo.PartnerInterviewInfoVO">
<id column="interviewId" property="interviewId"/>
<result column="partnerId" property="partnerId"/>
<result column="interviewerId" property="interviewerId"/>
<association property="partnerName" column="partnerId" select="queryPartnerName" javaType="string"/>
<association property="interviewerName" column="interviewerId" select="queryInterviewerName" javaType="string"/>
</resultMap>
<sql id="Base_Column_List">
id, status, partner_line_id, interview_arrangement_id, partner_id, deadline, interviewer,
recorder, process_info, record_time, summary, auth_code, pass_file_url, expiry_date,
latest_log_message, pass_reason, certify_file, create_time, update_time
</sql>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_interview
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="record.status != null">
status,
</if>
<if test="record.partnerLineId != null">
partner_line_id,
</if>
<if test="record.interviewArrangementId != null">
interview_arrangement_id,
</if>
<if test="record.partnerId != null">
partner_id,
</if>
<if test="record.deadline != null">
deadline,
</if>
<if test="record.interviewer != null">
interviewer,
</if>
<if test="record.recorder != null">
recorder,
</if>
<if test="record.processInfo != null">
process_info,
</if>
<if test="record.recordTime != null">
record_time,
</if>
<if test="record.summary != null">
summary,
</if>
<if test="record.authCode != null">
auth_code,
</if>
<if test="record.passFileUrl != null">
pass_file_url,
</if>
<if test="record.expiryDate != null">
expiry_date,
</if>
<if test="record.latestLogMessage != null">
latest_log_message,
</if>
<if test="record.passReason != null">
pass_reason,
</if>
<if test="record.certifyFile != null">
certify_file,
</if>
<if test="record.createTime != null">
create_time,
</if>
<if test="record.updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.status != null">
#{record.status},
</if>
<if test="record.partnerLineId != null">
#{record.partnerLineId},
</if>
<if test="record.interviewArrangementId != null">
#{record.interviewArrangementId},
</if>
<if test="record.partnerId != null">
#{record.partnerId},
</if>
<if test="record.deadline != null">
#{record.deadline},
</if>
<if test="record.interviewer != null">
#{record.interviewer},
</if>
<if test="record.recorder != null">
#{record.recorder},
</if>
<if test="record.processInfo != null">
#{record.processInfo},
</if>
<if test="record.recordTime != null">
#{record.recordTime},
</if>
<if test="record.summary != null">
#{record.summary},
</if>
<if test="record.authCode != null">
#{record.authCode},
</if>
<if test="record.passFileUrl != null">
#{record.passFileUrl},
</if>
<if test="record.expiryDate != null">
#{record.expiryDate},
</if>
<if test="record.latestLogMessage != null">
#{record.latestLogMessage},
</if>
<if test="record.passReason != null">
#{record.passReason},
</if>
<if test="record.certifyFile != null">
#{record.certifyFile},
</if>
<if test="record.createTime != null">
#{record.createTime},
</if>
<if test="record.updateTime != null">
#{record.updateTime},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
update hy_partner_interview
<set>
<if test="record.status != null">
status = #{record.status},
</if>
<if test="record.partnerLineId != null">
partner_line_id = #{record.partnerLineId},
</if>
<if test="record.interviewArrangementId != null">
interview_arrangement_id = #{record.interviewArrangementId},
</if>
<if test="record.partnerId != null">
partner_id = #{record.partnerId},
</if>
<if test="record.deadline != null">
deadline = #{record.deadline},
</if>
<if test="record.interviewer != null">
interviewer = #{record.interviewer},
</if>
<if test="record.recorder != null">
recorder = #{record.recorder},
</if>
<if test="record.processInfo != null">
process_info = #{record.processInfo},
</if>
<if test="record.recordTime != null">
record_time = #{record.recordTime},
</if>
<if test="record.summary != null">
summary = #{record.summary},
</if>
<if test="record.authCode != null">
auth_code = #{record.authCode},
</if>
<if test="record.passFileUrl != null">
pass_file_url = #{record.passFileUrl},
</if>
<if test="record.expiryDate != null">
expiry_date = #{record.expiryDate},
</if>
<if test="record.latestLogMessage != null">
latest_log_message = #{record.latestLogMessage},
</if>
<if test="record.passReason != null">
pass_reason = #{record.passReason},
</if>
<if test="record.certifyFile != null">
certify_file = #{record.certifyFile},
</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>