You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lml
bedc6798e1
feat(xincang): 对接最优渠道 api.calculate_order_v3
按 SKU + 邮编由仓择优,与既有「运费试算」语义不同,core 新增独立能力:
- WarehouseChannelRecommendCapable.recommend(ctx, query)
- ChannelRecommendQuery:products[sku,qty] + postcode + signatureRequired + warehouseCode
- ChannelRecommendResult:文档两层结构原样保留
optimalPlan(仓 / 渠道 / 总价)+ warehouseQuotes[]
(每仓含 inventoryEnough、库存不足原因、各渠道报价与费用明细)
- WarehouseCapability 追加 CHANNEL_RECOMMEND(200),既有值未动
- 门面入口 fees().recommend(query),只读、不走幂等
信仓实现:
- 请求体 products / postcode / is_sign(是/否),未指定仓时不下发 warehouse_code
- isInventoryEnough 兼容 1/0、true/false、是/否,认不出返回 null
- optimalPlan 为空是合法结果(该城无可用渠道),返回空而非抛异常;
仅 rst 整体缺失才抛 ValidationException
待核对:文档标注 GET + application/json body,但 OkHttp 不支持 GET 带 body
(会直接丢弃),这里按 POST + JSON body 下发,联调时若仓方只认 GET
需换传输实现,改动集中在 XincangConstants.PATH_CHANNEL_RECOMMEND 一处。
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2 weeks ago |
| .. |
|
src
|
feat(xincang): 对接最优渠道 api.calculate_order_v3
|
2 weeks ago |
|
pom.xml
|
feat(xincang): 新增信仓三方仓模块与登录换 token
|
2 weeks ago |