补齐微信小店商品管理缺失接口(13项)并完善模型映射#4032
Conversation
🤖 Augment PR SummarySummary: This PR brings the WxChannel 商品管理 SDK in sync with the latest 微信小店官方能力 by adding missing endpoints and model mappings. Changes:
Technical Notes: New service methods consistently use 🤖 Was this summary useful? React with 👍 or 👎 |
| private List<Integer> opTypeList; | ||
|
|
||
| /** 翻页上下文. */ | ||
| @JsonProperty("next_key") |
There was a problem hiding this comment.
ProductStockFlowParam is missing the required request field page_size (and also lacks stock_type_id, which is required when stock_type is neither 0 nor 1 per the official getflow docs), so getStockFlow calls built from this bean will likely fail server-side validation.
Severity: high
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52b883ce73
ℹ️ 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("next_key") | ||
| private String nextKey; |
There was a problem hiding this comment.
Add required getflow request fields
For getStockFlow requests, the getflow API requires page_size and also needs stock_type_id when stock_type is neither 0 nor 1, but this parameter bean only exposes next_key for pagination and has no way to serialize those fields. Callers using the new method cannot build a valid request for the documented inputs, so the server will reject stock-flow queries or make some stock types impossible to query.
Useful? React with 👍 / 👎.
商品管理模块缺少一批关键能力接口(开售管理、属性映射、发品前校验、上架策略、提审限额、品牌推荐、第三方货源、库存流水等),导致 SDK 与官方能力不一致。此次改动按微信官方文档补齐接口定义与请求/响应模型,统一接入
WxChannelProductService。接口能力补齐(Service + Impl)
WxChannelProductService与WxChannelProductServiceImpl新增 13 个商品管理接口方法:getProductSchemeclassifyProductCategorybeginTimingSale/cancelTimingSaleexternalProductMapping/externalProductMappingNewcategoryPreCheckgetProductAuditStrategy/setProductAuditStrategygetProductAuditQuotaproductBrandRecommendaddProductThirdPartySourcegetStockFlowJsonUtils+ResponseUtils进行序列化与响应解码。API 常量补齐
WxChannelApiUrlConstants.Spu增加对应 13 个官方路径常量,覆盖上述所有新能力,避免业务层硬编码 URL。请求/响应模型新增
JsonNode承载,降低字段漂移风险。单元测试补充
ProductApiBeanTest,覆盖关键新模型的序列化/反序列化行为,确保字段映射正确(如product_id、audit_quota、external_attributes、stock_flow数据结构)。