|
|
@@ -72,4 +72,24 @@ public class WxMpUserTagServiceImpl implements WxMpUserTagService { |
|
|
|
|
|
|
|
throw new WxErrorException(wxError); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Boolean tagDelete(Integer id) throws WxErrorException { |
|
|
|
String url = API_URL_PREFIX + "/delete"; |
|
|
|
|
|
|
|
JsonObject json = new JsonObject(); |
|
|
|
JsonObject tagJson = new JsonObject(); |
|
|
|
tagJson.addProperty("id", id); |
|
|
|
json.add("tag", tagJson); |
|
|
|
|
|
|
|
String responseContent = this.wxMpService.post(url, json.toString()); |
|
|
|
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}", url, json.toString(), |
|
|
|
responseContent); |
|
|
|
WxError wxError = WxError.fromJson(responseContent); |
|
|
|
if (wxError.getErrorCode() == 0) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
throw new WxErrorException(wxError); |
|
|
|
} |
|
|
|
} |