Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ public WxMaShopBaseResponse update(WxMaShopAfterSaleUpdateRequest request) throw
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ public class WxMaShopAfterSaleUpdateRequest implements Serializable {
private String openid;
@SerializedName("out_aftersale_id")
private String outAftersaleId;
@SerializedName("type")
private Integer type;
@SerializedName("orderamt")
private Long orderamt;
@SerializedName("refund_reason")
private String refundReason;
@SerializedName("refund_reason_type")
private Integer refundReasonType;
@SerializedName("media_list")
private UploadMediaList mediaList;
@SerializedName("status")
private Integer status;
@SerializedName("finish_all_aftersale")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package cn.binarywang.wx.miniapp.bean.shop.request;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
* @author liming1019
* created on 2022/8/26
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WxMaShopEcAfterSaleUpdateRequest implements Serializable {
private static final long serialVersionUID = 349486861004919697L;

@SerializedName("out_aftersale_id")
private String outAftersaleId;
@SerializedName("aftersale_id")
private String aftersaleId;
@SerializedName("openid")
private String openid;
@SerializedName("type")
private int type;
@SerializedName("orderamt")
private int orderamt;
@SerializedName("refund_reason")
private String refundReason;
@SerializedName("refund_reason_type")
private int refundReasonType;
@SerializedName("media_list")
private List<MediaListBean> mediaList;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class MediaListBean implements Serializable {
@SerializedName("type")
private int type;
@SerializedName("url")
private String url;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,8 @@ interface Delivery {
interface Aftersale {
String AFTERSALE_ADD = "https://api.weixin.qq.com/shop/ecaftersale/add";
String AFTERSALE_CANCEL = "https://api.weixin.qq.com/shop/ecaftersale/cancel";
String AFTERSALE_UPDATE = "https://api.weixin.qq.com/shop/ecaftersale/update";
String AFTERSALE_UPDATE = "https://api.weixin.qq.com/shop/aftersale/update";
String EC_AFTERSALE_UPDATE = "https://api.weixin.qq.com/shop/ecaftersale/update";
String AFTERSALE_UPLOAD_RETURN_INFO = "https://api.weixin.qq.com/shop/ecaftersale/uploadreturninfo";
String AFTERSALE_ACCEPT_REFUND = "https://api.weixin.qq.com/shop/ecaftersale/acceptrefund";
String AFTERSALE_ACCEPT_RETURN = "https://api.weixin.qq.com/shop/ecaftersale/acceptreturn";
Expand Down