|
|
@ -12,6 +12,7 @@ |
|
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|
|
|
<result column="update_at" jdbcType="TIMESTAMP" property="updateAt" /> |
|
|
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|
|
|
<result column="contents_type" jdbcType="TINYINT" property="contentsType" /> |
|
|
|
</resultMap> |
|
|
|
<sql id="Example_Where_Clause"> |
|
|
|
<where> |
|
|
@ -73,7 +74,7 @@ |
|
|
|
</sql> |
|
|
|
<sql id="Base_Column_List"> |
|
|
|
id, patient_id, test_questions_id, contents, user_id, collect_time, time_slot, created_at, |
|
|
|
update_at, rec_status |
|
|
|
update_at, rec_status, contents_type |
|
|
|
</sql> |
|
|
|
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.PatientRecordExample" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
@ -109,11 +110,11 @@ |
|
|
|
insert into t_patient_record (id, patient_id, test_questions_id, |
|
|
|
contents, user_id, collect_time, |
|
|
|
time_slot, created_at, update_at, |
|
|
|
rec_status) |
|
|
|
rec_status, contents_type) |
|
|
|
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{testQuestionsId,jdbcType=BIGINT}, |
|
|
|
#{contents,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, #{collectTime,jdbcType=INTEGER}, |
|
|
|
#{timeSlot,jdbcType=TIMESTAMP}, #{createdAt,jdbcType=TIMESTAMP}, #{updateAt,jdbcType=TIMESTAMP}, |
|
|
|
#{recStatus,jdbcType=TINYINT}) |
|
|
|
#{recStatus,jdbcType=TINYINT}, #{contentsType,jdbcType=TINYINT}) |
|
|
|
</insert> |
|
|
|
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.PatientRecord"> |
|
|
|
insert into t_patient_record |
|
|
@ -148,6 +149,9 @@ |
|
|
|
<if test="recStatus != null"> |
|
|
|
rec_status, |
|
|
|
</if> |
|
|
|
<if test="contentsType != null"> |
|
|
|
contents_type, |
|
|
|
</if> |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<if test="id != null"> |
|
|
@ -180,6 +184,9 @@ |
|
|
|
<if test="recStatus != null"> |
|
|
|
#{recStatus,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="contentsType != null"> |
|
|
|
#{contentsType,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
<select id="countByExample" parameterType="com.ccsens.tcm.bean.po.PatientRecordExample" resultType="java.lang.Long"> |
|
|
@ -221,6 +228,9 @@ |
|
|
|
<if test="record.recStatus != null"> |
|
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="record.contentsType != null"> |
|
|
|
contents_type = #{record.contentsType,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
</set> |
|
|
|
<if test="_parameter != null"> |
|
|
|
<include refid="Update_By_Example_Where_Clause" /> |
|
|
@ -237,7 +247,8 @@ |
|
|
|
time_slot = #{record.timeSlot,jdbcType=TIMESTAMP}, |
|
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
|
|
update_at = #{record.updateAt,jdbcType=TIMESTAMP}, |
|
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|
|
|
contents_type = #{record.contentsType,jdbcType=TINYINT} |
|
|
|
<if test="_parameter != null"> |
|
|
|
<include refid="Update_By_Example_Where_Clause" /> |
|
|
|
</if> |
|
|
@ -272,6 +283,9 @@ |
|
|
|
<if test="recStatus != null"> |
|
|
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="contentsType != null"> |
|
|
|
contents_type = #{contentsType,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
</set> |
|
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
|
</update> |
|
|
@ -285,7 +299,8 @@ |
|
|
|
time_slot = #{timeSlot,jdbcType=TIMESTAMP}, |
|
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
|
|
update_at = #{updateAt,jdbcType=TIMESTAMP}, |
|
|
|
rec_status = #{recStatus,jdbcType=TINYINT} |
|
|
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
|
|
|
contents_type = #{contentsType,jdbcType=TINYINT} |
|
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
|
</update> |
|
|
|
</mapper> |