Skip to content

feat(channel): 新增售后保障单模块 6 个 API 支持#4035

Open
Copilot wants to merge 2 commits into
developfrom
copilot/feature-add-guarantee-order-module
Open

feat(channel): 新增售后保障单模块 6 个 API 支持#4035
Copilot wants to merge 2 commits into
developfrom
copilot/feature-add-guarantee-order-module

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 31, 2026

为补齐微信小店售后能力,本 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 包)

    • 请求模型:GuaranteeOrderListParamGuaranteeOrderIdParamGuaranteeModifyRequestGuaranteeProofRequestGuaranteeRefuseRequest
    • 响应模型:GuaranteeOrderListResponseGuaranteeOrderInfoResponseGuaranteeOrderInfo
  • 单元测试补充

    • WxChannelAfterSaleServiceImplTest 新增保障单相关 6 个测试方法,覆盖新增服务方法调用入口。

示例(新增接口调用):

GuaranteeOrderListResponse list = afterSaleService.listGuaranteeOrder(
  new GuaranteeOrderListParam(beginCreateTime, endCreateTime, null, null, null)
);

GuaranteeOrderInfo detail = afterSaleService.getGuaranteeOrder(guaranteeOrderId);

afterSaleService.acceptGuarantee(guaranteeOrderId);
afterSaleService.modifyGuarantee(new GuaranteeModifyRequest(guaranteeOrderId, 100, "协商说明"));
afterSaleService.proofGuarantee(new GuaranteeProofRequest(guaranteeOrderId, mediaIds, "举证说明"));
afterSaleService.refuseGuarantee(guaranteeOrderId, "拒绝原因");

Copilot AI linked an issue May 31, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add guarantee order module support feat(channel): 新增售后保障单模块 6 个 API 支持 May 31, 2026
Copilot AI requested a review from binarywang May 31, 2026 14:34
@binarywang binarywang marked this pull request as ready for review May 31, 2026 14:38
Copilot AI review requested due to automatic review settings May 31, 2026 14:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

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

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: 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".

Comment on lines +23 to +24
@JsonProperty("guarantee_order_id")
private String guaranteeOrderId;
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, 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 👍 / 👎.

Comment on lines +20 to +21
@JsonProperty("guarantee_order")
private GuaranteeOrderInfo guaranteeOrder;
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

The get-guarantee response body uses guarantee_info, but this response DTO looks for guarantee_order; after a successful API call getGuaranteeOrder() therefore returns null because Jackson never populates the field.

Useful? React with 👍 / 👎.

Comment on lines +20 to +22
/** 保障单号列表. */
@JsonProperty("guarantee_order_id_list")
private List<String> guaranteeOrderIdList;
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 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 👍 / 👎.

Comment on lines +22 to +28
/** 举证图片media_id列表. */
@JsonProperty("media_ids")
private List<String> mediaIds;

/** 举证描述. */
@JsonProperty("desc")
private String desc;
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 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 👍 / 👎.

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.

[Feature] 新增保障单模块支持

3 participants