From 383881f5f1c4b5a859176a6ff9a4e2fdf6882272 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 31 May 2026 14:20:54 +0000 Subject: [PATCH 1/2] Initial plan From 1c17974d1ce2cd7ead46c4fe6187740bf5c9686f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 31 May 2026 14:33:32 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=8F=B7=E5=B0=8F=E5=BA=97=E4=BF=9D=E9=9A=9C=E5=8D=95=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E6=8E=A5=E5=8F=A3=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/WxChannelAfterSaleService.java | 63 +++++++++++++++++++ .../impl/WxChannelAfterSaleServiceImpl.java | 36 +++++++++++ .../bean/after/GuaranteeModifyRequest.java | 34 ++++++++++ .../bean/after/GuaranteeOrderIdParam.java | 25 ++++++++ .../bean/after/GuaranteeOrderInfo.java | 56 +++++++++++++++++ .../after/GuaranteeOrderInfoResponse.java | 22 +++++++ .../bean/after/GuaranteeOrderListParam.java | 41 ++++++++++++ .../after/GuaranteeOrderListResponse.java | 31 +++++++++ .../bean/after/GuaranteeProofRequest.java | 35 +++++++++++ .../bean/after/GuaranteeRefuseRequest.java | 29 +++++++++ .../constant/WxChannelApiUrlConstants.java | 12 ++++ .../WxChannelAfterSaleServiceImplTest.java | 51 +++++++++++++++ 12 files changed, 435 insertions(+) create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfo.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java index 85c945d428..cb73ef1a36 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java @@ -183,4 +183,67 @@ WxChannelBaseResponse addComplaintEvidence(String complaintId, String content, L * @throws WxErrorException 异常 */ WxChannelBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdateParam param) throws WxErrorException; + + /** + * 商家获取保障单列表 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_searchguaranteeorder + * + * @param param 参数 + * @return 保障单列表 + * + * @throws WxErrorException 异常 + */ + GuaranteeOrderListResponse listGuaranteeOrder(GuaranteeOrderListParam param) throws WxErrorException; + + /** + * 获取保障单详情 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_getguaranteeorder + * + * @param guaranteeOrderId 保障单号 + * @return 保障单详情 + * + * @throws WxErrorException 异常 + */ + GuaranteeOrderInfo getGuaranteeOrder(String guaranteeOrderId) throws WxErrorException; + + /** + * 商家同意保障单申请 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantacceptguarantee + * + * @param guaranteeOrderId 保障单号 + * + * @throws WxErrorException 异常 + */ + void acceptGuarantee(String guaranteeOrderId) throws WxErrorException; + + /** + * 商家协商保障单 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantmodifyguarantee + * + * @param req 参数 + * + * @throws WxErrorException 异常 + */ + void modifyGuarantee(GuaranteeModifyRequest req) throws WxErrorException; + + /** + * 商家举证保障单 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantproofguarantee + * + * @param req 参数 + * + * @throws WxErrorException 异常 + */ + void proofGuarantee(GuaranteeProofRequest req) throws WxErrorException; + + /** + * 商家拒绝保障单申请 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantrefuseguarantee + * + * @param guaranteeOrderId 保障单号 + * @param reason 拒绝原因 + * + * @throws WxErrorException 异常 + */ + void refuseGuarantee(String guaranteeOrderId, String reason) throws WxErrorException; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImpl.java index 92f865444b..94026be4c1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImpl.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImpl.java @@ -130,4 +130,40 @@ public WxChannelBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdatePara return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } + @Override + public GuaranteeOrderListResponse listGuaranteeOrder(GuaranteeOrderListParam param) throws WxErrorException { + String resJson = shopService.post(GUARANTEE_ORDER_LIST_URL, param); + return ResponseUtils.decode(resJson, GuaranteeOrderListResponse.class); + } + + @Override + public GuaranteeOrderInfo getGuaranteeOrder(String guaranteeOrderId) throws WxErrorException { + GuaranteeOrderIdParam param = new GuaranteeOrderIdParam(guaranteeOrderId); + String resJson = shopService.post(GUARANTEE_ORDER_GET_URL, param); + GuaranteeOrderInfoResponse response = ResponseUtils.decode(resJson, GuaranteeOrderInfoResponse.class); + return response.getGuaranteeOrder(); + } + + @Override + public void acceptGuarantee(String guaranteeOrderId) throws WxErrorException { + GuaranteeOrderIdParam param = new GuaranteeOrderIdParam(guaranteeOrderId); + shopService.post(GUARANTEE_ORDER_ACCEPT_URL, param); + } + + @Override + public void modifyGuarantee(GuaranteeModifyRequest req) throws WxErrorException { + shopService.post(GUARANTEE_ORDER_MODIFY_URL, req); + } + + @Override + public void proofGuarantee(GuaranteeProofRequest req) throws WxErrorException { + shopService.post(GUARANTEE_ORDER_PROOF_URL, req); + } + + @Override + public void refuseGuarantee(String guaranteeOrderId, String reason) throws WxErrorException { + GuaranteeRefuseRequest req = new GuaranteeRefuseRequest(guaranteeOrderId, reason); + shopService.post(GUARANTEE_ORDER_REFUSE_URL, req); + } + } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java new file mode 100644 index 0000000000..228755f269 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java @@ -0,0 +1,34 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 商家协商保障单请求参数. + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class GuaranteeModifyRequest extends GuaranteeOrderIdParam { + + private static final long serialVersionUID = -7142671437465099549L; + + /** 协商金额(单位:分). */ + @JsonProperty("amount") + private Integer amount; + + /** 协商描述. */ + @JsonProperty("desc") + private String desc; + + public GuaranteeModifyRequest(String guaranteeOrderId, Integer amount, String desc) { + super(guaranteeOrderId); + this.amount = amount; + this.desc = desc; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java new file mode 100644 index 0000000000..af823783c8 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java @@ -0,0 +1,25 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 保障单id参数. + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class GuaranteeOrderIdParam implements Serializable { + + private static final long serialVersionUID = 773665483877442194L; + + /** 保障单号. */ + @JsonProperty("guarantee_order_id") + private String guaranteeOrderId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfo.java new file mode 100644 index 0000000000..b641eeb974 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfo.java @@ -0,0 +1,56 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 保障单信息. + */ +@Data +@NoArgsConstructor +public class GuaranteeOrderInfo implements Serializable { + + private static final long serialVersionUID = -2590210285444450666L; + + /** 保障单号. */ + @JsonProperty("guarantee_order_id") + private String guaranteeOrderId; + + /** 订单号. */ + @JsonProperty("order_id") + private String orderId; + + /** 保障单状态. */ + @JsonProperty("status") + private Integer status; + + /** 保障单类型. */ + @JsonProperty("type") + private Integer type; + + /** 申请原因. */ + @JsonProperty("reason") + private String reason; + + /** 创建时间. */ + @JsonProperty("create_time") + private Long createTime; + + /** 更新时间. */ + @JsonProperty("update_time") + private Long updateTime; + + /** 买家openid. */ + @JsonProperty("openid") + private String openid; + + /** 买家unionid. */ + @JsonProperty("unionid") + private String unionid; + + /** 商品信息. */ + @JsonProperty("product_info") + private AfterSaleProductInfo productInfo; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java new file mode 100644 index 0000000000..fde4365029 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java @@ -0,0 +1,22 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** + * 保障单详情响应. + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GuaranteeOrderInfoResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = 7532731716811792648L; + + /** 保障单详情. */ + @JsonProperty("guarantee_order") + private GuaranteeOrderInfo guaranteeOrder; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java new file mode 100644 index 0000000000..0d1a8db596 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java @@ -0,0 +1,41 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 保障单列表请求参数. + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class GuaranteeOrderListParam implements Serializable { + + private static final long serialVersionUID = -8822052330671632588L; + + /** 订单创建启始时间 unix时间戳. */ + @JsonProperty("begin_create_time") + private Long beginCreateTime; + + /** 订单创建结束时间,end_create_time减去begin_create_time不得大于24小时 unix时间戳. */ + @JsonProperty("end_create_time") + private Long endCreateTime; + + /** 保障单更新起始时间. */ + @JsonProperty("begin_update_time") + private Long beginUpdateTime; + + /** 保障单更新结束时间,end_update_time减去begin_update_time不得大于24小时. */ + @JsonProperty("end_update_time") + private Long endUpdateTime; + + /** 翻页参数,从第二页开始传,来源于上一页的返回值. */ + @JsonProperty("next_key") + private String nextKey; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java new file mode 100644 index 0000000000..c34654c57b --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java @@ -0,0 +1,31 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** + * 保障单列表响应. + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GuaranteeOrderListResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = -6136894046806166855L; + + /** 保障单号列表. */ + @JsonProperty("guarantee_order_id_list") + private List guaranteeOrderIdList; + + /** 翻页参数. */ + @JsonProperty("next_key") + private String nextKey; + + /** 是否还有数据. */ + @JsonProperty("has_more") + private Boolean hasMore; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java new file mode 100644 index 0000000000..ead3cac403 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java @@ -0,0 +1,35 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 商家举证保障单请求参数. + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class GuaranteeProofRequest extends GuaranteeOrderIdParam { + + private static final long serialVersionUID = -4521077589624343197L; + + /** 举证图片media_id列表. */ + @JsonProperty("media_ids") + private List mediaIds; + + /** 举证描述. */ + @JsonProperty("desc") + private String desc; + + public GuaranteeProofRequest(String guaranteeOrderId, List mediaIds, String desc) { + super(guaranteeOrderId); + this.mediaIds = mediaIds; + this.desc = desc; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java new file mode 100644 index 0000000000..003c63cf7c --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java @@ -0,0 +1,29 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 商家拒绝保障单请求参数. + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class GuaranteeRefuseRequest extends GuaranteeOrderIdParam { + + private static final long serialVersionUID = 6632720364917208597L; + + /** 拒绝原因. */ + @JsonProperty("reason") + private String reason; + + public GuaranteeRefuseRequest(String guaranteeOrderId, String reason) { + super(guaranteeOrderId); + this.reason = reason; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java index 6c2076d85b..36100213f0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java @@ -240,6 +240,18 @@ public interface AfterSale { String AFTER_SALE_REJECT_EXCHANGE_RESHIP_URL = "https://api.weixin.qq.com/channels/ec/aftersale/rejectexchangereship"; /** 商家协商*/ String AFTER_SALE_MERCHANT_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantupdateaftersale"; + /** 商家获取保障单列表 */ + String GUARANTEE_ORDER_LIST_URL = "https://api.weixin.qq.com/channels/ec/aftersale/searchguaranteeorder"; + /** 获取保障单详情 */ + String GUARANTEE_ORDER_GET_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getguaranteeorder"; + /** 商家同意保障单申请 */ + String GUARANTEE_ORDER_ACCEPT_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantacceptguarantee"; + /** 商家协商保障单 */ + String GUARANTEE_ORDER_MODIFY_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantmodifyguarantee"; + /** 商家举证保障单 */ + String GUARANTEE_ORDER_PROOF_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantproofguarantee"; + /** 商家拒绝保障单申请 */ + String GUARANTEE_ORDER_REFUSE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantrefuseguarantee"; } /** 纠纷相关接口 */ diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplTest.java index 81122f7a03..85f9ecfad8 100644 --- a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplTest.java +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplTest.java @@ -14,6 +14,11 @@ import me.chanjar.weixin.channel.bean.after.AfterSaleListResponse; import me.chanjar.weixin.channel.bean.after.AfterSaleReasonResponse; import me.chanjar.weixin.channel.bean.after.AfterSaleRejectReasonResponse; +import me.chanjar.weixin.channel.bean.after.GuaranteeModifyRequest; +import me.chanjar.weixin.channel.bean.after.GuaranteeOrderInfo; +import me.chanjar.weixin.channel.bean.after.GuaranteeOrderListParam; +import me.chanjar.weixin.channel.bean.after.GuaranteeOrderListResponse; +import me.chanjar.weixin.channel.bean.after.GuaranteeProofRequest; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.complaint.ComplaintOrderResponse; import me.chanjar.weixin.channel.test.ApiTestModule; @@ -128,4 +133,50 @@ public void testGetRejectReason() throws WxErrorException { assertNotNull(rejectReason); assertTrue(rejectReason.isSuccess()); } + + @Test + public void testListGuaranteeOrder() throws WxErrorException { + WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); + Long beginCreateTime = LocalDateTime.now().minusDays(7).atZone(ZoneId.systemDefault()).toEpochSecond(); + Long endCreateTime = LocalDateTime.now().atZone(ZoneId.systemDefault()).toEpochSecond(); + GuaranteeOrderListParam param = new GuaranteeOrderListParam(beginCreateTime, endCreateTime, null, null, null); + GuaranteeOrderListResponse response = afterSaleService.listGuaranteeOrder(param); + assertNotNull(response); + assertTrue(response.isSuccess()); + } + + @Test + public void testGetGuaranteeOrder() throws WxErrorException { + WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); + String guaranteeOrderId = ""; + GuaranteeOrderInfo response = afterSaleService.getGuaranteeOrder(guaranteeOrderId); + assertNotNull(response); + } + + @Test + public void testAcceptGuarantee() throws WxErrorException { + WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); + String guaranteeOrderId = ""; + afterSaleService.acceptGuarantee(guaranteeOrderId); + } + + @Test + public void testModifyGuarantee() throws WxErrorException { + WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); + GuaranteeModifyRequest req = new GuaranteeModifyRequest("", 1, "协商描述"); + afterSaleService.modifyGuarantee(req); + } + + @Test + public void testProofGuarantee() throws WxErrorException { + WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); + GuaranteeProofRequest req = new GuaranteeProofRequest("", new ArrayList<>(4), "举证描述"); + afterSaleService.proofGuarantee(req); + } + + @Test + public void testRefuseGuarantee() throws WxErrorException { + WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); + afterSaleService.refuseGuarantee("", "拒绝原因"); + } }