Files
zxjp-web/coolstore-partner-dao/src/main/resources/mapper/LineInterviewMapper.xml
zhangchenbiao 903afe7b90 面试/面谈
2024-03-26 11:25:17 +08:00

90 lines
4.3 KiB
XML

<?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.LineInterviewMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.LineInterviewDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="line_id" jdbcType="BIGINT" property="lineId" />
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="region_id" jdbcType="BIGINT" property="regionId" />
<result column="interview_date" jdbcType="DATE" property="interviewDate" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="join_interview_status" jdbcType="TINYINT" property="joinInterviewStatus" />
<result column="actual_start_time" jdbcType="TIMESTAMP" property="actualStartTime" />
<result column="actual_end_time" jdbcType="TIMESTAMP" property="actualEndTime" />
<result column="room_id" jdbcType="VARCHAR" property="roomId" />
<result column="room_password" jdbcType="VARCHAR" property="roomPassword" />
<result column="interviewer_user_id" jdbcType="VARCHAR" property="interviewerUserId" />
<result column="room_status" jdbcType="TINYINT" property="roomStatus" />
<result column="interview_status" jdbcType="TINYINT" property="interviewStatus" />
<result column="interview_type" jdbcType="TINYINT" property="interviewType" />
<result column="video_url" jdbcType="VARCHAR" property="videoUrl" />
<result column="audit_id" jdbcType="BIGINT" property="auditId" />
<result column="calendars_event_id" jdbcType="BIGINT" property="calendarsEventId" />
<result column="deleted" jdbcType="BIT" property="deleted" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<select id="getInterviewInfo" resultMap="BaseResultMap">
select * from xfsg_line_interview where line_id = #{lineId} and interview_type = #{interviewType} and deleted = '0'
</select>
<select id="getInterviewerPage" resultType="com.cool.store.dto.interview.LineInterviewPageDTO">
select
a.id as interviewId,
a.line_id as lineId,
a.start_time as startTime,
a.end_time as endTime,
a.actual_start_time as actualStartTime,
a.actual_end_time as actualEndTime,
a.interviewer_user_id as interviewerUserId,
a.interview_status as interviewStatus,
a.interview_type as interviewType,
a.room_id as roomId,
b.username as username,
b.mobile as mobile,
b.user_portrait as userPortrait,
b.want_shop_area_id as wantShopAreaId,
b.investment_manager as investmentManager,
b.user_portrait as userPortrait,
b.line_source as lineSource
from
xfsg_line_interview a inner join xfsg_line_info b on a.line_id = b.id
where
a.deleted = '0' and b.deleted = '0' and a.interview_type = #{interviewType}
<if test="username != null and username != ''">
and b.username like concat('%', #{username}, '%')
</if>
<if test="mobile != null and mobile != ''">
and b.mobile like concat('%', #{mobile}, '%')
</if>
<if test="workflowStage != null and workflowStage != ''">
and b.workflow_stage = #{workflowStage}
</if>
<if test="workflowSubStage != null and workflowSubStage != ''">
and b.workflow_sub_stage = #{workflowSubStage}
</if>
<if test="interviewStatus != null and interviewStatus != ''">
and a.interview_status = #{interviewStatus}
</if>
<if test="lineSource != null and lineSource != ''">
and b.line_source = #{lineSource}
</if>
<if test="interviewStartTime != null and interviewEndTime != null ">
and a.start_time between #{interviewStartTime} and #{interviewEndTime}
</if>
<if test="interviewerUserId != null and interviewerUserId != ''">
and a.interviewer_user_id = #{interviewerUserId}
</if>
</select>
<select id="getInterviewInfoByRoomId" resultMap="BaseResultMap">
select * from xfsg_line_interview where room_id = #{roomId} and deleted = '0'
</select>
<update id="deleteInterviewInfo">
update xfsg_line_interview set deleted = '1' where id = #{interviewId}
</update>
</mapper>