<?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.ltkj.hosp.mapper.TjHzReplyLogMapper">
|
|
<resultMap type="TjHzReplyLog" id="TjHzReplyLogResult">
|
<result property="id" column="id"/>
|
<result property="orderId" column="order_id"/>
|
<result property="tjNumber" column="tj_number"/>
|
<result property="userId" column="user_id"/>
|
<result property="userName" column="user_name"/>
|
<result property="hzType" column="hz_type"/>
|
<result property="replyDoctorId" column="reply_doctor_id"/>
|
<result property="replyDoctorName" column="reply_doctor_name"/>
|
<result property="replyDeptId" column="reply_dept_id"/>
|
<result property="replyDeptName" column="reply_dept_name"/>
|
<result property="replyContent" column="reply_content"/>
|
<result property="status" column="status"/>
|
<result property="remark" column="remark"/>
|
<result property="createTime" column="create_time"/>
|
<result property="updateTime" column="update_time"/>
|
<result property="createBy" column="create_by"/>
|
<result property="updateBy" column="update_by"/>
|
<result property="deleted" column="deleted"/>
|
<result property="hzId" column="hz_id"/>
|
<result property="hzDoctorId" column="hz_doctor_id"/>
|
<result property="hzDoctorName" column="hz_doctor_name"/>
|
</resultMap>
|
|
<sql id="selectTjHzReplyLogVo">
|
select id, order_id, tj_number, user_id, user_name, hz_type, reply_doctor_id, reply_doctor_name, reply_dept_id, reply_dept_name, reply_content, status, remark, create_time, update_time, create_by, update_by, deleted, hz_id, hz_doctor_id, hz_doctor_name
|
from tj_hz_reply_log
|
</sql>
|
|
<select id="selectTjHzReplyLogList" parameterType="TjHzReplyLog" resultMap="TjHzReplyLogResult">
|
<include refid="selectTjHzReplyLogVo"/>
|
<where>
|
<if test="tjNumber != null and tjNumber != ''">
|
and tj_number = #{tjNumber}
|
</if>
|
<if test="userName != null and userName != ''">
|
and user_name like concat('%', #{userName}, '%')
|
</if>
|
<if test="hzType != null and hzType != ''">
|
and hz_type = #{hzType}
|
</if>
|
<if test="hzDoctorName != null and hzDoctorName != ''">
|
and hz_doctor_name like concat('%', #{hzDoctorName}, '%')
|
</if>
|
</where>
|
</select>
|
|
<select id="selectTjHzReplyLogById" parameterType="Long"
|
resultMap="TjHzReplyLogResult">
|
<include refid="selectTjHzReplyLogVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertTjHzReplyLog" parameterType="TjHzReplyLog" useGeneratedKeys="true"
|
keyProperty="id">
|
insert into tj_hz_reply_log
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="orderId != null">order_id,
|
</if>
|
<if test="tjNumber != null">tj_number,
|
</if>
|
<if test="userId != null">user_id,
|
</if>
|
<if test="userName != null">user_name,
|
</if>
|
<if test="hzType != null">hz_type,
|
</if>
|
<if test="replyDoctorId != null">reply_doctor_id,
|
</if>
|
<if test="replyDoctorName != null">reply_doctor_name,
|
</if>
|
<if test="replyDeptId != null">reply_dept_id,
|
</if>
|
<if test="replyDeptName != null">reply_dept_name,
|
</if>
|
<if test="replyContent != null">reply_content,
|
</if>
|
<if test="status != null">status,
|
</if>
|
<if test="remark != null">remark,
|
</if>
|
<if test="createTime != null">create_time,
|
</if>
|
<if test="updateTime != null">update_time,
|
</if>
|
<if test="createBy != null">create_by,
|
</if>
|
<if test="updateBy != null">update_by,
|
</if>
|
<if test="deleted != null">deleted,
|
</if>
|
<if test="hzId != null">hz_id,
|
</if>
|
<if test="hzDoctorId != null">hz_doctor_id,
|
</if>
|
<if test="hzDoctorName != null">hz_doctor_name,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="orderId != null">#{orderId},
|
</if>
|
<if test="tjNumber != null">#{tjNumber},
|
</if>
|
<if test="userId != null">#{userId},
|
</if>
|
<if test="userName != null">#{userName},
|
</if>
|
<if test="hzType != null">#{hzType},
|
</if>
|
<if test="replyDoctorId != null">#{replyDoctorId},
|
</if>
|
<if test="replyDoctorName != null">#{replyDoctorName},
|
</if>
|
<if test="replyDeptId != null">#{replyDeptId},
|
</if>
|
<if test="replyDeptName != null">#{replyDeptName},
|
</if>
|
<if test="replyContent != null">#{replyContent},
|
</if>
|
<if test="status != null">#{status},
|
</if>
|
<if test="remark != null">#{remark},
|
</if>
|
<if test="createTime != null">#{createTime},
|
</if>
|
<if test="updateTime != null">#{updateTime},
|
</if>
|
<if test="createBy != null">#{createBy},
|
</if>
|
<if test="updateBy != null">#{updateBy},
|
</if>
|
<if test="deleted != null">#{deleted},
|
</if>
|
<if test="hzId != null">#{hzId},
|
</if>
|
<if test="hzDoctorId != null">#{hzDoctorId},
|
</if>
|
<if test="hzDoctorName != null">#{hzDoctorName},
|
</if>
|
</trim>
|
</insert>
|
|
<update id="updateTjHzReplyLog" parameterType="TjHzReplyLog">
|
update tj_hz_reply_log
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="orderId != null">order_id =
|
#{orderId},
|
</if>
|
<if test="tjNumber != null">tj_number =
|
#{tjNumber},
|
</if>
|
<if test="userId != null">user_id =
|
#{userId},
|
</if>
|
<if test="userName != null">user_name =
|
#{userName},
|
</if>
|
<if test="hzType != null">hz_type =
|
#{hzType},
|
</if>
|
<if test="replyDoctorId != null">reply_doctor_id =
|
#{replyDoctorId},
|
</if>
|
<if test="replyDoctorName != null">reply_doctor_name =
|
#{replyDoctorName},
|
</if>
|
<if test="replyDeptId != null">reply_dept_id =
|
#{replyDeptId},
|
</if>
|
<if test="replyDeptName != null">reply_dept_name =
|
#{replyDeptName},
|
</if>
|
<if test="replyContent != null">reply_content =
|
#{replyContent},
|
</if>
|
<if test="status != null">status =
|
#{status},
|
</if>
|
<if test="remark != null">remark =
|
#{remark},
|
</if>
|
<if test="createTime != null">create_time =
|
#{createTime},
|
</if>
|
<if test="updateTime != null">update_time =
|
#{updateTime},
|
</if>
|
<if test="createBy != null">create_by =
|
#{createBy},
|
</if>
|
<if test="updateBy != null">update_by =
|
#{updateBy},
|
</if>
|
<if test="deleted != null">deleted =
|
#{deleted},
|
</if>
|
<if test="hzId != null">hz_id =
|
#{hzId},
|
</if>
|
<if test="hzDoctorId != null">hz_doctor_id =
|
#{hzDoctorId},
|
</if>
|
<if test="hzDoctorName != null">hz_doctor_name =
|
#{hzDoctorName},
|
</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteTjHzReplyLogById" parameterType="Long">
|
delete
|
from tj_hz_reply_log where id = #{id}
|
</delete>
|
|
<delete id="deleteTjHzReplyLogByIds" parameterType="String">
|
delete from tj_hz_reply_log where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|