解决bug

This commit is contained in:
hejinbo
2023-10-26 16:15:56 +08:00
parent 84a19396bf
commit 1e7019cba9
5 changed files with 21 additions and 4 deletions
@@ -7,6 +7,7 @@
<resultMap type="SmsSendRecord" id="SmsSendRecordResult">
<id property="id" column="id" />
<result property="caseId" column="case_appli_id" />
<result property="caseNum" column="case_num" />
<result property="phone" column="phone" />
<result property="sendTime" column="send_time" />
<result property="sendContent" column="send_content" />
@@ -19,6 +20,7 @@
insert into sms_send_record(
<if test="caseId != null ">case_appli_id,</if>
<if test="caseNum != null ">case_num,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="sendTime != null ">send_time,</if>
<if test="sendContent != null ">send_content,</if>
@@ -26,6 +28,7 @@
create_time
)values(
<if test="caseId != null ">#{caseId},</if>
<if test="caseNum != null ">#{caseNum},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="sendTime != null ">#{sendTime},</if>
<if test="sendContent != null ">#{sendContent},</if>
@@ -36,11 +39,11 @@
<select id="getSmsSendRecord" parameterType="SmsSendRecord" resultMap="SmsSendRecordResult">
select id ,case_appli_id ,phone ,send_time ,send_content
select id ,case_appli_id ,case_num ,phone ,send_time ,send_content
from sms_send_record
<where>
<if test="caseId != null ">
AND case_appli_id = #{caseId}
<if test="caseNum != null and caseNum != ''">
AND case_num = #{caseNum}
</if>
</where>
order by send_time desc