Skip to content

Commit fd38444

Browse files
committed
修复微信的接口格式混乱导致重构代码有问题的问题
1 parent b88560d commit fd38444

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpKefuServiceImpl.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.util.Date;
55

66
import com.google.gson.JsonObject;
7+
78
import me.chanjar.weixin.common.bean.result.WxError;
89
import me.chanjar.weixin.common.exception.WxErrorException;
910
import me.chanjar.weixin.common.util.http.MediaUploadRequestExecutor;
@@ -13,7 +14,12 @@
1314
import me.chanjar.weixin.mp.api.WxMpService;
1415
import me.chanjar.weixin.mp.bean.kefu.request.WxMpKfAccountRequest;
1516
import me.chanjar.weixin.mp.bean.kefu.request.WxMpKfSessionRequest;
16-
import me.chanjar.weixin.mp.bean.kefu.result.*;
17+
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfList;
18+
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfMsgList;
19+
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfOnlineList;
20+
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfSessionGetResult;
21+
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfSessionList;
22+
import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfSessionWaitCaseList;
1723

1824
/**
1925
*
@@ -30,15 +36,15 @@ public WxMpKefuServiceImpl(WxMpService wxMpService) {
3036

3137
@Override
3238
public WxMpKfList kfList() throws WxErrorException {
33-
String url = API_URL_PREFIX + "/getkflist";
39+
String url = "https://api.weixin.qq.com/cgi-bin/customservice/getkflist";
3440
String responseContent = this.wxMpService
3541
.execute(new SimpleGetRequestExecutor(), url, null);
3642
return WxMpKfList.fromJson(responseContent);
3743
}
3844

3945
@Override
4046
public WxMpKfOnlineList kfOnlineList() throws WxErrorException {
41-
String url = API_URL_PREFIX + "/getonlinekflist";
47+
String url = "https://api.weixin.qq.com/cgi-bin/customservice/getonlinekflist";
4248
String responseContent = this.wxMpService
4349
.execute(new SimpleGetRequestExecutor(), url, null);
4450
return WxMpKfOnlineList.fromJson(responseContent);

0 commit comments

Comments
 (0)