|
|
@ -630,8 +630,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
}
|
|
|
|
}
|
|
|
|
clientMapper.update(updateInfo);
|
|
|
|
clientMapper.update(updateInfo);
|
|
|
|
if (!client.getString("contact_email").equals(updateInfo.getString("contact_email"))) {
|
|
|
|
if (!client.getString("contact_email").equals(updateInfo.getString("contact_email"))) {
|
|
|
|
|
|
|
|
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);
|
|
|
|
mailGunService.updateClientOfMailList(updateInfo, client);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
clientInfoCacheSupport.clearClientCache(clientId);
|
|
|
|
clientInfoCacheSupport.clearClientCache(clientId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -668,8 +673,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
}
|
|
|
|
}
|
|
|
|
clientMapper.update(info);
|
|
|
|
clientMapper.update(info);
|
|
|
|
if (!client.getString("contact_email").equals(info.getString("contact_email"))) {
|
|
|
|
if (!client.getString("contact_email").equals(info.getString("contact_email"))) {
|
|
|
|
|
|
|
|
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);
|
|
|
|
mailGunService.updateClientOfMailList(info, client);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
clientInfoCacheSupport.clearClientCache(clientId);
|
|
|
|
clientInfoCacheSupport.clearClientCache(clientId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -2481,7 +2491,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
JSONObject client = clientDetail(manager, clientMoniker);
|
|
|
|
JSONObject client = clientDetail(manager, clientMoniker);
|
|
|
|
Assert.notEmpty(client);
|
|
|
|
Assert.notEmpty(client);
|
|
|
|
clientModifySupport.processClientModify(new DisableModify(manager, clientMoniker, false));
|
|
|
|
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) {
|
|
|
|
if(sameMailClients.getJSONObject("data").size()<1) {
|
|
|
|
mailGunService.removeMailList(client);
|
|
|
|
mailGunService.removeMailList(client);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3515,9 +3527,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@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();
|
|
|
|
JSONObject param = new JSONObject();
|
|
|
|
param.put("contact_email",email);
|
|
|
|
param.put("contact_email",email);
|
|
|
|
|
|
|
|
param.put("except_client_ids",exceptClientIds);
|
|
|
|
return PageListUtils.buildPageListResult(clientMapper.simpleQuery(param,new PageBounds(page, limit)));
|
|
|
|
return PageListUtils.buildPageListResult(clientMapper.simpleQuery(param,new PageBounds(page, limit)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|