From 3b9038eab6119b65ae4c9b215f110a200abef5f5 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Tue, 5 Jun 2018 19:01:46 +0800 Subject: [PATCH] update --- .../manage/merchants/core/impls/ClientManagerImpl.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 0d791915d..74a4bc28f 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -630,7 +630,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } clientMapper.update(updateInfo); if (!client.getString("contact_email").equals(updateInfo.getString("contact_email"))) { - mailGunService.updateClientOfMailList(updateInfo, client); + JSONObject sameMailClients = getByEmail(client.getString("contact_email"),1,1); + if(sameMailClients.getJSONObject("data").size()<1) { + mailGunService.updateClientOfMailList(updateInfo, client); + } } clientInfoCacheSupport.clearClientCache(clientId); } @@ -668,7 +671,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } clientMapper.update(info); if (!client.getString("contact_email").equals(info.getString("contact_email"))) { - mailGunService.updateClientOfMailList(info, client); + JSONObject sameMailClients = getByEmail(client.getString("contact_email"),1,1); + if(sameMailClients.getJSONObject("data").size()<1) { + mailGunService.updateClientOfMailList(info, client); + } } clientInfoCacheSupport.clearClientCache(clientId); }