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

This commit is contained in:
wangqiong
2024-04-17 17:44:40 +08:00
parent e5c8ebfb31
commit f94be91bb3
2 changed files with 7 additions and 4 deletions
@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.File; import java.io.File;
import java.util.Date;
import java.util.List; import java.util.List;
@Service @Service
@@ -46,6 +47,7 @@ public class SendMailRecordServiceImpl implements ISendMailRecordService {
msSendMailHistoryRecord.setParentId(old.getId()); msSendMailHistoryRecord.setParentId(old.getId());
msSendMailHistoryRecord.setId(null); msSendMailHistoryRecord.setId(null);
msSendMailHistoryRecordMapper.insertSelective(msSendMailHistoryRecord); msSendMailHistoryRecordMapper.insertSelective(msSendMailHistoryRecord);
sendMailRecord.setUpdateTime(new Date());
sendMailRecordMapper.updateSendMailRecord(sendMailRecord); sendMailRecordMapper.updateSendMailRecord(sendMailRecord);
return AjaxResult.success("编辑成功"); return AjaxResult.success("编辑成功");
} else { } else {
@@ -62,10 +62,11 @@
</insert> </insert>
<update id="updateSendMailRecord"> <update id="updateSendMailRecord">
update ms_send_mail_record update ms_send_mail_record
set mail_content= #{mailContent}, set
update_time=#{updateTime}, <if test="mailContent != null ">mail_content= #{mailContent}</if>
send_time=#{sendTime}, <if test="updateTime != null ">,update_time=#{updateTime}</if>
send_status=#{sendStatus} <if test="sendTime != null ">,send_time=#{sendTime}</if>
<if test="sendStatus != null ">,send_status=#{sendStatus}</if>
where id = #{id} where id = #{id}
</update> </update>
<select id="querySendMailRecordById" resultMap="SendMailRecordResult"> <select id="querySendMailRecordById" resultMap="SendMailRecordResult">