fixed something...
This commit is contained in:
parent
e41c9259b8
commit
186ccddfa4
@ -47,8 +47,8 @@ public class GroupApi extends MpApi {
|
|||||||
WeixinResponse response = weixinExecutor.post(
|
WeixinResponse response = weixinExecutor.post(
|
||||||
String.format(group_create_uri, token.getAccessToken()),
|
String.format(group_create_uri, token.getAccessToken()),
|
||||||
group.toCreateJson());
|
group.toCreateJson());
|
||||||
|
return JSON.parseObject(response.getAsJson().getString("group"),
|
||||||
return response.getAsJson().getObject("group", Group.class);
|
Group.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,8 +63,8 @@ public class GroupApi extends MpApi {
|
|||||||
public List<Group> getGroups() throws WeixinException {
|
public List<Group> getGroups() throws WeixinException {
|
||||||
String group_get_uri = getRequestUri("group_get_uri");
|
String group_get_uri = getRequestUri("group_get_uri");
|
||||||
Token token = tokenManager.getCache();
|
Token token = tokenManager.getCache();
|
||||||
WeixinResponse response = weixinExecutor.get(String.format(group_get_uri,
|
WeixinResponse response = weixinExecutor.get(String.format(
|
||||||
token.getAccessToken()));
|
group_get_uri, token.getAccessToken()));
|
||||||
|
|
||||||
return JSON.parseArray(response.getAsJson().getString("groups"),
|
return JSON.parseArray(response.getAsJson().getString("groups"),
|
||||||
Group.class);
|
Group.class);
|
||||||
@ -132,8 +132,8 @@ public class GroupApi extends MpApi {
|
|||||||
throws WeixinException {
|
throws WeixinException {
|
||||||
String group_move_uri = getRequestUri("group_move_uri");
|
String group_move_uri = getRequestUri("group_move_uri");
|
||||||
Token token = tokenManager.getCache();
|
Token token = tokenManager.getCache();
|
||||||
WeixinResponse response = weixinExecutor.post(String.format(group_move_uri,
|
WeixinResponse response = weixinExecutor.post(String.format(
|
||||||
token.getAccessToken()), String.format(
|
group_move_uri, token.getAccessToken()), String.format(
|
||||||
"{\"openid\":\"%s\",\"to_groupid\":%d}", openId, groupId));
|
"{\"openid\":\"%s\",\"to_groupid\":%d}", openId, groupId));
|
||||||
|
|
||||||
return response.getAsResult();
|
return response.getAsResult();
|
||||||
|
|||||||
@ -31,7 +31,6 @@ public class Tag implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private int count;
|
private int count;
|
||||||
|
|
||||||
@JSONCreator
|
|
||||||
public Tag(@JSONField(name = "id") int id,
|
public Tag(@JSONField(name = "id") int id,
|
||||||
@JSONField(name = "name") String name) {
|
@JSONField(name = "name") String name) {
|
||||||
this(id, name, 0);
|
this(id, name, 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user