Merge branch 'hotfix' into develop

master
wangning 7 years ago
commit 1ce6312a50

@ -304,4 +304,6 @@ public interface ClientManager {
JSONObject simpleQuery(JSONObject param, int page,int limit); JSONObject simpleQuery(JSONObject param, int page,int limit);
JSONObject getByEmail(String email, int page, int limit);
} }

@ -2481,8 +2481,11 @@ 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);
if(sameMailClients.getJSONObject("data").size()<1) {
mailGunService.removeMailList(client); mailGunService.removeMailList(client);
} }
}
@Override @Override
public void checkTodo(JSONObject manager, List<TodoNotice> notices) { public void checkTodo(JSONObject manager, List<TodoNotice> notices) {
@ -3510,4 +3513,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
PageList<JSONObject> partners = clientMapper.listPartners(param, new PageBounds(page, limit, Order.formString("create_time.desc"))); PageList<JSONObject> partners = clientMapper.listPartners(param, new PageBounds(page, limit, Order.formString("create_time.desc")));
return PageListUtils.buildPageListResult(partners); return PageListUtils.buildPageListResult(partners);
} }
@Override
public JSONObject getByEmail(String email, int page, int limit) {
JSONObject param = new JSONObject();
param.put("contact_email",email);
return PageListUtils.buildPageListResult(clientMapper.simpleQuery(param,new PageBounds(page, limit)));
}
} }

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.system.core.impl; package au.com.royalpay.payment.manage.system.core.impl;
import au.com.royalpay.payment.manage.mappers.system.MailSendMapper; import au.com.royalpay.payment.manage.mappers.system.MailSendMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.system.core.MailGunService; import au.com.royalpay.payment.manage.system.core.MailGunService;
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient; import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
import au.com.royalpay.payment.tools.mail.MailGunClient; import au.com.royalpay.payment.tools.mail.MailGunClient;
@ -163,6 +164,7 @@ public class MailGunServiceImpl implements MailGunService {
@Override @Override
public void removeMailList(JSONObject client) { public void removeMailList(JSONObject client) {
mailGunClient.removeClientOfMailList(client.getString("contact_email"),mailListDefault); mailGunClient.removeClientOfMailList(client.getString("contact_email"),mailListDefault);
} }

@ -312,12 +312,15 @@
</select> </select>
<select id="simpleQuery" resultType="com.alibaba.fastjson.JSONObject"> <select id="simpleQuery" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_clients select * from sys_clients
where is_vaild = 1 where is_valid = 1
<if test="source!=null"> <if test="source!=null">
and source = #{source} and source = #{source}
</if> </if>
<if test="approve_result!=null"> <if test="approve_result!=null">
and approve_result = #{approve_result} and approve_result = #{approve_result}
</if> </if>
<if test="contact_email!=null">
and contact_email = #{contact_email}
</if>
</select> </select>
</mapper> </mapper>

@ -4,6 +4,7 @@ import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper; import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper; import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgMapper; import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.tools.mail.MailGunClient; import au.com.royalpay.payment.tools.mail.MailGunClient;
import au.com.royalpay.payment.tools.mail.SendMail; import au.com.royalpay.payment.tools.mail.SendMail;
@ -37,7 +38,7 @@ import cn.yixblog.platform.http.HttpRequestResult;
* Created by wangning on 05/01/2018. * Created by wangning on 05/01/2018.
*/ */
@SpringBootTest @SpringBootTest
@ActiveProfiles({ "proxy", "alipay", "wechat", "jd", "bestpay" }) @ActiveProfiles({ "dev", "alipay", "wechat", "jd", "bestpay" })
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
public class CustomerImpressionImplTest { public class CustomerImpressionImplTest {
@Resource @Resource
@ -53,6 +54,8 @@ public class CustomerImpressionImplTest {
private MailGunClient mailGunClient; private MailGunClient mailGunClient;
@Resource @Resource
private ClientConfigMapper clientConfigMapper; private ClientConfigMapper clientConfigMapper;
@Resource
private ClientManager clientManager;
// @Test // @Test
// public void redisQueue() { // public void redisQueue() {
@ -185,4 +188,13 @@ public class CustomerImpressionImplTest {
JSONObject result = mailGunClient.addListMember(client.getString("contact_email"), "merchants@mail.royalpay.com.au", client.getString("contact_person"),"", JSONObject result = mailGunClient.addListMember(client.getString("contact_email"), "merchants@mail.royalpay.com.au", client.getString("contact_person"),"",
var); var);
} }
@Test
public void fd(){
JSONObject asd = clientManager.getByEmail("123@askdjh.com",1,1);
System.out.println(asd);
System.out.println(asd);
System.out.println(asd);
System.out.println(asd);
}
} }
Loading…
Cancel
Save