Skip to content

Commit fcde07c

Browse files
authored
补齐视频号售后缺失9个端点及参数模型
1 parent b94cfe0 commit fcde07c

14 files changed

Lines changed: 550 additions & 0 deletions

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

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,94 @@ WxChannelBaseResponse addComplaintEvidence(String complaintId, String content, L
183183
* @throws WxErrorException 异常
184184
*/
185185
WxChannelBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdateParam param) throws WxErrorException;
186+
187+
/**
188+
* 代用户发起售后
189+
*
190+
* @param param 参数
191+
* @return 发起结果
192+
*
193+
* @throws WxErrorException 异常
194+
*/
195+
AfterSaleCreateResponse genAfterSaleOrder(AfterSaleGenAfterSaleOrderParam param) throws WxErrorException;
196+
197+
/**
198+
* 代用户发起退差价
199+
*
200+
* @param param 参数
201+
* @return 发起结果
202+
*
203+
* @throws WxErrorException 异常
204+
*/
205+
AfterSaleCreateResponse refundPriceDiff(AfterSaleRefundPriceDiffParam param) throws WxErrorException;
206+
207+
/**
208+
* 售后单兑换虚拟号
209+
*
210+
* @param afterSaleOrderId 售后单号
211+
* @return 虚拟号信息
212+
*
213+
* @throws WxErrorException 异常
214+
*/
215+
AfterSaleVirtualTelNumResponse applyVirtualTelNum(String afterSaleOrderId) throws WxErrorException;
216+
217+
/**
218+
* 商家处理极速换货用户退货(同意/拒绝)
219+
*
220+
* @param param 参数
221+
* @return BaseResponse
222+
*
223+
* @throws WxErrorException 异常
224+
*/
225+
WxChannelBaseResponse handleFastExchangeReceipt(AfterSaleHandleFastExchangeReceiptParam param) throws WxErrorException;
226+
227+
/**
228+
* 获取保障单详情
229+
*
230+
* @param guaranteeOrderId 保障单号
231+
* @return 保障单详情
232+
*
233+
* @throws WxErrorException 异常
234+
*/
235+
GuaranteeOrderResponse getGuaranteeOrder(String guaranteeOrderId) throws WxErrorException;
236+
237+
/**
238+
* 商家同意保障单申请
239+
*
240+
* @param guaranteeOrderId 保障单号
241+
* @return BaseResponse
242+
*
243+
* @throws WxErrorException 异常
244+
*/
245+
WxChannelBaseResponse merchantAcceptGuarantee(String guaranteeOrderId) throws WxErrorException;
246+
247+
/**
248+
* 商家协商保障单
249+
*
250+
* @param param 参数
251+
* @return BaseResponse
252+
*
253+
* @throws WxErrorException 异常
254+
*/
255+
WxChannelBaseResponse merchantModifyGuarantee(GuaranteeMerchantModifyParam param) throws WxErrorException;
256+
257+
/**
258+
* 商家举证保障单
259+
*
260+
* @param param 参数
261+
* @return BaseResponse
262+
*
263+
* @throws WxErrorException 异常
264+
*/
265+
WxChannelBaseResponse merchantProofGuarantee(GuaranteeMerchantProofParam param) throws WxErrorException;
266+
267+
/**
268+
* 同步工单
269+
*
270+
* @param param 参数
271+
* @return BaseResponse
272+
*
273+
* @throws WxErrorException 异常
274+
*/
275+
WxChannelBaseResponse syncWorkOrder(SyncWorkOrderParam param) throws WxErrorException;
186276
}

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

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,61 @@ public WxChannelBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdatePara
130130
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
131131
}
132132

133+
@Override
134+
public AfterSaleCreateResponse genAfterSaleOrder(AfterSaleGenAfterSaleOrderParam param) throws WxErrorException {
135+
String resJson = shopService.post(AFTER_SALE_GEN_AFTER_SALE_ORDER_URL, param);
136+
return ResponseUtils.decode(resJson, AfterSaleCreateResponse.class);
137+
}
138+
139+
@Override
140+
public AfterSaleCreateResponse refundPriceDiff(AfterSaleRefundPriceDiffParam param) throws WxErrorException {
141+
String resJson = shopService.post(AFTER_SALE_REFUND_PRICE_DIFF_URL, param);
142+
return ResponseUtils.decode(resJson, AfterSaleCreateResponse.class);
143+
}
144+
145+
@Override
146+
public AfterSaleVirtualTelNumResponse applyVirtualTelNum(String afterSaleOrderId) throws WxErrorException {
147+
AfterSaleIdParam param = new AfterSaleIdParam(afterSaleOrderId);
148+
String resJson = shopService.post(AFTER_SALE_APPLY_VIRTUAL_TEL_NUM_URL, param);
149+
return ResponseUtils.decode(resJson, AfterSaleVirtualTelNumResponse.class);
150+
}
151+
152+
@Override
153+
public WxChannelBaseResponse handleFastExchangeReceipt(AfterSaleHandleFastExchangeReceiptParam param) throws WxErrorException {
154+
String resJson = shopService.post(AFTER_SALE_HANDLE_FAST_EXCHANGE_RECEIPT_URL, param);
155+
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
156+
}
157+
158+
@Override
159+
public GuaranteeOrderResponse getGuaranteeOrder(String guaranteeOrderId) throws WxErrorException {
160+
GuaranteeOrderIdParam param = new GuaranteeOrderIdParam(guaranteeOrderId);
161+
String resJson = shopService.post(AFTER_SALE_GET_GUARANTEE_ORDER_URL, param);
162+
return ResponseUtils.decode(resJson, GuaranteeOrderResponse.class);
163+
}
164+
165+
@Override
166+
public WxChannelBaseResponse merchantAcceptGuarantee(String guaranteeOrderId) throws WxErrorException {
167+
GuaranteeOrderIdParam param = new GuaranteeOrderIdParam(guaranteeOrderId);
168+
String resJson = shopService.post(AFTER_SALE_MERCHANT_ACCEPT_GUARANTEE_URL, param);
169+
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
170+
}
171+
172+
@Override
173+
public WxChannelBaseResponse merchantModifyGuarantee(GuaranteeMerchantModifyParam param) throws WxErrorException {
174+
String resJson = shopService.post(AFTER_SALE_MERCHANT_MODIFY_GUARANTEE_URL, param);
175+
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
176+
}
177+
178+
@Override
179+
public WxChannelBaseResponse merchantProofGuarantee(GuaranteeMerchantProofParam param) throws WxErrorException {
180+
String resJson = shopService.post(AFTER_SALE_MERCHANT_PROOF_GUARANTEE_URL, param);
181+
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
182+
}
183+
184+
@Override
185+
public WxChannelBaseResponse syncWorkOrder(SyncWorkOrderParam param) throws WxErrorException {
186+
String resJson = shopService.post(AFTER_SALE_SYNC_WORK_ORDER_URL, param);
187+
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
188+
}
189+
133190
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package me.chanjar.weixin.channel.bean.after;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import lombok.Data;
5+
import lombok.EqualsAndHashCode;
6+
import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse;
7+
8+
@Data
9+
@EqualsAndHashCode(callSuper = true)
10+
public class AfterSaleCreateResponse extends WxChannelBaseResponse {
11+
private static final long serialVersionUID = 2680676438284658410L;
12+
13+
@JsonProperty("aftersale_id")
14+
private String afterSaleId;
15+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
import lombok.EqualsAndHashCode;
7+
8+
@Data
9+
@EqualsAndHashCode(callSuper = true)
10+
@JsonInclude(JsonInclude.Include.NON_NULL)
11+
public class AfterSaleGenAfterSaleOrderParam extends AfterSaleRefundPriceDiffParam {
12+
private static final long serialVersionUID = -6873909673739068936L;
13+
14+
@JsonProperty("count")
15+
private Integer count;
16+
17+
@JsonProperty("type")
18+
private String type;
19+
20+
@JsonProperty("address_id")
21+
private String addressId;
22+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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 java.util.List;
6+
import lombok.Data;
7+
import lombok.EqualsAndHashCode;
8+
9+
@Data
10+
@EqualsAndHashCode(callSuper = true)
11+
@JsonInclude(JsonInclude.Include.NON_NULL)
12+
public class AfterSaleHandleFastExchangeReceiptParam extends AfterSaleIdParam {
13+
private static final long serialVersionUID = 5430106715116197677L;
14+
15+
@JsonProperty("act")
16+
private Integer act;
17+
18+
@JsonProperty("reject_reason")
19+
private String rejectReason;
20+
21+
@JsonProperty("reject_reason_type")
22+
private Integer rejectReasonType;
23+
24+
@JsonProperty("merchant_text")
25+
private String merchantText;
26+
27+
@JsonProperty("reject_confirm_exchange")
28+
private List<Object> rejectConfirmExchange;
29+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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 java.io.Serializable;
6+
import lombok.Data;
7+
8+
@Data
9+
@JsonInclude(JsonInclude.Include.NON_NULL)
10+
public class AfterSaleRefundPriceDiffParam implements Serializable {
11+
private static final long serialVersionUID = 3875058376021518123L;
12+
13+
@JsonProperty("request_id")
14+
private String requestId;
15+
16+
@JsonProperty("order_id")
17+
private String orderId;
18+
19+
@JsonProperty("product_id")
20+
private String productId;
21+
22+
@JsonProperty("sku_id")
23+
private String skuId;
24+
25+
@JsonProperty("amount")
26+
private Integer amount;
27+
28+
@JsonProperty("reason")
29+
private String reason;
30+
31+
@JsonProperty("desc")
32+
private String desc;
33+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package me.chanjar.weixin.channel.bean.after;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import lombok.Data;
5+
import lombok.EqualsAndHashCode;
6+
import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse;
7+
8+
@Data
9+
@EqualsAndHashCode(callSuper = true)
10+
public class AfterSaleVirtualTelNumResponse extends WxChannelBaseResponse {
11+
private static final long serialVersionUID = -2715343569103426942L;
12+
13+
@JsonProperty("virtual_tel_number")
14+
private String virtualTelNumber;
15+
16+
@JsonProperty("virtual_tel_expire_time")
17+
private Long virtualTelExpireTime;
18+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
import lombok.EqualsAndHashCode;
7+
8+
@Data
9+
@EqualsAndHashCode(callSuper = true)
10+
@JsonInclude(JsonInclude.Include.NON_NULL)
11+
public class GuaranteeMerchantModifyParam extends GuaranteeOrderIdParam {
12+
private static final long serialVersionUID = 9193536167701367687L;
13+
14+
@JsonProperty("bad_level")
15+
private Integer badLevel;
16+
17+
@JsonProperty("merchant_remark")
18+
private String merchantRemark;
19+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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 java.util.List;
6+
import lombok.Data;
7+
import lombok.EqualsAndHashCode;
8+
9+
@Data
10+
@EqualsAndHashCode(callSuper = true)
11+
@JsonInclude(JsonInclude.Include.NON_NULL)
12+
public class GuaranteeMerchantProofParam extends GuaranteeOrderIdParam {
13+
private static final long serialVersionUID = -2365495841866160967L;
14+
15+
@JsonProperty("content")
16+
private String content;
17+
18+
@JsonProperty("pic_list")
19+
private List<String> picList;
20+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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 java.io.Serializable;
6+
import lombok.AllArgsConstructor;
7+
import lombok.Data;
8+
import lombok.NoArgsConstructor;
9+
10+
@Data
11+
@NoArgsConstructor
12+
@AllArgsConstructor
13+
@JsonInclude(JsonInclude.Include.NON_NULL)
14+
public class GuaranteeOrderIdParam implements Serializable {
15+
private static final long serialVersionUID = 4325797703077757139L;
16+
17+
@JsonProperty("guarantee_order_id")
18+
private String guaranteeOrderId;
19+
}

0 commit comments

Comments
 (0)