@@ -349,8 +349,9 @@ public List<WxMpGroup> groupGet() throws WxErrorException {
349349 * 查询时返回的是 { groups : [ { id : ..., name : ..., count : ... }, ... ] }
350350 */
351351 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 ());
354355 }
355356
356357 public long userGetGroup (String openid ) throws WxErrorException {
@@ -597,8 +598,9 @@ public List<WxMpUserCumulate> getUserCumulate(Date beginDate, Date endDate) thro
597598 param .addProperty ("end_date" , SIMPLE_DATE_FORMAT .format (endDate ));
598599 String responseContent = post (url , param .toString ());
599600 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 ());
602604 }
603605
604606 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
646648 }
647649
648650 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+ }
649654 String accessToken = getAccessToken (false );
650655
651656 String uriWithAccessToken = uri ;
0 commit comments