|
@@ -4,18 +4,18 @@
|
|
|
<mapper namespace="com.lemon.lifecenter.mapper.PatientMemoMapper">
|
|
|
<insert id="insertMemo" parameterType="PatientMemoDTO" useGeneratedKeys="true">
|
|
|
<![CDATA[
|
|
|
- INSERT INTO patient_memo (patient_idx, contents, recorded_by_name, recorded_by_id, recorded_date, create_date)
|
|
|
+ INSERT INTO patient_memo (patient_idx, contents, recorded_by_name, recorded_by_id, recorded_date, update_date, create_date)
|
|
|
VALUE (#{patientIdx}, #{contents}, #{recordedByName}, #{recordedById}
|
|
|
]]>
|
|
|
<choose>
|
|
|
<when test='recordedDate != null and recordedDate != ""'>
|
|
|
<![CDATA[
|
|
|
- , #{recordedDate}, NOW())
|
|
|
+ , #{recordedDate}, NOW(), NOW())
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<![CDATA[
|
|
|
- , NOW(), NOW())
|
|
|
+ , NOW(), NOW(), NOW())
|
|
|
]]>
|
|
|
</otherwise>
|
|
|
</choose>
|
|
@@ -30,6 +30,7 @@
|
|
|
<select id="selectMemoList" parameterType="PatientMemoDTO" resultType="PatientMemoDTO">
|
|
|
<![CDATA[
|
|
|
SELECT idx,
|
|
|
+ update_date AS updateDate,
|
|
|
create_date AS createDate,
|
|
|
contents AS contents,
|
|
|
recorded_by_id AS recordedById,
|
|
@@ -43,8 +44,9 @@
|
|
|
</select>
|
|
|
<update id="updateMemo" parameterType="PatientMemoDTO">
|
|
|
<![CDATA[
|
|
|
- UPDATE patient_memo
|
|
|
- SET contents = #{contents},
|
|
|
+ UPDATE patient_memo
|
|
|
+ SET contents = #{contents},
|
|
|
+ update_date = NOW(),
|
|
|
]]>
|
|
|
<choose>
|
|
|
<when test='recordedDate != null and recordedDate != ""'>
|