Skip to content

Commit 58efa30

Browse files
committed
feat(channel): 新增售后单商家协商
1 parent c9ab956 commit 58efa30

File tree

6 files changed

+83
-8
lines changed

6 files changed

+83
-8
lines changed

weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33

44
import java.util.List;
5-
import me.chanjar.weixin.channel.bean.after.AfterSaleInfoResponse;
6-
import me.chanjar.weixin.channel.bean.after.AfterSaleListParam;
7-
import me.chanjar.weixin.channel.bean.after.AfterSaleListResponse;
8-
import me.chanjar.weixin.channel.bean.after.AfterSaleReasonResponse;
9-
import me.chanjar.weixin.channel.bean.after.AfterSaleRejectReasonResponse;
5+
6+
import me.chanjar.weixin.channel.bean.after.*;
107
import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse;
118
import me.chanjar.weixin.channel.bean.complaint.ComplaintOrderResponse;
129
import me.chanjar.weixin.common.error.WxErrorException;
@@ -176,4 +173,14 @@ WxChannelBaseResponse addComplaintEvidence(String complaintId, String content, L
176173
* @throws WxErrorException 异常
177174
*/
178175
WxChannelBaseResponse rejectExchangeReship(String afterSaleOrderId, String rejectReason, Integer rejectReasonType, List<String> rejectCertificates) throws WxErrorException;
176+
177+
/**
178+
* 商家协商
179+
* 文档地址:https://developers.weixin.qq.com/doc/store/shop/API/channels-shop-aftersale/api_merchantupdateaftersale.html
180+
* @param param 参数
181+
* @return BaseResponse
182+
*
183+
* @throws WxErrorException 异常
184+
*/
185+
WxChannelBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdateParam param) throws WxErrorException;
179186
}

weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImpl.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
@Slf4j
2323
public class WxChannelAfterSaleServiceImpl implements WxChannelAfterSaleService {
2424

25-
/** 微信商店服务 */
25+
/**
26+
* 微信商店服务
27+
*/
2628
private final BaseWxChannelServiceImpl<?, ?> shopService;
2729

2830
public WxChannelAfterSaleServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) {
@@ -121,4 +123,11 @@ public WxChannelBaseResponse rejectExchangeReship(String afterSaleOrderId, Strin
121123
String resJson = shopService.post(AFTER_SALE_REJECT_EXCHANGE_RESHIP_URL, param);
122124
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
123125
}
126+
127+
@Override
128+
public WxChannelBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdateParam param) throws WxErrorException {
129+
String resJson = shopService.post(AFTER_SALE_MERCHANT_UPDATE_URL, param);
130+
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
131+
}
132+
124133
}

weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleAcceptExchangeReshipParam.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import lombok.Data;
66

77
/**
8-
* 售后单同意信息
8+
* 售后单换货发货信息
99
*
1010
* @author <a href="https://gitee.com/cchengg">Chu</a>
1111
*/
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
package me.chanjar.weixin.channel.bean.after;
2+
3+
import com.fasterxml.jackson.annotation.JsonInclude;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
5+
import lombok.Data;
6+
7+
import java.util.List;
8+
9+
/**
10+
* 售后单商家协商信息
11+
*
12+
* @author <a href="https://gitee.com/cchengg">Chu</a>
13+
*/
14+
@Data
15+
@JsonInclude(JsonInclude.Include.NON_NULL)
16+
public class AfterSaleMerchantUpdateParam extends AfterSaleIdParam {
17+
private static final long serialVersionUID = -3672834150982780L;
18+
19+
/** 协商修改把售后单修改成该售后类型。1:退款;2:退货退款*/
20+
@JsonProperty("type")
21+
private Integer type;
22+
23+
/** 金额(单位:分)*/
24+
@JsonProperty("amount")
25+
private Integer amount;
26+
27+
/** 协商描述*/
28+
@JsonProperty("merchant_update_desc")
29+
private String merchantUpdateDesc;
30+
31+
/** 协商原因*/
32+
@JsonProperty("update_reason_type")
33+
private Integer updateReasonType;
34+
35+
/** 1:已协商一致,邀请买家取消售后; 2:邀请买家核实与补充凭证; 3:修改买家售后申请*/
36+
@JsonProperty("merchant_update_type")
37+
private Integer merchantUpdateType;
38+
39+
/** 协商凭证id列表,可使用图片上传接口获取media_id(数据类型填0),当update_reason_type对应的need_image为1时必填*/
40+
@JsonProperty("media_ids")
41+
private List<String> mediaIds;
42+
43+
public AfterSaleMerchantUpdateParam() {
44+
}
45+
46+
public AfterSaleMerchantUpdateParam(String afterSaleOrderId, Integer type, Integer updateReasonType, Integer merchantUpdateType
47+
, Integer amount, String merchantUpdateDesc, List<String> mediaIds) {
48+
super(afterSaleOrderId);
49+
this.type = type;
50+
this.updateReasonType = updateReasonType;
51+
this.merchantUpdateType = merchantUpdateType;
52+
this.amount = amount;
53+
this.merchantUpdateDesc = merchantUpdateDesc;
54+
this.mediaIds = mediaIds;
55+
}
56+
57+
}

weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectExchangeReshipParam.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import java.util.List;
88

99
/**
10-
* 售后单同意信息
10+
* 售后单换货拒绝发货信息
1111
*
1212
* @author <a href="https://gitee.com/cchengg">Chu</a>
1313
*/

weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ public interface AfterSale {
236236
String AFTER_SALE_ACCEPT_EXCHANGE_RESHIP_URL = "https://api.weixin.qq.com/channels/ec/aftersale/acceptexchangereship";
237237
/** 换货拒绝发货*/
238238
String AFTER_SALE_REJECT_EXCHANGE_RESHIP_URL = "https://api.weixin.qq.com/channels/ec/aftersale/rejectexchangereship";
239+
/** 商家协商*/
240+
String AFTER_SALE_MERCHANT_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantupdateaftersale";
239241
}
240242

241243
/** 纠纷相关接口 */

0 commit comments

Comments
 (0)