Files
zxjp-web/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml
2023-07-26 10:09:11 +08:00

159 lines
5.5 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.HyInterviewInspectionLogMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyInterviewInspectionLogDO">
<constructor>
<idArg column="id" javaType="java.lang.Long" />
<arg column="operator_user_id" javaType="java.lang.String" />
<arg column="inspection_id" javaType="java.lang.Long" />
<arg column="operation_type" javaType="java.lang.Byte" />
<arg column="description" javaType="java.lang.String" />
<arg column="files" javaType="java.lang.String" />
<arg column="operation_time" javaType="java.lang.String" />
<arg column="remark" javaType="java.lang.String" />
<arg column="create_time" javaType="java.lang.String" />
<arg column="update_time" javaType="java.lang.String" />
</constructor>
</resultMap>
<sql id="Base_Column_List">
id, operator_user_id, inspection_id, operation_type, description, files, operation_time,
remark, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hy_interview_inspection_log
where id = #{id}
</select>
<select id="interviewInspectionGetHistoryDetail" resultType="com.cool.store.vo.interview.InterviewInspectionHistoryInfo">
SELECT a.id, b.`name` as operatorUserName, b.mobile as operatorUserMobile,operation_time as inspectionTime, operation_type as operationType ,description,files as filesStr
FROM hy_interview_inspection_log a left join enterprise_user b on a.operator_user_id=b.user_id and b.deleted=0 WHERE inspection_id=#{inspectionId} ORDER BY operation_time desc
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from hy_interview_inspection_log
where id = #{id}
</delete>
<insert id="insert" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
insert into hy_interview_inspection_log (id, operator_user_id, inspection_id,
operation_type, description, files,
operation_time, remark, create_time,
update_time)
values (#{id}, #{operatorUserId}, #{inspectionId},
#{operationType}, #{description}, #{files},
#{operationTime}, #{remark}, #{createTime},
#{updateTime})
</insert>
<insert id="insertSelective" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
insert into hy_interview_inspection_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="operatorUserId != null">
operator_user_id,
</if>
<if test="inspectionId != null">
inspection_id,
</if>
<if test="operationType != null">
operation_type,
</if>
<if test="description != null">
description,
</if>
<if test="files != null">
files,
</if>
<if test="operationTime != null">
operation_time,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id},
</if>
<if test="operatorUserId != null">
#{operatorUserId},
</if>
<if test="inspectionId != null">
#{inspectionId},
</if>
<if test="operationType != null">
#{operationType},
</if>
<if test="description != null">
#{description},
</if>
<if test="files != null">
#{files},
</if>
<if test="operationTime != null">
#{operationTime},
</if>
<if test="remark != null">
#{remark},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
update hy_interview_inspection_log
<set>
<if test="operatorUserId != null">
operator_user_id = #{operatorUserId},
</if>
<if test="inspectionId != null">
inspection_id = #{inspectionId},
</if>
<if test="operationType != null">
operation_type = #{operationType},
</if>
<if test="description != null">
description = #{description},
</if>
<if test="files != null">
files = #{files},
</if>
<if test="operationTime != null">
operation_time = #{operationTime},
</if>
<if test="remark != null">
remark = #{remark},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
</set>
where id = #{id}
</update>
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
update hy_interview_inspection_log
set operator_user_id = #{operatorUserId},
inspection_id = #{inspectionId},
operation_type = #{operationType},
description = #{description},
files = #{files},
operation_time = #{operationTime},
remark = #{remark},
create_time = #{createTime},
update_time = #{updateTime}
where id = #{id}
</update>
</mapper>