11package me .chanjar .weixin .mp .api .impl ;
22
3+ import java .io .File ;
4+ import java .util .Date ;
5+
6+ import org .slf4j .Logger ;
7+ import org .slf4j .LoggerFactory ;
8+
39import com .google .gson .JsonObject ;
10+
411import me .chanjar .weixin .common .bean .result .WxError ;
512import me .chanjar .weixin .common .bean .result .WxMediaUploadResult ;
613import me .chanjar .weixin .common .exception .WxErrorException ;
1017import me .chanjar .weixin .mp .bean .WxMpCustomMessage ;
1118import me .chanjar .weixin .mp .bean .kefu .request .WxMpKfAccountRequest ;
1219import me .chanjar .weixin .mp .bean .kefu .request .WxMpKfSessionRequest ;
13- import me .chanjar .weixin .mp .bean .kefu .result .* ;
14- import org . slf4j . Logger ;
15- import org . slf4j . LoggerFactory ;
16-
17- import java . io . File ;
18- import java . util . Date ;
20+ import me .chanjar .weixin .mp .bean .kefu .result .WxMpKfList ;
21+ import me . chanjar . weixin . mp . bean . kefu . result . WxMpKfMsgList ;
22+ import me . chanjar . weixin . mp . bean . kefu . result . WxMpKfOnlineList ;
23+ import me . chanjar . weixin . mp . bean . kefu . result . WxMpKfSessionGetResult ;
24+ import me . chanjar . weixin . mp . bean . kefu . result . WxMpKfSessionList ;
25+ import me . chanjar . weixin . mp . bean . kefu . result . WxMpKfSessionWaitCaseList ;
1926
2027/**
2128 *
@@ -38,7 +45,7 @@ public boolean customMessageSend(WxMpCustomMessage message)
3845 throws WxErrorException {
3946 String url = "https://api.weixin.qq.com/cgi-bin/message/custom/send" ;
4047 String responseContent = this .wxMpService .post (url , message .toJson ());
41- return true ;
48+ return responseContent != null ;
4249 }
4350
4451 @ Override
@@ -60,22 +67,22 @@ public boolean kfAccountAdd(WxMpKfAccountRequest request)
6067 throws WxErrorException {
6168 String url = API_URL_PREFIX + "/kfaccount/add" ;
6269 String responseContent = this .wxMpService .post (url , request .toJson ());
63- return true ;
70+ return responseContent != null ;
6471 }
6572
6673 @ Override
6774 public boolean kfAccountUpdate (WxMpKfAccountRequest request )
6875 throws WxErrorException {
6976 String url = API_URL_PREFIX + "/kfaccount/update" ;
7077 String responseContent = this .wxMpService .post (url , request .toJson ());
71- return true ;
78+ return responseContent != null ;
7279 }
7380
7481 @ Override
7582 public boolean kfAccountInviteWorker (WxMpKfAccountRequest request ) throws WxErrorException {
7683 String url = API_URL_PREFIX + "/kfaccount/inviteworker" ;
7784 String responseContent = this .wxMpService .post (url , request .toJson ());
78- return true ;
85+ return responseContent != null ;
7986 }
8087
8188 @ Override
@@ -84,14 +91,14 @@ public boolean kfAccountUploadHeadImg(String kfAccount, File imgFile)
8491 String url = API_URL_PREFIX + "/kfaccount/uploadheadimg?kf_account=" + kfAccount ;
8592 WxMediaUploadResult responseContent = this .wxMpService
8693 .execute (new MediaUploadRequestExecutor (), url , imgFile );
87- return true ;
94+ return responseContent != null ;
8895 }
8996
9097 @ Override
9198 public boolean kfAccountDel (String kfAccount ) throws WxErrorException {
9299 String url = API_URL_PREFIX + "/kfaccount/del?kf_account=" + kfAccount ;
93100 String responseContent = this .wxMpService .get (url , null );
94- return true ;
101+ return responseContent != null ;
95102 }
96103
97104 @ Override
@@ -100,7 +107,7 @@ public boolean kfSessionCreate(String openid, String kfAccount)
100107 WxMpKfSessionRequest request = new WxMpKfSessionRequest (kfAccount , openid );
101108 String url = API_URL_PREFIX + "/kfsession/create" ;
102109 String responseContent = this .wxMpService .post (url , request .toJson ());
103- return true ;
110+ return responseContent != null ;
104111 }
105112
106113 @ Override
@@ -109,7 +116,7 @@ public boolean kfSessionClose(String openid, String kfAccount)
109116 WxMpKfSessionRequest request = new WxMpKfSessionRequest (kfAccount , openid );
110117 String url = API_URL_PREFIX + "/kfsession/close" ;
111118 String responseContent = this .wxMpService .post (url , request .toJson ());
112- return true ;
119+ return responseContent != null ;
113120 }
114121
115122 @ Override
0 commit comments