下单接口支持其他店铺

/api/order/get_shipping_fee 与购物车加入逻辑此前只认官方自营详情页,加盟店运费分桶
仅靠自由文本 supplier 判断,未与其他店铺列表的 tenpo_cd 打通。补充 OrderItem/
CargoItemRequest 的 tenpo_cd/branch_number 字段,运费计算优先按 tenpo_cd 分桶
(无则回退 supplier 保持兼容),cargo_service 加购 URL 同步带上店铺参数。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-08 22:31:03 +08:00
parent fe2a3f3768
commit 118667d01f
6 changed files with 139 additions and 5 deletions
+6
View File
@@ -265,6 +265,11 @@ class SurugayaClient:
# 提取面包屑
breadcrumb_list = self.get_breadcrumb_list(tree)
# 仅当调用方显式要求时,才额外抓取「他のショップ」页面(多付出一次 Cloudflare 保护页面请求)
other_shop_list: list[OtherShopItem] = []
if payload.include_other_shops:
other_shop_list = await self._fetch_other_shop_list(goods_id)
detail = ProductDetailData(
goods_id=goods_id,
goods_name=goods_name,
@@ -279,6 +284,7 @@ class SurugayaClient:
price_note=price_note,
shipping_comission_fee=shipping_comission_fee,
breadcrumb_list=breadcrumb_list,
other_shop_list=other_shop_list,
)
logger.debug("详情页解析完成:goods_id=%s goods_name=%s ", detail.goods_id, detail.goods_name)
return detail