mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-05-04 20:57:47 +08:00
🐛 #2553 【公众号】修复草稿相关接口返回值多双引号的问题
This commit is contained in:
parent
08ea0bd9df
commit
2c27f8bc5a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user