|
|
|
@ -1,10 +1,13 @@
|
|
|
|
|
package au.com.royalpay.payment.manage.kira;
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
|
import au.com.royalpay.payment.manage.openim.core.CustomerServiceService;
|
|
|
|
|
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
|
|
|
|
|
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
|
|
|
|
|
import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
import org.junit.runner.RunWith;
|
|
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
@ -14,7 +17,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
@SpringBootTest
|
|
|
|
|
@ActiveProfiles({"dev","alipay","wechat","jd","bestpay"})
|
|
|
|
|
@ActiveProfiles({"local","alipay","wechat","jd","bestpay"})
|
|
|
|
|
@RunWith(SpringRunner.class)
|
|
|
|
|
public class WechatMessageTest {
|
|
|
|
|
|
|
|
|
@ -22,6 +25,8 @@ public class WechatMessageTest {
|
|
|
|
|
private PaymentApi paymentApi;
|
|
|
|
|
@Resource
|
|
|
|
|
private MpWechatApiProvider mpWechatApiProvider;
|
|
|
|
|
@Resource
|
|
|
|
|
private CustomerServiceService customerServiceService;
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void asd(){
|
|
|
|
@ -39,4 +44,34 @@ public class WechatMessageTest {
|
|
|
|
|
|
|
|
|
|
api.sendTemplateMessage(msg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void qwe(){
|
|
|
|
|
JSONObject param = new JSONObject();
|
|
|
|
|
param.put("uid","asd");
|
|
|
|
|
param.put("tuid","kira");
|
|
|
|
|
for (int i = 0; i < 10; i++) {
|
|
|
|
|
customerServiceService.addUnreadMsg(param);
|
|
|
|
|
}
|
|
|
|
|
param.put("uid","q1");
|
|
|
|
|
for (int i = 0; i < 45; i++) {
|
|
|
|
|
customerServiceService.addUnreadMsg(param);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject params = new JSONObject();
|
|
|
|
|
params.put("uid","asd");
|
|
|
|
|
params.put("tuid","asd");
|
|
|
|
|
for (int i = 0; i < 10; i++) {
|
|
|
|
|
customerServiceService.addUnreadMsg(params);
|
|
|
|
|
}
|
|
|
|
|
params.put("uid","q1");
|
|
|
|
|
for (int i = 0; i < 45; i++) {
|
|
|
|
|
customerServiceService.addUnreadMsg(params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
customerServiceService.sendUnreadWxMsg();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|