You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

368 lines
13 KiB

6 years ago
<?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.ccsens.ht.persist.mapper.HtPatientAcpMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtPatientAcp">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="patient_id" jdbcType="BIGINT" property="patientId" />
<result column="ct" jdbcType="VARCHAR" property="ct" />
<result column="mri" jdbcType="VARCHAR" property="mri" />
<result column="hcy" jdbcType="VARCHAR" property="hcy" />
<result column="vb12" jdbcType="VARCHAR" property="vb12" />
<result column="folic_acid" jdbcType="VARCHAR" property="folicAcid" />
<result column="tt3" jdbcType="VARCHAR" property="tt3" />
<result column="tt4" jdbcType="VARCHAR" property="tt4" />
<result column="tsh" jdbcType="VARCHAR" property="tsh" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
6 years ago
<result column="recorder" jdbcType="BIGINT" property="recorder" />
6 years ago
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, patient_id, ct, mri, hcy, vb12, folic_acid, tt3, tt4, tsh, remark, create_time,
6 years ago
update_time, is_del, recorder
6 years ago
</sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientAcpExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_ht_patient_acp
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_ht_patient_acp
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_ht_patient_acp
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtPatientAcpExample">
delete from t_ht_patient_acp
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtPatientAcp">
insert into t_ht_patient_acp (id, patient_id, ct,
mri, hcy, vb12, folic_acid,
tt3, tt4, tsh, remark,
6 years ago
create_time, update_time, is_del,
recorder)
6 years ago
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{ct,jdbcType=VARCHAR},
#{mri,jdbcType=VARCHAR}, #{hcy,jdbcType=VARCHAR}, #{vb12,jdbcType=VARCHAR}, #{folicAcid,jdbcType=VARCHAR},
#{tt3,jdbcType=VARCHAR}, #{tt4,jdbcType=VARCHAR}, #{tsh,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
6 years ago
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT},
#{recorder,jdbcType=BIGINT})
6 years ago
</insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientAcp">
insert into t_ht_patient_acp
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="patientId != null">
patient_id,
</if>
<if test="ct != null">
ct,
</if>
<if test="mri != null">
mri,
</if>
<if test="hcy != null">
hcy,
</if>
<if test="vb12 != null">
vb12,
</if>
<if test="folicAcid != null">
folic_acid,
</if>
<if test="tt3 != null">
tt3,
</if>
<if test="tt4 != null">
tt4,
</if>
<if test="tsh != null">
tsh,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isDel != null">
is_del,
</if>
6 years ago
<if test="recorder != null">
recorder,
</if>
6 years ago
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="patientId != null">
#{patientId,jdbcType=BIGINT},
</if>
<if test="ct != null">
#{ct,jdbcType=VARCHAR},
</if>
<if test="mri != null">
#{mri,jdbcType=VARCHAR},
</if>
<if test="hcy != null">
#{hcy,jdbcType=VARCHAR},
</if>
<if test="vb12 != null">
#{vb12,jdbcType=VARCHAR},
</if>
<if test="folicAcid != null">
#{folicAcid,jdbcType=VARCHAR},
</if>
<if test="tt3 != null">
#{tt3,jdbcType=VARCHAR},
</if>
<if test="tt4 != null">
#{tt4,jdbcType=VARCHAR},
</if>
<if test="tsh != null">
#{tsh,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
#{isDel,jdbcType=TINYINT},
</if>
6 years ago
<if test="recorder != null">
#{recorder,jdbcType=BIGINT},
</if>
6 years ago
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientAcpExample" resultType="java.lang.Long">
select count(*) from t_ht_patient_acp
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_ht_patient_acp
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.patientId != null">
patient_id = #{record.patientId,jdbcType=BIGINT},
</if>
<if test="record.ct != null">
ct = #{record.ct,jdbcType=VARCHAR},
</if>
<if test="record.mri != null">
mri = #{record.mri,jdbcType=VARCHAR},
</if>
<if test="record.hcy != null">
hcy = #{record.hcy,jdbcType=VARCHAR},
</if>
<if test="record.vb12 != null">
vb12 = #{record.vb12,jdbcType=VARCHAR},
</if>
<if test="record.folicAcid != null">
folic_acid = #{record.folicAcid,jdbcType=VARCHAR},
</if>
<if test="record.tt3 != null">
tt3 = #{record.tt3,jdbcType=VARCHAR},
</if>
<if test="record.tt4 != null">
tt4 = #{record.tt4,jdbcType=VARCHAR},
</if>
<if test="record.tsh != null">
tsh = #{record.tsh,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDel != null">
is_del = #{record.isDel,jdbcType=TINYINT},
</if>
6 years ago
<if test="record.recorder != null">
recorder = #{record.recorder,jdbcType=BIGINT},
</if>
6 years ago
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_ht_patient_acp
set id = #{record.id,jdbcType=BIGINT},
patient_id = #{record.patientId,jdbcType=BIGINT},
ct = #{record.ct,jdbcType=VARCHAR},
mri = #{record.mri,jdbcType=VARCHAR},
hcy = #{record.hcy,jdbcType=VARCHAR},
vb12 = #{record.vb12,jdbcType=VARCHAR},
folic_acid = #{record.folicAcid,jdbcType=VARCHAR},
tt3 = #{record.tt3,jdbcType=VARCHAR},
tt4 = #{record.tt4,jdbcType=VARCHAR},
tsh = #{record.tsh,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
6 years ago
is_del = #{record.isDel,jdbcType=TINYINT},
recorder = #{record.recorder,jdbcType=BIGINT}
6 years ago
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtPatientAcp">
update t_ht_patient_acp
<set>
<if test="patientId != null">
patient_id = #{patientId,jdbcType=BIGINT},
</if>
<if test="ct != null">
ct = #{ct,jdbcType=VARCHAR},
</if>
<if test="mri != null">
mri = #{mri,jdbcType=VARCHAR},
</if>
<if test="hcy != null">
hcy = #{hcy,jdbcType=VARCHAR},
</if>
<if test="vb12 != null">
vb12 = #{vb12,jdbcType=VARCHAR},
</if>
<if test="folicAcid != null">
folic_acid = #{folicAcid,jdbcType=VARCHAR},
</if>
<if test="tt3 != null">
tt3 = #{tt3,jdbcType=VARCHAR},
</if>
<if test="tt4 != null">
tt4 = #{tt4,jdbcType=VARCHAR},
</if>
<if test="tsh != null">
tsh = #{tsh,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT},
</if>
6 years ago
<if test="recorder != null">
recorder = #{recorder,jdbcType=BIGINT},
</if>
6 years ago
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtPatientAcp">
update t_ht_patient_acp
set patient_id = #{patientId,jdbcType=BIGINT},
ct = #{ct,jdbcType=VARCHAR},
mri = #{mri,jdbcType=VARCHAR},
hcy = #{hcy,jdbcType=VARCHAR},
vb12 = #{vb12,jdbcType=VARCHAR},
folic_acid = #{folicAcid,jdbcType=VARCHAR},
tt3 = #{tt3,jdbcType=VARCHAR},
tt4 = #{tt4,jdbcType=VARCHAR},
tsh = #{tsh,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
6 years ago
is_del = #{isDel,jdbcType=TINYINT},
recorder = #{recorder,jdbcType=BIGINT}
6 years ago
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>