Skip to content
Open
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 @@ -183,4 +183,94 @@ WxChannelBaseResponse addComplaintEvidence(String complaintId, String content, L
* @throws WxErrorException 异常
*/
WxChannelBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdateParam param) throws WxErrorException;

/**
* 代用户发起售后
*
* @param param 参数
* @return 发起结果
*
* @throws WxErrorException 异常
*/
AfterSaleCreateResponse genAfterSaleOrder(AfterSaleGenAfterSaleOrderParam param) throws WxErrorException;

/**
* 代用户发起退差价
*
* @param param 参数
* @return 发起结果
*
* @throws WxErrorException 异常
*/
AfterSaleCreateResponse refundPriceDiff(AfterSaleRefundPriceDiffParam param) throws WxErrorException;

/**
* 售后单兑换虚拟号
*
* @param afterSaleOrderId 售后单号
* @return 虚拟号信息
*
* @throws WxErrorException 异常
*/
AfterSaleVirtualTelNumResponse applyVirtualTelNum(String afterSaleOrderId) throws WxErrorException;

/**
* 商家处理极速换货用户退货(同意/拒绝)
*
* @param param 参数
* @return BaseResponse
*
* @throws WxErrorException 异常
*/
WxChannelBaseResponse handleFastExchangeReceipt(AfterSaleHandleFastExchangeReceiptParam param) throws WxErrorException;

/**
* 获取保障单详情
*
* @param guaranteeOrderId 保障单号
* @return 保障单详情
*
* @throws WxErrorException 异常
*/
GuaranteeOrderResponse getGuaranteeOrder(String guaranteeOrderId) throws WxErrorException;

/**
* 商家同意保障单申请
*
* @param guaranteeOrderId 保障单号
* @return BaseResponse
*
* @throws WxErrorException 异常
*/
WxChannelBaseResponse merchantAcceptGuarantee(String guaranteeOrderId) throws WxErrorException;

/**
* 商家协商保障单
*
* @param param 参数
* @return BaseResponse
*
* @throws WxErrorException 异常
*/
WxChannelBaseResponse merchantModifyGuarantee(GuaranteeMerchantModifyParam param) throws WxErrorException;

/**
* 商家举证保障单
*
* @param param 参数
* @return BaseResponse
*
* @throws WxErrorException 异常
*/
WxChannelBaseResponse merchantProofGuarantee(GuaranteeMerchantProofParam param) throws WxErrorException;

/**
* 同步工单
*
* @param param 参数
* @return BaseResponse
*
* @throws WxErrorException 异常
*/
WxChannelBaseResponse syncWorkOrder(SyncWorkOrderParam param) throws WxErrorException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,61 @@ public WxChannelBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdatePara
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
}

@Override
public AfterSaleCreateResponse genAfterSaleOrder(AfterSaleGenAfterSaleOrderParam param) throws WxErrorException {
String resJson = shopService.post(AFTER_SALE_GEN_AFTER_SALE_ORDER_URL, param);
return ResponseUtils.decode(resJson, AfterSaleCreateResponse.class);
}

@Override
public AfterSaleCreateResponse refundPriceDiff(AfterSaleRefundPriceDiffParam param) throws WxErrorException {
String resJson = shopService.post(AFTER_SALE_REFUND_PRICE_DIFF_URL, param);
return ResponseUtils.decode(resJson, AfterSaleCreateResponse.class);
}

@Override
public AfterSaleVirtualTelNumResponse applyVirtualTelNum(String afterSaleOrderId) throws WxErrorException {
AfterSaleIdParam param = new AfterSaleIdParam(afterSaleOrderId);
String resJson = shopService.post(AFTER_SALE_APPLY_VIRTUAL_TEL_NUM_URL, param);
return ResponseUtils.decode(resJson, AfterSaleVirtualTelNumResponse.class);
}

@Override
public WxChannelBaseResponse handleFastExchangeReceipt(AfterSaleHandleFastExchangeReceiptParam param) throws WxErrorException {
String resJson = shopService.post(AFTER_SALE_HANDLE_FAST_EXCHANGE_RECEIPT_URL, param);
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
}

@Override
public GuaranteeOrderResponse getGuaranteeOrder(String guaranteeOrderId) throws WxErrorException {
GuaranteeOrderIdParam param = new GuaranteeOrderIdParam(guaranteeOrderId);
String resJson = shopService.post(AFTER_SALE_GET_GUARANTEE_ORDER_URL, param);
return ResponseUtils.decode(resJson, GuaranteeOrderResponse.class);
}

@Override
public WxChannelBaseResponse merchantAcceptGuarantee(String guaranteeOrderId) throws WxErrorException {
GuaranteeOrderIdParam param = new GuaranteeOrderIdParam(guaranteeOrderId);
String resJson = shopService.post(AFTER_SALE_MERCHANT_ACCEPT_GUARANTEE_URL, param);
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
}

@Override
public WxChannelBaseResponse merchantModifyGuarantee(GuaranteeMerchantModifyParam param) throws WxErrorException {
String resJson = shopService.post(AFTER_SALE_MERCHANT_MODIFY_GUARANTEE_URL, param);
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
}

@Override
public WxChannelBaseResponse merchantProofGuarantee(GuaranteeMerchantProofParam param) throws WxErrorException {
String resJson = shopService.post(AFTER_SALE_MERCHANT_PROOF_GUARANTEE_URL, param);
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
}

@Override
public WxChannelBaseResponse syncWorkOrder(SyncWorkOrderParam param) throws WxErrorException {
String resJson = shopService.post(AFTER_SALE_SYNC_WORK_ORDER_URL, param);
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package me.chanjar.weixin.channel.bean.after;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse;

@Data
@EqualsAndHashCode(callSuper = true)
public class AfterSaleCreateResponse extends WxChannelBaseResponse {
private static final long serialVersionUID = 2680676438284658410L;

@JsonProperty("aftersale_id")

@augmentcode augmentcode Bot Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AfterSaleCreateResponse maps the returned id as @JsonProperty("aftersale_id"), but the official response examples for genaftersaleorder/refundpricediff show after_sale_order_id; if the API actually returns after_sale_order_id, afterSaleId will always deserialize as null.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Map the created after-sale order id

When genAfterSaleOrder or refundPriceDiff succeeds against the current /channels/ec/aftersale API family, the created售后单号 is returned with the same after_sale_order_id name used by the rest of this service's after-sale models, not the legacy aftersale_id spelling. With only this mapping, AfterSaleCreateResponse#getAfterSaleId() stays null on successful creation/refund-price-difference calls, so callers cannot read the id they need for follow-up operations like get/accept/reject.

Useful? React with 👍 / 👎.

private String afterSaleId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package me.chanjar.weixin.channel.bean.after;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AfterSaleGenAfterSaleOrderParam extends AfterSaleRefundPriceDiffParam {

@augmentcode augmentcode Bot Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AfterSaleGenAfterSaleOrderParam currently lacks the exchange_sku_info payload (e.g., new_sku_id) that the official docs require when type=EXCHANGE, so callers can’t represent that request shape via the SDK.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

private static final long serialVersionUID = -6873909673739068936L;

@JsonProperty("count")
private Integer count;

@JsonProperty("type")
private String type;

@JsonProperty("address_id")
private String addressId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package me.chanjar.weixin.channel.bean.after;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AfterSaleHandleFastExchangeReceiptParam extends AfterSaleIdParam {
private static final long serialVersionUID = 5430106715116197677L;

@JsonProperty("act")
private Integer act;

@JsonProperty("reject_reason")
private String rejectReason;

@JsonProperty("reject_reason_type")
private Integer rejectReasonType;

@JsonProperty("merchant_text")
private String merchantText;

@JsonProperty("reject_confirm_exchange")
private List<Object> rejectConfirmExchange;
Comment on lines +27 to +28

@augmentcode augmentcode Bot Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reject_confirm_exchange is documented as an array of media_id strings, but the model uses List<Object>; this weak typing makes it easy to send non-string elements and drift from the documented request contract.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package me.chanjar.weixin.channel.bean.after;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AfterSaleRefundPriceDiffParam implements Serializable {
private static final long serialVersionUID = 3875058376021518123L;

@JsonProperty("request_id")
private String requestId;

@JsonProperty("order_id")
private String orderId;

@JsonProperty("product_id")
private String productId;

@JsonProperty("sku_id")
private String skuId;

@JsonProperty("amount")
private Integer amount;

@JsonProperty("reason")
private String reason;

@JsonProperty("desc")
private String desc;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package me.chanjar.weixin.channel.bean.after;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse;

@Data
@EqualsAndHashCode(callSuper = true)
public class AfterSaleVirtualTelNumResponse extends WxChannelBaseResponse {
private static final long serialVersionUID = -2715343569103426942L;

@JsonProperty("virtual_tel_number")
private String virtualTelNumber;

@JsonProperty("virtual_tel_expire_time")
private Long virtualTelExpireTime;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package me.chanjar.weixin.channel.bean.after;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GuaranteeMerchantModifyParam extends GuaranteeOrderIdParam {
private static final long serialVersionUID = 9193536167701367687L;

@JsonProperty("bad_level")
private Integer badLevel;

@JsonProperty("merchant_remark")
private String merchantRemark;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package me.chanjar.weixin.channel.bean.after;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GuaranteeMerchantProofParam extends GuaranteeOrderIdParam {
private static final long serialVersionUID = -2365495841866160967L;

@JsonProperty("content")
private String content;

@JsonProperty("pic_list")
private List<String> picList;
Comment on lines +15 to +19

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Nest guarantee proof evidence under proof_info

For merchant proof submissions that include text or images, the endpoint expects the evidence nested under proof_info using fields such as text and image_ids, but this DTO sends top-level content and pic_list. After a valid guarantee id is supplied, the proof payload is still in the wrong shape and will be rejected or ignored by the API.

Useful? React with 👍 / 👎.

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package me.chanjar.weixin.channel.bean.after;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GuaranteeOrderIdParam implements Serializable {
private static final long serialVersionUID = 4325797703077757139L;

@JsonProperty("guarantee_order_id")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Serialize the guarantee id as guarantee_id

The guarantee APIs expect the request field to be guarantee_id, but this shared DTO emits guarantee_order_id. Because getGuaranteeOrder, merchantAcceptGuarantee, merchantModifyGuarantee, and merchantProofGuarantee all inherit this field, callers who pass a valid guarantee id still send it under the wrong key and the API treats the required id as missing.

Useful? React with 👍 / 👎.

private String guaranteeOrderId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package me.chanjar.weixin.channel.bean.after;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse;

@Data
@EqualsAndHashCode(callSuper = true)
public class GuaranteeOrderResponse extends WxChannelBaseResponse {
private static final long serialVersionUID = 3977781489692530604L;

@JsonProperty("guarantee_order")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Decode guarantee details from guarantee_info

For successful guarantee detail responses, the body field is guarantee_info, but this response DTO only looks for guarantee_order. Once the request id serialization is fixed, getGuaranteeOrder() can return errcode=0 while getGuaranteeOrder()'s payload remains null, dropping the details callers requested.

Useful? React with 👍 / 👎.

private JsonNode guaranteeOrder;
Comment on lines +14 to +15
}
Loading