@@ -349,8 +349,9 @@ public List<WxMpGroup> groupGet() throws WxErrorException {
349
349
* 查询时返回的是 { groups : [ { id : ..., name : ..., count : ... }, ... ] }
350
350
*/
351
351
JsonElement tmpJsonElement = Streams .parse (new JsonReader (new StringReader (responseContent )));
352
- return WxMpGsonBuilder .INSTANCE .create ().fromJson (tmpJsonElement .getAsJsonObject ().get ("groups" ), new TypeToken <List <WxMpGroup >>() {
353
- }.getType ());
352
+ return WxMpGsonBuilder .INSTANCE .create ().fromJson (tmpJsonElement .getAsJsonObject ().get ("groups" ),
353
+ new TypeToken <List <WxMpGroup >>() {
354
+ }.getType ());
354
355
}
355
356
356
357
public long userGetGroup (String openid ) throws WxErrorException {
@@ -597,8 +598,9 @@ public List<WxMpUserCumulate> getUserCumulate(Date beginDate, Date endDate) thro
597
598
param .addProperty ("end_date" , SIMPLE_DATE_FORMAT .format (endDate ));
598
599
String responseContent = post (url , param .toString ());
599
600
JsonElement tmpJsonElement = Streams .parse (new JsonReader (new StringReader (responseContent )));
600
- return WxMpGsonBuilder .INSTANCE .create ().fromJson (tmpJsonElement .getAsJsonObject ().get ("list" ), new TypeToken <List <WxMpUserCumulate >>() {
601
- }.getType ());
601
+ return WxMpGsonBuilder .INSTANCE .create ().fromJson (tmpJsonElement .getAsJsonObject ().get ("list" ),
602
+ new TypeToken <List <WxMpUserCumulate >>() {
603
+ }.getType ());
602
604
}
603
605
604
606
public String get (String url , String queryParam ) throws WxErrorException {
@@ -646,6 +648,9 @@ public <T, E> T execute(RequestExecutor<T, E> executor, String uri, E data) thro
646
648
}
647
649
648
650
protected <T , E > T executeInternal (RequestExecutor <T , E > executor , String uri , E data ) throws WxErrorException {
651
+ if (uri .indexOf ("access_token=" ) != -1 ) {
652
+ throw new IllegalArgumentException ("uri参数中不允许有access_token: " + uri );
653
+ }
649
654
String accessToken = getAccessToken (false );
650
655
651
656
String uriWithAccessToken = uri ;
0 commit comments