From 1399fb38a52c6702d07994dc76d701d5fff8f99e Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Fri, 1 Jun 2018 14:31:16 +0800 Subject: [PATCH] fixbug mail bug --- .../payment/manage/mappers/system/MailSendMapper.java | 3 +++ .../manage/system/core/impl/MailGunServiceImpl.java | 4 ++-- .../payment/manage/mappers/system/MailSendMapper.xml | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/au/com/royalpay/payment/manage/mappers/system/MailSendMapper.xml diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/MailSendMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/MailSendMapper.java index eb655766a..2926049bd 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/MailSendMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/MailSendMapper.java @@ -21,6 +21,9 @@ public interface MailSendMapper { @AutoSql(type = SqlType.UPDATE) void update(JSONObject record); + @AutoSql(type = SqlType.UPDATE) + void updateStatus(JSONObject record); + @AutoSql(type = SqlType.SELECT) JSONObject find(@Param("id") String id, @Param("mail_address")String mail_address); } diff --git a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/MailGunServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/MailGunServiceImpl.java index 0676117cb..9c0915c38 100644 --- a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/MailGunServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/MailGunServiceImpl.java @@ -59,7 +59,7 @@ public class MailGunServiceImpl implements MailGunService { record.put("id", tmpJSONObject.getString("id")); record.put("mail_address", mailAddress); record.put("status", 1); - mailSendMapper.update(record); + mailSendMapper.updateStatus(record); } } } @@ -78,7 +78,7 @@ public class MailGunServiceImpl implements MailGunService { record.put("id", tmpJSONObject.getString("id")); record.put("mail_address", mailAddress); record.put("status", 2); - mailSendMapper.update(record); + mailSendMapper.updateStatus(record); } } } diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/MailSendMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/MailSendMapper.xml new file mode 100644 index 000000000..c9a2dea57 --- /dev/null +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/MailSendMapper.xml @@ -0,0 +1,10 @@ + + + + + update sys_mail_send + set status = #{status} + where id = #{id} + and mail_address = #{mail_address} + + \ No newline at end of file