92 lines
5.1 KiB
XML
92 lines
5.1 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.ruoyi.os.mapper.HealthcareOsComplaintsMapper">
|
|
<resultMap type="HealthcareOsComplaints" id="HealthcareOsComplaintsResult">
|
|
<result property="id" column="id" />
|
|
<result property="complaintName" column="complaint_name" />
|
|
<result property="currentHistory" column="current_history" />
|
|
<result property="pastHistory" column="past_history" />
|
|
<result property="diagnosis" column="diagnosis" />
|
|
<result property="medicalAdvice" column="medical_advice" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectHealthcareOsComplaintsVo">
|
|
select id, complaint_name, current_history, past_history, diagnosis, medical_advice, create_by, create_time, update_by, update_time from healthcare_os_complaints
|
|
</sql>
|
|
|
|
<select id="selectHealthcareOsComplaintsList" parameterType="HealthcareOsComplaints" resultMap="HealthcareOsComplaintsResult">
|
|
<include refid="selectHealthcareOsComplaintsVo"/>
|
|
<where>
|
|
<if test="complaintName != null and complaintName != ''"> and complaint_name like concat('%', #{complaintName}, '%')</if>
|
|
<if test="currentHistory != null and currentHistory != ''"> and current_history = #{currentHistory}</if>
|
|
<if test="pastHistory != null and pastHistory != ''"> and past_history = #{pastHistory}</if>
|
|
<if test="diagnosis != null and diagnosis != ''"> and diagnosis = #{diagnosis}</if>
|
|
<if test="medicalAdvice != null and medicalAdvice != ''"> and medical_advice = #{medicalAdvice}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectHealthcareOsComplaintsById" parameterType="Long" resultMap="HealthcareOsComplaintsResult">
|
|
<include refid="selectHealthcareOsComplaintsVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertHealthcareOsComplaints" parameterType="HealthcareOsComplaints" useGeneratedKeys="true" keyProperty="id">
|
|
insert into healthcare_os_complaints
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="complaintName != null and complaintName != ''">complaint_name,</if>
|
|
<if test="currentHistory != null">current_history,</if>
|
|
<if test="pastHistory != null">past_history,</if>
|
|
<if test="diagnosis != null">diagnosis,</if>
|
|
<if test="medicalAdvice != null">medical_advice,</if>
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="complaintName != null and complaintName != ''">#{complaintName},</if>
|
|
<if test="currentHistory != null">#{currentHistory},</if>
|
|
<if test="pastHistory != null">#{pastHistory},</if>
|
|
<if test="diagnosis != null">#{diagnosis},</if>
|
|
<if test="medicalAdvice != null">#{medicalAdvice},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateHealthcareOsComplaints" parameterType="HealthcareOsComplaints">
|
|
update healthcare_os_complaints
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="complaintName != null and complaintName != ''">complaint_name = #{complaintName},</if>
|
|
<if test="currentHistory != null">current_history = #{currentHistory},</if>
|
|
<if test="pastHistory != null">past_history = #{pastHistory},</if>
|
|
<if test="diagnosis != null">diagnosis = #{diagnosis},</if>
|
|
<if test="medicalAdvice != null">medical_advice = #{medicalAdvice},</if>
|
|
<if test="createBy != null and createBy != ''">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>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteHealthcareOsComplaintsById" parameterType="Long">
|
|
delete from healthcare_os_complaints where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteHealthcareOsComplaintsByIds" parameterType="String">
|
|
delete from healthcare_os_complaints where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|