Skip to content

feat(channel): 新增微信小店质检管理(QIC)5个官方接口支持#4039

Merged
binarywang merged 3 commits into
developfrom
copilot/feature-add-quality-inspection-module
Jul 11, 2026
Merged

feat(channel): 新增微信小店质检管理(QIC)5个官方接口支持#4039
binarywang merged 3 commits into
developfrom
copilot/feature-add-quality-inspection-module

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor

当前 weixin-java-channel 缺少质检管理能力,无法覆盖珠宝/奢侈品等需送检场景。该 PR 按微信官方 QIC 文档补齐 5 个接口,并将能力接入 WxChannelService 主服务入口。

  • 接口层:新增质检服务抽象与入口接入

    • 新增 WxChannelQicService,提供以下能力:
      • 查询质检仓配置 getInspectConfig()
      • 查询送检配置模板 getSubmitConfig(String orderId) / getSubmitConfig()
      • 打印质检码 printInspectCode(String orderId)
      • 绑定送检信息 submitInspectInfo(SubmitInspectRequest)
      • 自寄快递送检 registerLogistics(RegisterLogisticsRequest)
    • WxChannelService 增加 getQicService(),并在 BaseWxChannelServiceImpl 中完成懒加载注入。
  • 实现层:新增 QIC 服务实现与官方路径常量

    • 新增 WxChannelQicServiceImpl,按官方路径调用:
      • /channels/ec/qic/inspect/config/get
      • /channels/ec/qic/inspect/submitconfig/get
      • /channels/ec/qic/inspect/code/print
      • /channels/ec/qic/inspect/submit
      • /channels/ec/qic/inspect/register_logistics
    • WxChannelApiUrlConstants 中新增 Qic 常量分组,集中维护路径。
  • 数据模型:补齐请求/响应对象并对齐官方字段

    • 新增响应模型:
      • InspectConfigResponse
      • SubmitConfigResponse
      • InspectCodeResponse
    • 新增请求模型:
      • SubmitInspectRequest
      • RegisterLogisticsRequest
    • 字段映射覆盖质检机构、快递产品、保价信息、沉香机构字段、打印模板信息等文档定义项。
  • 测试:新增质检服务单元测试

    • 新增 WxChannelQicServiceImplTest,覆盖 5 个接口的调用入口与核心请求对象构造。

示例(新增服务调用方式):

WxChannelQicService qicService = channelService.getQicService();

// 1) 查询质检仓配置
InspectConfigResponse inspectConfig = qicService.getInspectConfig();

// 2) 打印质检码
InspectCodeResponse codeResponse = qicService.printInspectCode("37423523451235145");

// 3) 绑定送检信息
SubmitInspectRequest req = new SubmitInspectRequest();
req.setOrderId("37423523451235145");
WxChannelBaseResponse submitResp = qicService.submitInspectInfo(req);

Copilot AI linked an issue May 31, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add quality inspection management module support feat(channel): 新增微信小店质检管理(QIC)5个官方接口支持 May 31, 2026
Copilot AI requested a review from binarywang May 31, 2026 14:36
@binarywang binarywang marked this pull request as ready for review May 31, 2026 14:37
Copilot AI review requested due to automatic review settings May 31, 2026 14:37

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.

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

@binarywang

Copy link
Copy Markdown
Owner

@codex auggie review

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.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Comment on lines +23 to +33
public static class DataPayload implements Serializable {
private static final long serialVersionUID = 684071509005627272L;

@JsonProperty("backupDeliveryId")
private String backupDeliveryId;

@JsonProperty("backupDeliveryName")
private String backupDeliveryName;

@JsonProperty("boxDTOList")
private List<BoxInfo> boxInfoList;
@augmentcode

This comment was marked as outdated.

augmentcode[bot]

This comment was marked as outdated.

chatgpt-codex-connector[bot]

This comment was marked as spam.

@binarywang

Copy link
Copy Markdown
Owner

@codex auggie review 请用中文重新给出评审建议

@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. No suggestions at this time.

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

@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: 0748aa9f0f

ℹ️ 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 +26 to +32
@JsonProperty("backupDeliveryId")
private String backupDeliveryId;

@JsonProperty("backupDeliveryName")
private String backupDeliveryName;

@JsonProperty("boxDTOList")

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 使用官方字段名解析质检码响应

printInspectCode 成功返回 QIC 文档中的 snake_case 字段(如 backup_delivery_idbox_dto_listinspect_code)时,这里从第一个字段开始全部标成 camelCase/boxDTOList,而 JsonUtils 没有启用命名策略且会忽略未知字段,Jackson 会静默把质检码、箱规、打印信息等核心内容都留空;调用方只能看到成功响应却拿不到质检码详情。请将这些 @JsonProperty 与实际响应字段名对齐。

Useful? React with 👍 / 👎.

Copilot AI and others added 3 commits July 11, 2026 15:18
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@binarywang binarywang force-pushed the copilot/feature-add-quality-inspection-module branch from 44b80f2 to c7c3b37 Compare July 11, 2026 07:20
@binarywang binarywang merged commit 1fa9012 into develop Jul 11, 2026
1 check passed
@binarywang binarywang deleted the copilot/feature-add-quality-inspection-module branch July 11, 2026 07:26
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