🐛 #2553 【公众号】修复草稿相关接口返回值多双引号的问题

This commit is contained in:
Binary Wang 2022-03-04 15:09:01 +08:00
parent 08ea0bd9df
commit 2c27f8bc5a

View File

@ -43,13 +43,13 @@ public class WxMpDraftServiceImpl implements WxMpDraftService {
@Override
public String addDraft(WxMpAddDraft addDraft) throws WxErrorException {
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
public Boolean updateDraft(WxMpUpdateDraft updateDraftInfo) throws WxErrorException {
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
@ -62,7 +62,7 @@ public class WxMpDraftServiceImpl implements WxMpDraftService {
public Boolean delDraft(String mediaId) throws WxErrorException {
String json = this.mpService.post(WxMpApiUrl.Draft.DEL_DRAFT,
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