mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-11-11 19:07:09 +08:00
增加获取客服聊天记录的重载方法,方便一次性获取一定时间间隔内的所有聊天记录
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user