Ver código fonte

优化邮件发送记录编辑功能

wangqiong 2 anos atrás
pai
commit
f94be91bb3

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sendrecord/impl/SendMailRecordServiceImpl.java Ver arquivo

14
 import org.springframework.stereotype.Service;
14
 import org.springframework.stereotype.Service;
15
 
15
 
16
 import java.io.File;
16
 import java.io.File;
17
+import java.util.Date;
17
 import java.util.List;
18
 import java.util.List;
18
 
19
 
19
 @Service
20
 @Service
46
                 msSendMailHistoryRecord.setParentId(old.getId());
47
                 msSendMailHistoryRecord.setParentId(old.getId());
47
                 msSendMailHistoryRecord.setId(null);
48
                 msSendMailHistoryRecord.setId(null);
48
                 msSendMailHistoryRecordMapper.insertSelective(msSendMailHistoryRecord);
49
                 msSendMailHistoryRecordMapper.insertSelective(msSendMailHistoryRecord);
50
+                sendMailRecord.setUpdateTime(new Date());
49
                 sendMailRecordMapper.updateSendMailRecord(sendMailRecord);
51
                 sendMailRecordMapper.updateSendMailRecord(sendMailRecord);
50
                 return AjaxResult.success("编辑成功");
52
                 return AjaxResult.success("编辑成功");
51
             } else {
53
             } else {

+ 5
- 4
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/sendrecord/SendMailRecordMapper.xml Ver arquivo

62
     </insert>
62
     </insert>
63
     <update id="updateSendMailRecord">
63
     <update id="updateSendMailRecord">
64
         update ms_send_mail_record
64
         update ms_send_mail_record
65
-        set mail_content= #{mailContent},
66
-            update_time=#{updateTime},
67
-            send_time=#{sendTime},
68
-            send_status=#{sendStatus}
65
+        set
66
+        <if test="mailContent != null ">mail_content= #{mailContent}</if>
67
+        <if test="updateTime != null ">,update_time=#{updateTime}</if>
68
+        <if test="sendTime != null ">,send_time=#{sendTime}</if>
69
+        <if test="sendStatus != null ">,send_status=#{sendStatus}</if>
69
         where id = #{id}
70
         where id = #{id}
70
     </update>
71
     </update>
71
     <select id="querySendMailRecordById" resultMap="SendMailRecordResult">
72
     <select id="querySendMailRecordById" resultMap="SendMailRecordResult">