5
5
import com .google .gson .JsonObject ;
6
6
7
7
import me .chanjar .weixin .common .exception .WxErrorException ;
8
- import me .chanjar .weixin .common .util .http .SimpleGetRequestExecutor ;
9
- import me .chanjar .weixin .common .util .http .SimplePostRequestExecutor ;
10
8
import me .chanjar .weixin .mp .api .WxMpService ;
11
9
import me .chanjar .weixin .mp .api .WxMpUserService ;
12
10
import me .chanjar .weixin .mp .bean .WxMpUserQuery ;
@@ -30,27 +28,30 @@ public void userUpdateRemark(String openid, String remark) throws WxErrorExcepti
30
28
JsonObject json = new JsonObject ();
31
29
json .addProperty ("openid" , openid );
32
30
json .addProperty ("remark" , remark );
33
- this .wxMpService .execute ( new SimplePostRequestExecutor (), url , json .toString ());
31
+ this .wxMpService .post ( url , json .toString ());
34
32
}
35
33
36
34
@ Override
37
35
public WxMpUser userInfo (String openid , String lang ) throws WxErrorException {
38
36
String url = API_URL_PREFIX + "/info" ;
39
37
lang = lang == null ? "zh_CN" : lang ;
40
- String responseContent = this .wxMpService .execute (new SimpleGetRequestExecutor (), url , "openid=" + openid + "&lang=" + lang );
38
+ String responseContent = this .wxMpService .get (url ,
39
+ "openid=" + openid + "&lang=" + lang );
41
40
return WxMpUser .fromJson (responseContent );
42
41
}
43
42
44
43
@ Override
45
44
public WxMpUserList userList (String next_openid ) throws WxErrorException {
46
45
String url = API_URL_PREFIX + "/get" ;
47
- String responseContent = this .wxMpService .execute (new SimpleGetRequestExecutor (), url , next_openid == null ? null : "next_openid=" + next_openid );
46
+ String responseContent = this .wxMpService .get (url ,
47
+ next_openid == null ? null : "next_openid=" + next_openid );
48
48
return WxMpUserList .fromJson (responseContent );
49
49
}
50
50
51
51
@ Override
52
- public List <WxMpUser > userInfoList (List <String > openidList ) throws WxErrorException {
53
- return userInfoList (new WxMpUserQuery (openidList ));
52
+ public List <WxMpUser > userInfoList (List <String > openids )
53
+ throws WxErrorException {
54
+ return this .userInfoList (new WxMpUserQuery (openids ));
54
55
}
55
56
56
57
@ Override
0 commit comments