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