【小程序】增加新版自定义交易组件之更新售后申请API

This commit is contained in:
liming
2022-08-26 11:53:44 +08:00
parent 6e5800181b
commit 30a0eb8e98
5 changed files with 72 additions and 11 deletions

View File

@@ -47,6 +47,16 @@ public interface WxMaShopAfterSaleService {
*/
WxMaShopBaseResponse update(WxMaShopAfterSaleUpdateRequest request) throws WxErrorException;
/**
* 更新售后(EC版)
*
* @param request
* @return WxMaShopBaseResponse
* @throws WxErrorException
*/
WxMaShopBaseResponse update(WxMaShopEcAfterSaleUpdateRequest request) throws WxErrorException;
/**
* 用户取消售后申请
* @param outAfterSaleId 商家自定义订单ID

View File

@@ -95,6 +95,16 @@ public class WxMaShopAfterSaleServiceImpl implements WxMaShopAfterSaleService {
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopBaseResponse.class);
}
@Override
public WxMaShopBaseResponse update(WxMaShopEcAfterSaleUpdateRequest request) throws WxErrorException {
String responseContent = this.wxMaService.post(EC_AFTERSALE_UPDATE, request);
JsonObject jsonObject = GsonParser.parse(responseContent);
if (jsonObject.get(ERRCODE).getAsInt() != 0) {
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
}
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopBaseResponse.class);
}
/**
* 用户取消售后申请
* @param outAfterSaleId 商家自定义订单ID