<?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.smartor.mapper.Icd10AssociationMapper">
|
|
<resultMap type="com.smartor.domain.Icd10Association" id="Icd10AssociationResult">
|
<result property="icd10code" column="icd10code" />
|
<result property="icd10name" column="icd10name" />
|
<result property="svyid" column="svyid" />
|
<result property="updatetime" column="updatetime" />
|
</resultMap>
|
|
<sql id="selectIcd10AssociationVo">
|
select icd10code, icd10name, svyid, updatetime from icd10_association
|
</sql>
|
|
<select id="selectIcd10AssociationList" parameterType="com.smartor.domain.Icd10Association" resultMap="Icd10AssociationResult">
|
<include refid="selectIcd10AssociationVo"/>
|
<where>
|
<if test="icd10code != null and icd10code != ''"> and icd10code = #{icd10code}</if>
|
<if test="icd10name != null and icd10name != ''"> and icd10name like concat('%', #{icd10name}, '%')</if>
|
<if test="svyid != null "> and svyid = #{svyid}</if>
|
<if test="updatetime != null "> and updatetime = #{updatetime}</if>
|
</where>
|
</select>
|
|
<select id="selectIcd10AssociationByIcd10code" parameterType="String" resultMap="Icd10AssociationResult">
|
<include refid="selectIcd10AssociationVo"/>
|
where icd10code = #{icd10code}
|
</select>
|
|
<insert id="insertIcd10Association" parameterType="com.smartor.domain.Icd10Association">
|
insert into icd10_association
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="icd10code != null and icd10code != ''">icd10code,</if>
|
<if test="icd10name != null">icd10name,</if>
|
<if test="svyid != null">svyid,</if>
|
<if test="updatetime != null">updatetime,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="icd10code != null and icd10code != ''">#{icd10code},</if>
|
<if test="icd10name != null">#{icd10name},</if>
|
<if test="svyid != null">#{svyid},</if>
|
<if test="updatetime != null">#{updatetime},</if>
|
</trim>
|
</insert>
|
|
<update id="updateIcd10Association" parameterType="Icd10Association">
|
update icd10_association
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="icd10name != null">icd10name = #{icd10name},</if>
|
<if test="svyid != null">svyid = #{svyid},</if>
|
<if test="updatetime != null">updatetime = #{updatetime},</if>
|
</trim>
|
where icd10code = #{icd10code}
|
</update>
|
|
<delete id="deleteIcd10AssociationByIcd10code" parameterType="String">
|
delete from icd10_association where icd10code = #{icd10code}
|
</delete>
|
|
<delete id="deleteIcd10AssociationByIcd10codes" parameterType="String">
|
delete from icd10_association where icd10code in
|
<foreach item="icd10code" collection="array" open="(" separator="," close=")">
|
#{icd10code}
|
</foreach>
|
</delete>
|
</mapper>
|