Merge branch 'hotfix' into develop

master
wangning 6 years ago
commit 1ce6312a50

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

@ -2481,7 +2481,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject client = clientDetail(manager, clientMoniker);
Assert.notEmpty(client);
clientModifySupport.processClientModify(new DisableModify(manager, clientMoniker, false));
mailGunService.removeMailList(client);
JSONObject sameMailClients = getByEmail(client.getString("contact_email"),1,1);
if(sameMailClients.getJSONObject("data").size()<1) {
mailGunService.removeMailList(client);
}
}
@Override
@ -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")));
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;
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.tools.connections.attachment.core.AttachmentClient;
import au.com.royalpay.payment.tools.mail.MailGunClient;
@ -163,6 +164,7 @@ public class MailGunServiceImpl implements MailGunService {
@Override
public void removeMailList(JSONObject client) {
mailGunClient.removeClientOfMailList(client.getString("contact_email"),mailListDefault);
}

@ -312,12 +312,15 @@
</select>
<select id="simpleQuery" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_clients
where is_vaild = 1
where is_valid = 1
<if test="source!=null">
and source = #{source}
</if>
<if test="approve_result!=null">
and approve_result = #{approve_result}
</if>
<if test="contact_email!=null">
and contact_email = #{contact_email}
</if>
</select>
</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.ClientMapper;
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.SendMail;
@ -37,7 +38,7 @@ import cn.yixblog.platform.http.HttpRequestResult;
* Created by wangning on 05/01/2018.
*/
@SpringBootTest
@ActiveProfiles({ "proxy", "alipay", "wechat", "jd", "bestpay" })
@ActiveProfiles({ "dev", "alipay", "wechat", "jd", "bestpay" })
@RunWith(SpringRunner.class)
public class CustomerImpressionImplTest {
@Resource
@ -53,6 +54,8 @@ public class CustomerImpressionImplTest {
private MailGunClient mailGunClient;
@Resource
private ClientConfigMapper clientConfigMapper;
@Resource
private ClientManager clientManager;
// @Test
// 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"),"",
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