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.
465 lines
17 KiB
465 lines
17 KiB
<?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.HtPatientParentIllnessMapper">
|
|
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtPatientParentIllness">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="patient_id" jdbcType="BIGINT" property="patientId" />
|
|
<result column="memory" jdbcType="TINYINT" property="memory" />
|
|
<result column="language" jdbcType="TINYINT" property="language" />
|
|
<result column="space" jdbcType="TINYINT" property="space" />
|
|
<result column="emotion" jdbcType="TINYINT" property="emotion" />
|
|
<result column="depression" jdbcType="TINYINT" property="depression" />
|
|
<result column="illusion" jdbcType="TINYINT" property="illusion" />
|
|
<result column="delusion" jdbcType="TINYINT" property="delusion" />
|
|
<result column="derepression" jdbcType="TINYINT" property="derepression" />
|
|
<result column="irritable" jdbcType="TINYINT" property="irritable" />
|
|
<result column="personality_changes" jdbcType="TINYINT" property="personalityChanges" />
|
|
<result column="exercise" jdbcType="TINYINT" property="exercise" />
|
|
<result column="first_illness" jdbcType="TINYINT" property="firstIllness" />
|
|
<result column="reason" jdbcType="TINYINT" property="reason" />
|
|
<result column="change_form" jdbcType="TINYINT" property="changeForm" />
|
|
<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" />
|
|
<result column="recorder" jdbcType="BIGINT" property="recorder" />
|
|
</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, memory, language, space, emotion, depression, illusion, delusion,
|
|
derepression, irritable, personality_changes, exercise, first_illness, reason, change_form,
|
|
remark, create_time, update_time, is_del, recorder
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientParentIllnessExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from t_ht_patient_parent_illness
|
|
<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_parent_illness
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from t_ht_patient_parent_illness
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtPatientParentIllnessExample">
|
|
delete from t_ht_patient_parent_illness
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtPatientParentIllness">
|
|
insert into t_ht_patient_parent_illness (id, patient_id, memory,
|
|
language, space, emotion,
|
|
depression, illusion, delusion,
|
|
derepression, irritable, personality_changes,
|
|
exercise, first_illness, reason,
|
|
change_form, remark, create_time,
|
|
update_time, is_del, recorder
|
|
)
|
|
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{memory,jdbcType=TINYINT},
|
|
#{language,jdbcType=TINYINT}, #{space,jdbcType=TINYINT}, #{emotion,jdbcType=TINYINT},
|
|
#{depression,jdbcType=TINYINT}, #{illusion,jdbcType=TINYINT}, #{delusion,jdbcType=TINYINT},
|
|
#{derepression,jdbcType=TINYINT}, #{irritable,jdbcType=TINYINT}, #{personalityChanges,jdbcType=TINYINT},
|
|
#{exercise,jdbcType=TINYINT}, #{firstIllness,jdbcType=TINYINT}, #{reason,jdbcType=TINYINT},
|
|
#{changeForm,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}, #{recorder,jdbcType=BIGINT}
|
|
)
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientParentIllness">
|
|
insert into t_ht_patient_parent_illness
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="patientId != null">
|
|
patient_id,
|
|
</if>
|
|
<if test="memory != null">
|
|
memory,
|
|
</if>
|
|
<if test="language != null">
|
|
language,
|
|
</if>
|
|
<if test="space != null">
|
|
space,
|
|
</if>
|
|
<if test="emotion != null">
|
|
emotion,
|
|
</if>
|
|
<if test="depression != null">
|
|
depression,
|
|
</if>
|
|
<if test="illusion != null">
|
|
illusion,
|
|
</if>
|
|
<if test="delusion != null">
|
|
delusion,
|
|
</if>
|
|
<if test="derepression != null">
|
|
derepression,
|
|
</if>
|
|
<if test="irritable != null">
|
|
irritable,
|
|
</if>
|
|
<if test="personalityChanges != null">
|
|
personality_changes,
|
|
</if>
|
|
<if test="exercise != null">
|
|
exercise,
|
|
</if>
|
|
<if test="firstIllness != null">
|
|
first_illness,
|
|
</if>
|
|
<if test="reason != null">
|
|
reason,
|
|
</if>
|
|
<if test="changeForm != null">
|
|
change_form,
|
|
</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>
|
|
<if test="recorder != null">
|
|
recorder,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="patientId != null">
|
|
#{patientId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="memory != null">
|
|
#{memory,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="language != null">
|
|
#{language,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="space != null">
|
|
#{space,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="emotion != null">
|
|
#{emotion,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="depression != null">
|
|
#{depression,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="illusion != null">
|
|
#{illusion,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="delusion != null">
|
|
#{delusion,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="derepression != null">
|
|
#{derepression,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="irritable != null">
|
|
#{irritable,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="personalityChanges != null">
|
|
#{personalityChanges,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="exercise != null">
|
|
#{exercise,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="firstIllness != null">
|
|
#{firstIllness,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="reason != null">
|
|
#{reason,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="changeForm != null">
|
|
#{changeForm,jdbcType=TINYINT},
|
|
</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>
|
|
<if test="recorder != null">
|
|
#{recorder,jdbcType=BIGINT},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientParentIllnessExample" resultType="java.lang.Long">
|
|
select count(*) from t_ht_patient_parent_illness
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update t_ht_patient_parent_illness
|
|
<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.memory != null">
|
|
memory = #{record.memory,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.language != null">
|
|
language = #{record.language,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.space != null">
|
|
space = #{record.space,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.emotion != null">
|
|
emotion = #{record.emotion,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.depression != null">
|
|
depression = #{record.depression,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.illusion != null">
|
|
illusion = #{record.illusion,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.delusion != null">
|
|
delusion = #{record.delusion,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.derepression != null">
|
|
derepression = #{record.derepression,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.irritable != null">
|
|
irritable = #{record.irritable,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.personalityChanges != null">
|
|
personality_changes = #{record.personalityChanges,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.exercise != null">
|
|
exercise = #{record.exercise,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.firstIllness != null">
|
|
first_illness = #{record.firstIllness,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.reason != null">
|
|
reason = #{record.reason,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.changeForm != null">
|
|
change_form = #{record.changeForm,jdbcType=TINYINT},
|
|
</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>
|
|
<if test="record.recorder != null">
|
|
recorder = #{record.recorder,jdbcType=BIGINT},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update t_ht_patient_parent_illness
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
patient_id = #{record.patientId,jdbcType=BIGINT},
|
|
memory = #{record.memory,jdbcType=TINYINT},
|
|
language = #{record.language,jdbcType=TINYINT},
|
|
space = #{record.space,jdbcType=TINYINT},
|
|
emotion = #{record.emotion,jdbcType=TINYINT},
|
|
depression = #{record.depression,jdbcType=TINYINT},
|
|
illusion = #{record.illusion,jdbcType=TINYINT},
|
|
delusion = #{record.delusion,jdbcType=TINYINT},
|
|
derepression = #{record.derepression,jdbcType=TINYINT},
|
|
irritable = #{record.irritable,jdbcType=TINYINT},
|
|
personality_changes = #{record.personalityChanges,jdbcType=TINYINT},
|
|
exercise = #{record.exercise,jdbcType=TINYINT},
|
|
first_illness = #{record.firstIllness,jdbcType=TINYINT},
|
|
reason = #{record.reason,jdbcType=TINYINT},
|
|
change_form = #{record.changeForm,jdbcType=TINYINT},
|
|
remark = #{record.remark,jdbcType=VARCHAR},
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
is_del = #{record.isDel,jdbcType=TINYINT},
|
|
recorder = #{record.recorder,jdbcType=BIGINT}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtPatientParentIllness">
|
|
update t_ht_patient_parent_illness
|
|
<set>
|
|
<if test="patientId != null">
|
|
patient_id = #{patientId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="memory != null">
|
|
memory = #{memory,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="language != null">
|
|
language = #{language,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="space != null">
|
|
space = #{space,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="emotion != null">
|
|
emotion = #{emotion,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="depression != null">
|
|
depression = #{depression,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="illusion != null">
|
|
illusion = #{illusion,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="delusion != null">
|
|
delusion = #{delusion,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="derepression != null">
|
|
derepression = #{derepression,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="irritable != null">
|
|
irritable = #{irritable,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="personalityChanges != null">
|
|
personality_changes = #{personalityChanges,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="exercise != null">
|
|
exercise = #{exercise,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="firstIllness != null">
|
|
first_illness = #{firstIllness,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="reason != null">
|
|
reason = #{reason,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="changeForm != null">
|
|
change_form = #{changeForm,jdbcType=TINYINT},
|
|
</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>
|
|
<if test="recorder != null">
|
|
recorder = #{recorder,jdbcType=BIGINT},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtPatientParentIllness">
|
|
update t_ht_patient_parent_illness
|
|
set patient_id = #{patientId,jdbcType=BIGINT},
|
|
memory = #{memory,jdbcType=TINYINT},
|
|
language = #{language,jdbcType=TINYINT},
|
|
space = #{space,jdbcType=TINYINT},
|
|
emotion = #{emotion,jdbcType=TINYINT},
|
|
depression = #{depression,jdbcType=TINYINT},
|
|
illusion = #{illusion,jdbcType=TINYINT},
|
|
delusion = #{delusion,jdbcType=TINYINT},
|
|
derepression = #{derepression,jdbcType=TINYINT},
|
|
irritable = #{irritable,jdbcType=TINYINT},
|
|
personality_changes = #{personalityChanges,jdbcType=TINYINT},
|
|
exercise = #{exercise,jdbcType=TINYINT},
|
|
first_illness = #{firstIllness,jdbcType=TINYINT},
|
|
reason = #{reason,jdbcType=TINYINT},
|
|
change_form = #{changeForm,jdbcType=TINYINT},
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
is_del = #{isDel,jdbcType=TINYINT},
|
|
recorder = #{recorder,jdbcType=BIGINT}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper>
|