Skip to content

feat: 补齐视频号售后服务端点 - #4103

Open
binarywang wants to merge 4 commits into
developfrom
feature/4003-channel-aftersale
Open

feat: 补齐视频号售后服务端点#4103
binarywang wants to merge 4 commits into
developfrom
feature/4003-channel-aftersale

Conversation

@binarywang

Copy link
Copy Markdown
Owner

概要

补齐 WxChannelAfterSaleService 缺失的 9 个微信小店售后端点,并提供请求/响应模型与调用实现。

改进

  • 修正售后单创建返回字段为 after_sale_order_id
  • 使用 guarantee_idguarantee_infoproof_info 的正确结构。
  • 为换货 SKU、保障单举证、保障单响应和媒体 ID 列表提供类型化模型,移除弱类型 ObjectJsonNode
  • 添加离线 JSON 契约测试,覆盖关键请求与响应字段。

Closes #4003

@augmentcode

augmentcode Bot commented Aug 22, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

摘要:本 PR 为微信小店售后服务补齐九个服务端 API 端点。

变更:

  • WxChannelAfterSaleService 中新增代发起售后、退差价、虚拟号、极速换货、保障单和工单同步方法。
  • 在服务实现中为新增能力配置对应 URL 并统一通过 shopService.post 调用。
  • 新增创建售后、虚拟号码及保障单详情的响应模型。
  • 新增代发起售后、退差价、极速换货、保障单操作和同步工单的请求模型。
  • 为换货 SKU、工单媒体和举证材料引入类型化嵌套对象。
  • 补充保障单和售后字段的 Jackson 映射。
  • 扩展现有售后服务测试,覆盖新增服务方法的调用路径。
  • 新增离线 JSON 契约测试,校验部分请求字段与响应字段。
技术说明:
  • 请求与响应模型使用 @JsonProperty 对接微信下划线字段。
  • 可选字段使用 NON_NULL 序列化策略,维持既有 SDK Bean 风格。
  • 本次重点涉及售后及保障单 API 的传输契约准确性。

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

存在与 PR 目标无关的 .gitignore 改动且新增保障单相关方法参数命名与实际请求字段语义不一致,建议先修正以避免引入噪音与 API 使用歧义。

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

该 PR 针对 weixin-java-channel 模块补齐 WxChannelAfterSaleService 中缺失的微信小店售后/保障单相关能力,新增对应的请求/响应模型、URL 常量与 Service 调用实现,并补充离线 JSON 契约测试与现有 ServiceImpl 测试用例覆盖新增端点。

Changes:

  • WxChannelAfterSaleService / WxChannelAfterSaleServiceImpl 中新增 9 个售后/保障单端点方法实现,并在 WxChannelApiUrlConstants.AfterSale 中补齐对应 URL 常量
  • 新增/类型化多个请求与响应模型(如 AfterSaleCreateResponseGuarantee*SyncWorkOrderParam 等),并新增离线 JSON 契约测试 AfterSaleContractTest
  • 扩展 WxChannelAfterSaleServiceImplTest 覆盖新增端点的调用入口

**验证说明:**本次评审未在本环境执行 Maven 构建/测试(仓库测试通常依赖外部微信凭据)。

File summaries
File Description
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/after/AfterSaleContractTest.java 新增离线 JSON 契约测试,校验关键字段序列化/反序列化的字段名契约
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplTest.java 增加对新增售后/保障单端点的调用测试用例
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java 在 AfterSale 常量区补齐 9 个新端点 URL 常量
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/SyncWorkOrderParam.java 新增同步工单请求模型(含嵌套结构)
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofInfo.java 新增保障单举证信息模型
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderResponse.java 新增获取保障单详情响应模型
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantProofParam.java 新增商家举证保障单请求模型
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantModifyParam.java 新增商家协商保障单请求模型
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeInfo.java 新增保障单信息基础模型(guarantee_info/guarantee_id)
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeIdParam.java 新增保障单 id 请求参数模型(guarantee_id)
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ExchangeSkuInfo.java 新增换货 SKU 信息模型(exchange_sku_info/new_sku_id)
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualTelNumResponse.java 新增售后单兑换虚拟号响应模型
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRefundPriceDiffParam.java 新增代用户退差价请求模型
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleHandleFastExchangeReceiptParam.java 新增极速换货处理请求模型
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleGenAfterSaleOrderParam.java 新增代用户发起售后请求模型(继承退差价参数并扩展字段)
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleCreateResponse.java 新增售后创建类响应模型(after_sale_order_id)
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java 在售后 Service 接口中新增 9 个端点方法声明与 Javadoc
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImpl.java 在售后 Service 实现中补齐 9 个端点的 post 调用与响应解码
.gitignore 新增忽略 /docs/superpowers/ 条目
Review details

Suppressed comments (1)

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

  • merchantAcceptGuarantee 的参数名使用 guaranteeOrderId,但实现里实际封装为 GuaranteeIdParam(guarantee_id)。建议将该参数(及实现中的同名参数)统一为 guaranteeId,减少与“保障单号/订单号”概念混淆,并保持与请求字段含义一致。
  WxChannelBaseResponse merchantAcceptGuarantee(String guaranteeOrderId) throws WxErrorException;
  • Files reviewed: 18/19 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e2bb6f500

ℹ️ 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[weixin-java-channel] WxChannelAfterSaleService 缺失代客售后/保障单等9个端点

3 participants