增加查看客服聊天记录的接口 #5
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
package me.chanjar.weixin.mp.api.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
|
||||
import ch.qos.logback.classic.BasicConfigurator;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import me.chanjar.weixin.mp.bean.kefu.result.*;
|
||||
import org.joda.time.DateTime;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.DataProvider;
|
||||
import org.testng.annotations.Guice;
|
||||
@@ -14,12 +20,6 @@ import me.chanjar.weixin.mp.api.ApiTestModule;
|
||||
import me.chanjar.weixin.mp.api.ApiTestModule.WxXmlMpInMemoryConfigStorage;
|
||||
import me.chanjar.weixin.mp.api.WxMpServiceImpl;
|
||||
import me.chanjar.weixin.mp.bean.kefu.request.WxMpKfAccountRequest;
|
||||
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfInfo;
|
||||
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfList;
|
||||
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfOnlineList;
|
||||
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfSessionGetResult;
|
||||
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfSessionList;
|
||||
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfSessionWaitCaseList;
|
||||
|
||||
/**
|
||||
* 测试客服相关接口
|
||||
@@ -145,4 +145,14 @@ public class WxMpKefuServiceImplTest {
|
||||
System.err.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testKfMsgList() throws WxErrorException, JsonProcessingException {
|
||||
BasicConfigurator.configureDefaultContext();
|
||||
Date startTime = DateTime.now().minusDays(1).toDate();
|
||||
Date endTime = DateTime.now().toDate();
|
||||
WxMpKfMsgList result = this.wxService.getKefuService().kfMsgList(startTime,endTime, 0, 20);
|
||||
Assert.assertNotNull(result);
|
||||
System.err.println(new ObjectMapper().writeValueAsString(result));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user