|
|
|
@ -630,7 +630,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
clientMapper.update(updateInfo);
|
|
|
|
|
if (!client.getString("contact_email").equals(updateInfo.getString("contact_email"))) {
|
|
|
|
|
JSONObject sameMailClients = getByEmail(client.getString("contact_email"),1,1);
|
|
|
|
|
List<String> exceptClientIds = new ArrayList<>();
|
|
|
|
|
exceptClientIds.add(String.valueOf(clientId));
|
|
|
|
|
JSONObject sameMailClients = getByEmail(client.getString("contact_email"),1,1,exceptClientIds);
|
|
|
|
|
if(sameMailClients.getJSONObject("data").size()<1) {
|
|
|
|
|
mailGunService.updateClientOfMailList(updateInfo, client);
|
|
|
|
|
}
|
|
|
|
@ -671,7 +673,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
clientMapper.update(info);
|
|
|
|
|
if (!client.getString("contact_email").equals(info.getString("contact_email"))) {
|
|
|
|
|
JSONObject sameMailClients = getByEmail(client.getString("contact_email"),1,1);
|
|
|
|
|
List<String> exceptClientIds = new ArrayList<>();
|
|
|
|
|
exceptClientIds.add(String.valueOf(clientId));
|
|
|
|
|
JSONObject sameMailClients = getByEmail(client.getString("contact_email"),1,1,exceptClientIds);
|
|
|
|
|
if(sameMailClients.getJSONObject("data").size()<1) {
|
|
|
|
|
mailGunService.updateClientOfMailList(info, client);
|
|
|
|
|
}
|
|
|
|
@ -2487,7 +2491,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
JSONObject client = clientDetail(manager, clientMoniker);
|
|
|
|
|
Assert.notEmpty(client);
|
|
|
|
|
clientModifySupport.processClientModify(new DisableModify(manager, clientMoniker, false));
|
|
|
|
|
JSONObject sameMailClients = getByEmail(client.getString("contact_email"),1,1);
|
|
|
|
|
List<String> exceptClientIds = new ArrayList<>();
|
|
|
|
|
exceptClientIds.add(client.getString("client_id"));
|
|
|
|
|
JSONObject sameMailClients = getByEmail(client.getString("contact_email"),1,1,exceptClientIds);
|
|
|
|
|
if(sameMailClients.getJSONObject("data").size()<1) {
|
|
|
|
|
mailGunService.removeMailList(client);
|
|
|
|
|
}
|
|
|
|
@ -3521,9 +3527,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getByEmail(String email, int page, int limit) {
|
|
|
|
|
public JSONObject getByEmail(String email, int page, int limit,List<String> exceptClientIds) {
|
|
|
|
|
JSONObject param = new JSONObject();
|
|
|
|
|
param.put("contact_email",email);
|
|
|
|
|
param.put("except_client_ids",exceptClientIds);
|
|
|
|
|
return PageListUtils.buildPageListResult(clientMapper.simpleQuery(param,new PageBounds(page, limit)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|