Files
Vetti-Service-new/vetti-hotakes/src/main/resources/mapper/hotake/HotakeAiInterviewQuestionsInfoMapper.xml
2026-01-23 21:36:15 +08:00

116 lines
6.6 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.vetti.hotake.mapper.HotakeAiInterviewQuestionsInfoMapper">
<resultMap type="HotakeAiInterviewQuestionsInfo" id="HotakeAiInterviewQuestionsInfoResult">
<result property="id" column="id" />
<result property="roleId" column="role_id" />
<result property="recruiterId" column="recruiter_id" />
<result property="questionTitle" column="question_title" />
<result property="overview" column="overview" />
<result property="focusType" column="focus_type" />
<result property="questionJson" column="question_json" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectHotakeAiInterviewQuestionsInfoVo">
select id, role_id, recruiter_id, question_title, overview, focus_type, question_json, del_flag, create_by, create_time, update_by, update_time, remark from hotake_ai_interview_questions_info
</sql>
<select id="selectHotakeAiInterviewQuestionsInfoList" parameterType="HotakeAiInterviewQuestionsInfo" resultMap="HotakeAiInterviewQuestionsInfoResult">
<include refid="selectHotakeAiInterviewQuestionsInfoVo"/>
<where>
<if test="roleId != null "> and role_id = #{roleId}</if>
<if test="recruiterId != null "> and recruiter_id = #{recruiterId}</if>
<if test="questionTitle != null and questionTitle != ''"> and question_title = #{questionTitle}</if>
<if test="overview != null and overview != ''"> and overview = #{overview}</if>
<if test="focusType != null and focusType != ''"> and focus_type = #{focusType}</if>
<if test="questionJson != null and questionJson != ''"> and question_json = #{questionJson}</if>
</where>
</select>
<select id="selectHotakeAiInterviewQuestionsInfoById" parameterType="Long" resultMap="HotakeAiInterviewQuestionsInfoResult">
<include refid="selectHotakeAiInterviewQuestionsInfoVo"/>
where id = #{id}
</select>
<insert id="insertHotakeAiInterviewQuestionsInfo" parameterType="HotakeAiInterviewQuestionsInfo" useGeneratedKeys="true" keyProperty="id">
insert into hotake_ai_interview_questions_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="roleId != null">role_id,</if>
<if test="recruiterId != null">recruiter_id,</if>
<if test="questionTitle != null">question_title,</if>
<if test="overview != null">overview,</if>
<if test="focusType != null">focus_type,</if>
<if test="questionJson != null">question_json,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="roleId != null">#{roleId},</if>
<if test="recruiterId != null">#{recruiterId},</if>
<if test="questionTitle != null">#{questionTitle},</if>
<if test="overview != null">#{overview},</if>
<if test="focusType != null">#{focusType},</if>
<if test="questionJson != null">#{questionJson},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateHotakeAiInterviewQuestionsInfo" parameterType="HotakeAiInterviewQuestionsInfo">
update hotake_ai_interview_questions_info
<trim prefix="SET" suffixOverrides=",">
<if test="roleId != null">role_id = #{roleId},</if>
<if test="recruiterId != null">recruiter_id = #{recruiterId},</if>
<if test="questionTitle != null">question_title = #{questionTitle},</if>
<if test="overview != null">overview = #{overview},</if>
<if test="focusType != null">focus_type = #{focusType},</if>
<if test="questionJson != null">question_json = #{questionJson},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteHotakeAiInterviewQuestionsInfoById" parameterType="Long">
delete from hotake_ai_interview_questions_info where id = #{id}
</delete>
<delete id="deleteHotakeAiInterviewQuestionsInfoByRoleId" parameterType="Long">
delete from hotake_ai_interview_questions_info where role_id = #{roleId}
</delete>
<delete id="deleteHotakeAiInterviewQuestionsInfoByIds" parameterType="String">
delete from hotake_ai_interview_questions_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="batchInsertHotakeAiInterviewQuestionsInfo">
insert into hotake_ai_interview_questions_info( id, role_id, recruiter_id, question_title, overview, focus_type, question_json, del_flag, create_by, create_time, update_by, update_time, remark,) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.roleId}, #{item.recruiterId}, #{item.questionTitle}, #{item.overview}, #{item.focusType}, #{item.questionJson}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark},)
</foreach>
</insert>
</mapper>