feat(channel): 新增售后保障单模块 6 个 API 支持#4035
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c17974d1c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @JsonProperty("guarantee_order_id") | ||
| private String guaranteeOrderId; |
There was a problem hiding this comment.
Serialize the guarantee id as guarantee_id
The guarantee APIs expect the request field to be guarantee_id, not guarantee_order_id; because all detail/action DTOs inherit this field, calls to get/accept/modify/proof/refuse a guarantee send the id under the wrong key and are treated as missing the required guarantee id even when the caller passes a valid value.
Useful? React with 👍 / 👎.
| @JsonProperty("guarantee_order") | ||
| private GuaranteeOrderInfo guaranteeOrder; |
There was a problem hiding this comment.
| /** 保障单号列表. */ | ||
| @JsonProperty("guarantee_order_id_list") | ||
| private List<String> guaranteeOrderIdList; |
There was a problem hiding this comment.
Decode the returned guarantee list
The search-guarantee endpoint returns a guarantee_list array of guarantee objects, not guarantee_order_id_list; with this mapping, successful list responses expose no guarantees to callers, so pagination can succeed while the actual results are silently dropped.
Useful? React with 👍 / 👎.
| /** 举证图片media_id列表. */ | ||
| @JsonProperty("media_ids") | ||
| private List<String> mediaIds; | ||
|
|
||
| /** 举证描述. */ | ||
| @JsonProperty("desc") | ||
| private String desc; |
There was a problem hiding this comment.
Nest proof evidence under proof_info
The proof endpoint expects evidence as a proof_info object with text and image_ids, but this request sends top-level media_ids and desc; merchant proof submissions with images or text will arrive in the wrong shape and be rejected or ignored by the API.
Useful? React with 👍 / 👎.
为补齐微信小店售后能力,本 PR 在
WxChannelAfterSaleService中新增保障单管理接口,覆盖保障单查询、详情、同意、协商、举证、拒绝全流程。实现与官方保障单 API 路径一一对应,保持现有售后模块风格一致。接口层扩展(Service)
WxChannelAfterSaleService新增 6 个方法:listGuaranteeOrder(GuaranteeOrderListParam)getGuaranteeOrder(String guaranteeOrderId)acceptGuarantee(String guaranteeOrderId)modifyGuarantee(GuaranteeModifyRequest)proofGuarantee(GuaranteeProofRequest)refuseGuarantee(String guaranteeOrderId, String reason)实现层补齐(ServiceImpl)
WxChannelAfterSaleServiceImpl增加对应实现,统一复用现有shopService.post(...)+ResponseUtils.decode(...)模式。API 常量新增
WxChannelApiUrlConstants.AfterSale增加 6 个保障单 URL 常量:/channels/ec/aftersale/searchguaranteeorder/channels/ec/aftersale/getguaranteeorder/channels/ec/aftersale/merchantacceptguarantee/channels/ec/aftersale/merchantmodifyguarantee/channels/ec/aftersale/merchantproofguarantee/channels/ec/aftersale/merchantrefuseguarantee数据模型新增(after 包)
GuaranteeOrderListParam、GuaranteeOrderIdParam、GuaranteeModifyRequest、GuaranteeProofRequest、GuaranteeRefuseRequestGuaranteeOrderListResponse、GuaranteeOrderInfoResponse、GuaranteeOrderInfo单元测试补充
WxChannelAfterSaleServiceImplTest新增保障单相关 6 个测试方法,覆盖新增服务方法调用入口。示例(新增接口调用):