@Test public void testCreate() throws Exception { this.tagId = this.wxService.getTagService().create("测试标签" + System.currentTimeMillis()); System.out.println(this.tagId); }
@Override public String create(String tagName) throws WxErrorException { String url = "https: JsonObject o = new JsonObject(); o.addProperty("tagname", tagName); String responseContent = this.mainService.post(url, o.toString()); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return tmpJsonElement.getAsJsonObject().get("tagid").getAsString(); }
WxCpTagServiceImpl implements WxCpTagService { @Override public String create(String tagName) throws WxErrorException { String url = "https: JsonObject o = new JsonObject(); o.addProperty("tagname", tagName); String responseContent = this.mainService.post(url, o.toString()); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return tmpJsonElement.getAsJsonObject().get("tagid").getAsString(); } }
WxCpTagServiceImpl implements WxCpTagService { @Override public String create(String tagName) throws WxErrorException { String url = "https: JsonObject o = new JsonObject(); o.addProperty("tagname", tagName); String responseContent = this.mainService.post(url, o.toString()); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return tmpJsonElement.getAsJsonObject().get("tagid").getAsString(); } WxCpTagServiceImpl(WxCpService mainService); }
WxCpTagServiceImpl implements WxCpTagService { @Override public String create(String tagName) throws WxErrorException { String url = "https: JsonObject o = new JsonObject(); o.addProperty("tagname", tagName); String responseContent = this.mainService.post(url, o.toString()); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return tmpJsonElement.getAsJsonObject().get("tagid").getAsString(); } WxCpTagServiceImpl(WxCpService mainService); @Override String create(String tagName); @Override void update(String tagId, String tagName); @Override void delete(String tagId); @Override List<WxCpTag> listAll(); @Override List<WxCpUser> listUsersByTagId(String tagId); @Override WxCpTagAddOrRemoveUsersResult addUsers2Tag(String tagId, List<String> userIds, List<String> partyIds); @Override WxCpTagAddOrRemoveUsersResult removeUsersFromTag(String tagId, List<String> userIds, List<String> partyIds); @Override WxCpTagGetResult get(String tagId); }
WxCpTagServiceImpl implements WxCpTagService { @Override public String create(String tagName) throws WxErrorException { String url = "https: JsonObject o = new JsonObject(); o.addProperty("tagname", tagName); String responseContent = this.mainService.post(url, o.toString()); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return tmpJsonElement.getAsJsonObject().get("tagid").getAsString(); } WxCpTagServiceImpl(WxCpService mainService); @Override String create(String tagName); @Override void update(String tagId, String tagName); @Override void delete(String tagId); @Override List<WxCpTag> listAll(); @Override List<WxCpUser> listUsersByTagId(String tagId); @Override WxCpTagAddOrRemoveUsersResult addUsers2Tag(String tagId, List<String> userIds, List<String> partyIds); @Override WxCpTagAddOrRemoveUsersResult removeUsersFromTag(String tagId, List<String> userIds, List<String> partyIds); @Override WxCpTagGetResult get(String tagId);  }