创建标签时构造器问题
This commit is contained in:
parent
d45cd6b8ee
commit
451a351027
@ -48,9 +48,8 @@ public class TagApi extends MpApi {
|
|||||||
WeixinResponse response = weixinExecutor.post(
|
WeixinResponse response = weixinExecutor.post(
|
||||||
String.format(tag_create_uri, tokenManager.getAccessToken()),
|
String.format(tag_create_uri, tokenManager.getAccessToken()),
|
||||||
String.format("{\"tag\":{\"name\":\"%s\"}}", name));
|
String.format("{\"tag\":{\"name\":\"%s\"}}", name));
|
||||||
|
JSONObject obj = response.getAsJson().getJSONObject("tag");
|
||||||
return JSON.parseObject(response.getAsJson().getString("tag"),
|
return new Tag(obj.getIntValue("id"), obj.getString("name"));
|
||||||
Tag.class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user