mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-06-28 13:16:19 +08:00
🐛 #2553 【公众号】修复草稿相关接口返回值多双引号的问题
This commit is contained in:
parent
08ea0bd9df
commit
2c27f8bc5a
@ -43,13 +43,13 @@ public class WxMpDraftServiceImpl implements WxMpDraftService {
|
|||||||
@Override
|
@Override
|
||||||
public String addDraft(WxMpAddDraft addDraft) throws WxErrorException {
|
public String addDraft(WxMpAddDraft addDraft) throws WxErrorException {
|
||||||
String json = this.mpService.post(WxMpApiUrl.Draft.ADD_DRAFT, addDraft);
|
String json = this.mpService.post(WxMpApiUrl.Draft.ADD_DRAFT, addDraft);
|
||||||
return GsonParser.parse(json).get(MEDIA_ID).toString();
|
return GsonParser.parse(json).get(MEDIA_ID).getAsString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateDraft(WxMpUpdateDraft updateDraftInfo) throws WxErrorException {
|
public Boolean updateDraft(WxMpUpdateDraft updateDraftInfo) throws WxErrorException {
|
||||||
String json = this.mpService.post(WxMpApiUrl.Draft.UPDATE_DRAFT, updateDraftInfo);
|
String json = this.mpService.post(WxMpApiUrl.Draft.UPDATE_DRAFT, updateDraftInfo);
|
||||||
return GsonParser.parse(json).get(ERRCODE).toString().equals(ERRCODE_SUCCESS);
|
return GsonParser.parse(json).get(ERRCODE).getAsString().equals(ERRCODE_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -62,7 +62,7 @@ public class WxMpDraftServiceImpl implements WxMpDraftService {
|
|||||||
public Boolean delDraft(String mediaId) throws WxErrorException {
|
public Boolean delDraft(String mediaId) throws WxErrorException {
|
||||||
String json = this.mpService.post(WxMpApiUrl.Draft.DEL_DRAFT,
|
String json = this.mpService.post(WxMpApiUrl.Draft.DEL_DRAFT,
|
||||||
GsonHelper.buildJsonObject(MEDIA_ID, mediaId));
|
GsonHelper.buildJsonObject(MEDIA_ID, mediaId));
|
||||||
return GsonParser.parse(json).get(ERRCODE).toString().equals(ERRCODE_SUCCESS);
|
return GsonParser.parse(json).get(ERRCODE).getAsString().equals(ERRCODE_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user