|
1 | 1 | package me.chanjar.weixin.channel.api.impl;
|
2 | 2 |
|
3 |
| -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.AFTER_SALE_ACCEPT_URL; |
4 |
| -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.AFTER_SALE_GET_URL; |
5 |
| -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.AFTER_SALE_LIST_URL; |
6 |
| -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.AFTER_SALE_REJECT_URL; |
7 |
| -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.AFTER_SALE_UPLOAD_URL; |
8 |
| -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Complaint.ADD_COMPLAINT_MATERIAL_URL; |
9 |
| -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Complaint.ADD_COMPLAINT_PROOF_URL; |
10 |
| -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Complaint.GET_COMPLAINT_ORDER_URL; |
11 |
| - |
12 |
| -import java.util.List; |
13 | 3 | import lombok.extern.slf4j.Slf4j;
|
14 | 4 | import me.chanjar.weixin.channel.api.WxChannelAfterSaleService;
|
15 |
| -import me.chanjar.weixin.channel.bean.after.AfterSaleAcceptParam; |
16 |
| -import me.chanjar.weixin.channel.bean.after.AfterSaleIdParam; |
17 |
| -import me.chanjar.weixin.channel.bean.after.AfterSaleInfoResponse; |
18 |
| -import me.chanjar.weixin.channel.bean.after.AfterSaleListParam; |
19 |
| -import me.chanjar.weixin.channel.bean.after.AfterSaleListResponse; |
20 |
| -import me.chanjar.weixin.channel.bean.after.AfterSaleRejectParam; |
21 |
| -import me.chanjar.weixin.channel.bean.after.RefundEvidenceParam; |
| 5 | +import me.chanjar.weixin.channel.bean.after.*; |
22 | 6 | import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse;
|
23 | 7 | import me.chanjar.weixin.channel.bean.complaint.ComplaintOrderResponse;
|
24 | 8 | import me.chanjar.weixin.channel.bean.complaint.ComplaintParam;
|
25 | 9 | import me.chanjar.weixin.channel.util.ResponseUtils;
|
26 | 10 | import me.chanjar.weixin.common.error.WxErrorException;
|
27 | 11 |
|
| 12 | +import java.util.List; |
| 13 | + |
| 14 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.*; |
| 15 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Complaint.*; |
| 16 | + |
28 | 17 | /**
|
29 | 18 | * 视频号小店 售后服务实现
|
30 | 19 | *
|
@@ -56,15 +45,15 @@ public AfterSaleInfoResponse get(String afterSaleOrderId) throws WxErrorExceptio
|
56 | 45 | }
|
57 | 46 |
|
58 | 47 | @Override
|
59 |
| - public WxChannelBaseResponse accept(String afterSaleOrderId, String addressId) throws WxErrorException { |
60 |
| - AfterSaleAcceptParam param = new AfterSaleAcceptParam(afterSaleOrderId, addressId); |
| 48 | + public WxChannelBaseResponse accept(String afterSaleOrderId, String addressId, Integer acceptType) throws WxErrorException { |
| 49 | + AfterSaleAcceptParam param = new AfterSaleAcceptParam(afterSaleOrderId, addressId, acceptType); |
61 | 50 | String resJson = shopService.post(AFTER_SALE_ACCEPT_URL, param);
|
62 | 51 | return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
|
63 | 52 | }
|
64 | 53 |
|
65 | 54 | @Override
|
66 |
| - public WxChannelBaseResponse reject(String afterSaleOrderId, String rejectReason) throws WxErrorException { |
67 |
| - AfterSaleRejectParam param = new AfterSaleRejectParam(afterSaleOrderId, rejectReason); |
| 55 | + public WxChannelBaseResponse reject(String afterSaleOrderId, String rejectReason, Integer rejectReasonType) throws WxErrorException { |
| 56 | + AfterSaleRejectParam param = new AfterSaleRejectParam(afterSaleOrderId, rejectReason, rejectReasonType); |
68 | 57 | String resJson = shopService.post(AFTER_SALE_REJECT_URL, param);
|
69 | 58 | return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
|
70 | 59 | }
|
@@ -100,4 +89,16 @@ public ComplaintOrderResponse getComplaint(String complaintId) throws WxErrorExc
|
100 | 89 | String resJson = shopService.post(GET_COMPLAINT_ORDER_URL, reqJson);
|
101 | 90 | return ResponseUtils.decode(resJson, ComplaintOrderResponse.class);
|
102 | 91 | }
|
| 92 | + |
| 93 | + @Override |
| 94 | + public AfterSaleReasonResponse getAllReason() throws WxErrorException { |
| 95 | + String resJson = shopService.post(AFTER_SALE_REASON_GET_URL, "{}"); |
| 96 | + return ResponseUtils.decode(resJson, AfterSaleReasonResponse.class); |
| 97 | + } |
| 98 | + |
| 99 | + @Override |
| 100 | + public AfterSaleRejectReasonResponse getRejectReason() throws WxErrorException { |
| 101 | + String resJson = shopService.post(AFTER_SALE_REJECT_REASON_GET_URL, "{}"); |
| 102 | + return ResponseUtils.decode(resJson, AfterSaleRejectReasonResponse.class); |
| 103 | + } |
103 | 104 | }
|
0 commit comments