mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
【小程序】增加新版自定义交易组件获取售后单详情API
This commit is contained in:
@@ -1,16 +1,7 @@
|
||||
package cn.binarywang.wx.miniapp.api;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAcceptReturnRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAfterSaleAddRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAfterSaleGetRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAfterSaleListRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAfterSaleUpdateRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAfterSaleUploadReturnInfoRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopUploadCerficatesRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopAfterSaleAddResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopAfterSaleGetResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopAfterSaleListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopBaseResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.*;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.*;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
|
||||
/**
|
||||
@@ -38,6 +29,15 @@ public interface WxMaShopAfterSaleService {
|
||||
*/
|
||||
WxMaShopAfterSaleGetResponse get(WxMaShopAfterSaleGetRequest request) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 获取售后单详情(EC版)
|
||||
*
|
||||
* @param request
|
||||
* @return WxMaShopEcAfterSaleGetResponse
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMaShopEcAfterSaleGetResponse get(WxMaShopEcAfterSaleGetRequest request) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 更新售后
|
||||
*
|
||||
|
||||
@@ -2,17 +2,8 @@ package cn.binarywang.wx.miniapp.api.impl;
|
||||
|
||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||
import cn.binarywang.wx.miniapp.api.WxMaShopAfterSaleService;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAcceptReturnRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAfterSaleAddRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAfterSaleGetRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAfterSaleListRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAfterSaleUpdateRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAfterSaleUploadReturnInfoRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopUploadCerficatesRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopAfterSaleAddResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopAfterSaleGetResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopAfterSaleListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopBaseResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.*;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.*;
|
||||
import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder;
|
||||
import com.google.gson.JsonObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -70,6 +61,23 @@ public class WxMaShopAfterSaleServiceImpl implements WxMaShopAfterSaleService {
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopAfterSaleGetResponse.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取售后单详情(EC版)
|
||||
*
|
||||
* @param request
|
||||
* @return WxMaShopEcAfterSaleGetResponse
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
@Override
|
||||
public WxMaShopEcAfterSaleGetResponse get(WxMaShopEcAfterSaleGetRequest request) throws WxErrorException {
|
||||
String responseContent = this.wxMaService.post(ECAFTERSALE_GET, 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, WxMaShopEcAfterSaleGetResponse.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新售后
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user