添加多客服中客服管理的6个接口

This commit is contained in:
BinaryWang
2016-07-04 17:31:45 +08:00
parent 1ebcd9c864
commit e169bcc2e9
13 changed files with 725 additions and 24 deletions

View File

@@ -0,0 +1,41 @@
package me.chanjar.weixin.mp.bean.result.kefu;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.testng.Assert;
import org.testng.annotations.Test;
import me.chanjar.weixin.mp.bean.customerservice.result.WxMpKfList;
@Test
public class WxMpKfListTest {
public void testFromJson() {
String json=" {\r\n" +
" \"kf_list\" : [\r\n" +
" {\r\n" +
" \"kf_account\" : \"test1@test\",\r\n" +
" \"kf_headimgurl\" : \"http://mmbiz.qpic.cn/mmbiz/4whpV1VZl2iccsvYbHvnphkyGtnvjfUS8Ym0GSaLic0FD3vN0V8PILcibEGb2fPfEOmw/0\",\r\n" +
" \"kf_id\" : \"1001\",\r\n" +
" \"kf_nick\" : \"ntest1\"\r\n" +
" },\r\n" +
" {\r\n" +
" \"kf_account\" : \"test2@test\",\r\n" +
" \"kf_headimgurl\" : \"http://mmbiz.qpic.cn/mmbiz/4whpV1VZl2iccsvYbHvnphkyGtnvjfUS8Ym0GSaLic0FD3vN0V8PILcibEGb2fPfEOmw/0\",\r\n" +
" \"kf_id\" : \"1002\",\r\n" +
" \"kf_nick\" : \"ntest2\"\r\n" +
" },\r\n" +
" {\r\n" +
" \"kf_account\" : \"test3@test\",\r\n" +
" \"kf_headimgurl\" : \"http://mmbiz.qpic.cn/mmbiz/4whpV1VZl2iccsvYbHvnphkyGtnvjfUS8Ym0GSaLic0FD3vN0V8PILcibEGb2fPfEOmw/0\",\r\n" +
" \"kf_id\" : \"1003\",\r\n" +
" \"kf_nick\" : \"ntest3\"\r\n" +
" }\r\n" +
" ]\r\n" +
" }";
WxMpKfList wxMpKfList = WxMpKfList.fromJson(json);
Assert.assertNotNull(wxMpKfList);
System.err.println(ToStringBuilder.reflectionToString(wxMpKfList));
}
}

View File

@@ -0,0 +1,39 @@
package me.chanjar.weixin.mp.bean.result.kefu;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.testng.Assert;
import org.testng.annotations.Test;
import me.chanjar.weixin.mp.bean.customerservice.result.WxMpKfOnlineList;
@Test
public class WxMpKfOnlineListTest {
@Test
public void testFromJson() {
String json = "{\r\n" +
" \"kf_online_list\": [\r\n" +
" {\r\n" +
" \"kf_account\": \"test1@test\", \r\n" +
" \"status\": 1, \r\n" +
" \"kf_id\": \"1001\", \r\n" +
" \"auto_accept\": 0, \r\n" +
" \"accepted_case\": 1\r\n" +
" },\r\n" +
" {\r\n" +
" \"kf_account\": \"test2@test\", \r\n" +
" \"status\": 1, \r\n" +
" \"kf_id\": \"1002\", \r\n" +
" \"auto_accept\": 0, \r\n" +
" \"accepted_case\": 2\r\n" +
" }\r\n" +
" ]\r\n" +
"}";
WxMpKfOnlineList wxMpKfOnlineList = WxMpKfOnlineList.fromJson(json);
Assert.assertNotNull(wxMpKfOnlineList);
System.err.println(ToStringBuilder.reflectionToString(wxMpKfOnlineList));
}
}