Skip to content

Commit 78f44b2

Browse files
committed
按照最新微信官方文档对客服会话控制接口进行修正
1 parent 3534234 commit 78f44b2

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpKefuService.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ boolean kfAccountUploadHeadImg(String kfAccount, File imgFile)
8585
*/
8686
boolean kfAccountDel(String kfAccount) throws WxErrorException;
8787

88-
//*******************多客服会话控制接口***********************//
88+
//*******************客服会话控制接口***********************//
8989
/**
9090
* <pre>
9191
* 创建会话
9292
* 开发者可以使用本接口,为多客服的客服工号创建会话,将某个客户直接指定给客服工号接待,需要注意此接口不会受客服自动接入数以及自动接入开关限制。只能为在线的客服(PC客户端在线,或者已绑定多客服助手)创建会话。
93-
* 详情请见:<a href="http://mp.weixin.qq.com/wiki/4/4b256cfb246b22ad020e07cf8a61a738.html">多客服会话控制接口</a>
93+
* 详情请见:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1458044820&token=&lang=zh_CN">客服会话控制接口</a>
9494
* 接口url格式: https://api.weixin.qq.com/customservice/kfsession/create?access_token=ACCESS_TOKEN
9595
* </pre>
9696
*/
@@ -100,7 +100,7 @@ boolean kfAccountUploadHeadImg(String kfAccount, File imgFile)
100100
* <pre>
101101
* 关闭会话
102102
* 开发者可以使用本接口,关闭一个会话。
103-
* 详情请见:<a href="http://mp.weixin.qq.com/wiki/4/4b256cfb246b22ad020e07cf8a61a738.html">多客服会话控制接口</a>
103+
* 详情请见:<a href="http://mp.weixin.qq.com/wiki/4/4b256cfb246b22ad020e07cf8a61a738.html">客服会话控制接口</a>
104104
* 接口url格式: https://api.weixin.qq.com/customservice/kfsession/close?access_token=ACCESS_TOKEN
105105
* </pre>
106106
*/
@@ -109,8 +109,8 @@ boolean kfAccountUploadHeadImg(String kfAccount, File imgFile)
109109
/**
110110
* <pre>
111111
* 获取客户的会话状态
112-
* 开发者可以通过本接口获取客户当前的会话状态
113-
* 详情请见:<a href="http://mp.weixin.qq.com/wiki/4/4b256cfb246b22ad020e07cf8a61a738.html">多客服会话控制接口</a>
112+
* 此接口获取一个客户的会话,如果不存在,则kf_account为空
113+
* 详情请见:<a href="http://mp.weixin.qq.com/wiki/4/4b256cfb246b22ad020e07cf8a61a738.html">客服会话控制</a>
114114
* 接口url格式: https://api.weixin.qq.com/customservice/kfsession/getsession?access_token=ACCESS_TOKEN&openid=OPENID
115115
* </pre>
116116
*/
@@ -120,7 +120,7 @@ boolean kfAccountUploadHeadImg(String kfAccount, File imgFile)
120120
* <pre>
121121
* 获取客服的会话列表
122122
* 开发者可以通过本接口获取某个客服正在接待的会话列表。
123-
* 详情请见:<a href="http://mp.weixin.qq.com/wiki/4/4b256cfb246b22ad020e07cf8a61a738.html">多客服会话控制接口</a>
123+
* 详情请见:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1458044820&token=&lang=zh_CN">客服会话控制</a>
124124
* 接口url格式: https://api.weixin.qq.com/customservice/kfsession/getsessionlist?access_token=ACCESS_TOKEN&kf_account=KFACCOUNT
125125
* </pre>
126126
*/
@@ -130,7 +130,7 @@ boolean kfAccountUploadHeadImg(String kfAccount, File imgFile)
130130
* <pre>
131131
* 获取未接入会话列表
132132
* 开发者可以通过本接口获取当前正在等待队列中的会话列表,此接口最多返回最早进入队列的100个未接入会话。
133-
* 详情请见:<a href="http://mp.weixin.qq.com/wiki/4/4b256cfb246b22ad020e07cf8a61a738.html">多客服会话控制接口</a>
133+
* 详情请见:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1458044820&token=&lang=zh_CN">客服会话控制</a>
134134
* 接口url格式: https://api.weixin.qq.com/customservice/kfsession/getwaitcase?access_token=ACCESS_TOKEN
135135
* </pre>
136136
*/

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/kefu/result/WxMpKfSession.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,19 @@ public class WxMpKfSession {
1818
private String kfAccount;
1919

2020
/**
21-
* createtime 会话接入的时间 或者 来访时间,UNIX时间戳
21+
* createtime 会话接入的时间,UNIX时间戳
22+
* 该返回值 存在于 获取客服会话列表接口
2223
*/
2324
@SerializedName("createtime")
2425
private long createTime;
2526

27+
/**
28+
* latest_time 粉丝的最后一条消息的时间,UNIX时间戳
29+
* 该返回值 存在于 获取未接入会话列表接口
30+
*/
31+
@SerializedName("latest_time")
32+
private long latestTime;
33+
2634
/**
2735
* openid 客户openid
2836
*/
@@ -58,4 +66,11 @@ public void setOpenid(String openid) {
5866
this.openid = openid;
5967
}
6068

69+
public long getLatestTime() {
70+
return this.latestTime;
71+
}
72+
73+
public void setLatestTime(long latestTime) {
74+
this.latestTime = latestTime;
75+
}
6176
}

0 commit comments

Comments
 (0)