Skip to content

补齐微信小店商品管理缺失接口(13项)并完善模型映射#4032

Draft
Copilot wants to merge 2 commits into
developfrom
copilot/feature-add-missing-product-management-apis
Draft

补齐微信小店商品管理缺失接口(13项)并完善模型映射#4032
Copilot wants to merge 2 commits into
developfrom
copilot/feature-add-missing-product-management-apis

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 31, 2026

商品管理模块缺少一批关键能力接口(开售管理、属性映射、发品前校验、上架策略、提审限额、品牌推荐、第三方货源、库存流水等),导致 SDK 与官方能力不一致。此次改动按微信官方文档补齐接口定义与请求/响应模型,统一接入 WxChannelProductService

  • 接口能力补齐(Service + Impl)

    • WxChannelProductServiceWxChannelProductServiceImpl 新增 13 个商品管理接口方法:
      • getProductScheme
      • classifyProductCategory
      • beginTimingSale / cancelTimingSale
      • externalProductMapping / externalProductMappingNew
      • categoryPreCheck
      • getProductAuditStrategy / setProductAuditStrategy
      • getProductAuditQuota
      • productBrandRecommend
      • addProductThirdPartySource
      • getStockFlow
    • 方法签名与官方字段语义保持一致,统一通过 JsonUtils + ResponseUtils 进行序列化与响应解码。
  • API 常量补齐

    • WxChannelApiUrlConstants.Spu 增加对应 13 个官方路径常量,覆盖上述所有新能力,避免业务层硬编码 URL。
  • 请求/响应模型新增

    • 新增商品管理相关参数与返回对象(含上架策略、提审配额、类目推荐、属性映射、库存流水等结构)。
    • 对稳定字段采用强类型建模;对文档中结构较动态的部分(如部分复杂嵌套项)使用 JsonNode 承载,降低字段漂移风险。
  • 单元测试补充

    • 新增 ProductApiBeanTest,覆盖关键新模型的序列化/反序列化行为,确保字段映射正确(如 product_idaudit_quotaexternal_attributesstock_flow 数据结构)。
// 新增能力示例:获取商品移动应用 scheme
ProductSchemeParam param = new ProductSchemeParam();
param.setProductId("12345");
param.setFromAppid("wx123");
param.setExpire(300);

ProductSchemeResponse resp = channelService.getProductService().getProductScheme(param);
// resp.getOpenlink()

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 wasn't able to review any files in this pull request.

Copilot AI changed the title [WIP] Add missing product management APIs 补齐微信小店商品管理缺失接口(13项)并完善模型映射 Jun 1, 2026
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