|
|
@ -3,11 +3,12 @@ |
|
|
|
<mapper namespace="com.ccsens.tcm.persist.mapper.PatientRecordMapper"> |
|
|
|
<resultMap id="BaseResultMap" type="com.ccsens.tcm.bean.po.PatientRecord"> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id" /> |
|
|
|
<result column="patient_id" jdbcType="INTEGER" property="patientId" /> |
|
|
|
<result column="test_questions_id" jdbcType="INTEGER" property="testQuestionsId" /> |
|
|
|
<result column="patient_id" jdbcType="BIGINT" property="patientId" /> |
|
|
|
<result column="test_questions_id" jdbcType="BIGINT" property="testQuestionsId" /> |
|
|
|
<result column="contents" jdbcType="VARCHAR" property="contents" /> |
|
|
|
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
|
|
|
<result column="collect_time" jdbcType="INTEGER" property="collectTime" /> |
|
|
|
<result column="time_slot" jdbcType="TIMESTAMP" property="timeSlot" /> |
|
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|
|
|
<result column="update_at" jdbcType="TIMESTAMP" property="updateAt" /> |
|
|
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|
|
@ -71,8 +72,8 @@ |
|
|
|
</where> |
|
|
|
</sql> |
|
|
|
<sql id="Base_Column_List"> |
|
|
|
id, patient_id, test_questions_id, contents, user_id, collect_time, created_at, update_at, |
|
|
|
rec_status |
|
|
|
id, patient_id, test_questions_id, contents, user_id, collect_time, time_slot, created_at, |
|
|
|
update_at, rec_status |
|
|
|
</sql> |
|
|
|
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.PatientRecordExample" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
@ -107,12 +108,12 @@ |
|
|
|
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.PatientRecord"> |
|
|
|
insert into t_patient_record (id, patient_id, test_questions_id, |
|
|
|
contents, user_id, collect_time, |
|
|
|
created_at, update_at, rec_status |
|
|
|
) |
|
|
|
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=INTEGER}, #{testQuestionsId,jdbcType=INTEGER}, |
|
|
|
time_slot, created_at, update_at, |
|
|
|
rec_status) |
|
|
|
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{testQuestionsId,jdbcType=BIGINT}, |
|
|
|
#{contents,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, #{collectTime,jdbcType=INTEGER}, |
|
|
|
#{createdAt,jdbcType=TIMESTAMP}, #{updateAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
|
|
|
) |
|
|
|
#{timeSlot,jdbcType=TIMESTAMP}, #{createdAt,jdbcType=TIMESTAMP}, #{updateAt,jdbcType=TIMESTAMP}, |
|
|
|
#{recStatus,jdbcType=TINYINT}) |
|
|
|
</insert> |
|
|
|
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.PatientRecord"> |
|
|
|
insert into t_patient_record |
|
|
@ -135,6 +136,9 @@ |
|
|
|
<if test="collectTime != null"> |
|
|
|
collect_time, |
|
|
|
</if> |
|
|
|
<if test="timeSlot != null"> |
|
|
|
time_slot, |
|
|
|
</if> |
|
|
|
<if test="createdAt != null"> |
|
|
|
created_at, |
|
|
|
</if> |
|
|
@ -150,10 +154,10 @@ |
|
|
|
#{id,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="patientId != null"> |
|
|
|
#{patientId,jdbcType=INTEGER}, |
|
|
|
#{patientId,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="testQuestionsId != null"> |
|
|
|
#{testQuestionsId,jdbcType=INTEGER}, |
|
|
|
#{testQuestionsId,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="contents != null"> |
|
|
|
#{contents,jdbcType=VARCHAR}, |
|
|
@ -164,6 +168,9 @@ |
|
|
|
<if test="collectTime != null"> |
|
|
|
#{collectTime,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
<if test="timeSlot != null"> |
|
|
|
#{timeSlot,jdbcType=TIMESTAMP}, |
|
|
|
</if> |
|
|
|
<if test="createdAt != null"> |
|
|
|
#{createdAt,jdbcType=TIMESTAMP}, |
|
|
|
</if> |
|
|
@ -188,10 +195,10 @@ |
|
|
|
id = #{record.id,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="record.patientId != null"> |
|
|
|
patient_id = #{record.patientId,jdbcType=INTEGER}, |
|
|
|
patient_id = #{record.patientId,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="record.testQuestionsId != null"> |
|
|
|
test_questions_id = #{record.testQuestionsId,jdbcType=INTEGER}, |
|
|
|
test_questions_id = #{record.testQuestionsId,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="record.contents != null"> |
|
|
|
contents = #{record.contents,jdbcType=VARCHAR}, |
|
|
@ -202,6 +209,9 @@ |
|
|
|
<if test="record.collectTime != null"> |
|
|
|
collect_time = #{record.collectTime,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
<if test="record.timeSlot != null"> |
|
|
|
time_slot = #{record.timeSlot,jdbcType=TIMESTAMP}, |
|
|
|
</if> |
|
|
|
<if test="record.createdAt != null"> |
|
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
|
|
</if> |
|
|
@ -219,11 +229,12 @@ |
|
|
|
<update id="updateByExample" parameterType="map"> |
|
|
|
update t_patient_record |
|
|
|
set id = #{record.id,jdbcType=BIGINT}, |
|
|
|
patient_id = #{record.patientId,jdbcType=INTEGER}, |
|
|
|
test_questions_id = #{record.testQuestionsId,jdbcType=INTEGER}, |
|
|
|
patient_id = #{record.patientId,jdbcType=BIGINT}, |
|
|
|
test_questions_id = #{record.testQuestionsId,jdbcType=BIGINT}, |
|
|
|
contents = #{record.contents,jdbcType=VARCHAR}, |
|
|
|
user_id = #{record.userId,jdbcType=BIGINT}, |
|
|
|
collect_time = #{record.collectTime,jdbcType=INTEGER}, |
|
|
|
time_slot = #{record.timeSlot,jdbcType=TIMESTAMP}, |
|
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
|
|
update_at = #{record.updateAt,jdbcType=TIMESTAMP}, |
|
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|
|
@ -235,10 +246,10 @@ |
|
|
|
update t_patient_record |
|
|
|
<set> |
|
|
|
<if test="patientId != null"> |
|
|
|
patient_id = #{patientId,jdbcType=INTEGER}, |
|
|
|
patient_id = #{patientId,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="testQuestionsId != null"> |
|
|
|
test_questions_id = #{testQuestionsId,jdbcType=INTEGER}, |
|
|
|
test_questions_id = #{testQuestionsId,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="contents != null"> |
|
|
|
contents = #{contents,jdbcType=VARCHAR}, |
|
|
@ -249,6 +260,9 @@ |
|
|
|
<if test="collectTime != null"> |
|
|
|
collect_time = #{collectTime,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
<if test="timeSlot != null"> |
|
|
|
time_slot = #{timeSlot,jdbcType=TIMESTAMP}, |
|
|
|
</if> |
|
|
|
<if test="createdAt != null"> |
|
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
|
|
</if> |
|
|
@ -263,11 +277,12 @@ |
|
|
|
</update> |
|
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.tcm.bean.po.PatientRecord"> |
|
|
|
update t_patient_record |
|
|
|
set patient_id = #{patientId,jdbcType=INTEGER}, |
|
|
|
test_questions_id = #{testQuestionsId,jdbcType=INTEGER}, |
|
|
|
set patient_id = #{patientId,jdbcType=BIGINT}, |
|
|
|
test_questions_id = #{testQuestionsId,jdbcType=BIGINT}, |
|
|
|
contents = #{contents,jdbcType=VARCHAR}, |
|
|
|
user_id = #{userId,jdbcType=BIGINT}, |
|
|
|
collect_time = #{collectTime,jdbcType=INTEGER}, |
|
|
|
time_slot = #{timeSlot,jdbcType=TIMESTAMP}, |
|
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
|
|
update_at = #{updateAt,jdbcType=TIMESTAMP}, |
|
|
|
rec_status = #{recStatus,jdbcType=TINYINT} |
|
|
|