增加获取客服聊天记录的重载方法,方便一次性获取一定时间间隔内的所有聊天记录

This commit is contained in:
BinaryWang
2016-07-18 14:36:15 +08:00
parent c040ba3929
commit 21dcf17a36
3 changed files with 51 additions and 6 deletions

View File

@@ -147,12 +147,19 @@ public class WxMpKefuServiceImplTest {
@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);
Date endTime = DateTime.now().minusDays(0).toDate();
WxMpKfMsgList result = this.wxService.getKefuService().kfMsgList(startTime,endTime, 1L, 50);
Assert.assertNotNull(result);
System.err.println(new ObjectMapper().writeValueAsString(result));
}
@Test
public void testKfMsgListAll() throws WxErrorException, JsonProcessingException {
Date startTime = DateTime.now().minusDays(1).toDate();
Date endTime = DateTime.now().minusDays(0).toDate();
WxMpKfMsgList result = this.wxService.getKefuService().kfMsgList(startTime,endTime);
Assert.assertNotNull(result);
System.err.println(new ObjectMapper().writeValueAsString(result));
}
}