Merge branch 'hotfix' into develop

master
wangning 7 years ago
commit a1c3f6d67e

@ -633,8 +633,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
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) {
if(sameMailClients.getJSONArray("data").size()<1) {
mailGunService.updateClientOfMailList(updateInfo, client);
}else {
client.put("contact_email",updateInfo.getString("contact_email"));
mailGunService.addClientToMailList(client);
}
}
clientInfoCacheSupport.clearClientCache(clientId);
@ -676,8 +679,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
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) {
if(sameMailClients.getJSONArray("data").size()<1) {
mailGunService.updateClientOfMailList(info, client);
}else {
client.put("contact_email",info.getString("contact_email"));
mailGunService.addClientToMailList(client);
}
}
clientInfoCacheSupport.clearClientCache(clientId);
@ -2494,7 +2500,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
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.getJSONArray("data").size()<1) {
mailGunService.removeMailList(client);
}
}

@ -8,6 +8,7 @@ import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.tools.mail.MailGunClient;
import au.com.royalpay.payment.tools.mail.SendMail;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.codec.binary.Base64;
@ -38,7 +39,7 @@ import cn.yixblog.platform.http.HttpRequestResult;
* Created by wangning on 05/01/2018.
*/
@SpringBootTest
@ActiveProfiles({ "dev", "alipay", "wechat", "jd", "bestpay" })
@ActiveProfiles({ "local", "alipay", "wechat", "jd", "bestpay" })
@RunWith(SpringRunner.class)
public class CustomerImpressionImplTest {
@Resource
@ -191,8 +192,12 @@ public class CustomerImpressionImplTest {
@Test
public void fd(){
JSONObject asd = clientManager.getByEmail("123@askdjh.com",1,1);
System.out.println(asd);
List<String> asd12eq = new ArrayList<>();
asd12eq.add("9");
JSONObject asd = clientManager.getByEmail("164851225@qq.com",1,1,asd12eq);
JSONArray qwe = asd.getJSONArray("data");
System.out.println(asd.getJSONArray("data"));
System.out.println(qwe);
System.out.println(asd);
System.out.println(asd);
System.out.println(asd);

Loading…
Cancel
Save