店小秘订单收件人:跨境单区县/街道用 "-" 占位
- 跨境单(Shopify 等)地址没有区县/街道,area/town 统一写 "-",保证下游必填项有值 - 同步更新接入文档与单测 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
aa01d292c2
commit
661254dfa4
@ -620,8 +620,9 @@ class DxmService extends PrintPlatformService {
|
||||
email: String(addr.email || ''),
|
||||
province: String(addr.province || ''),
|
||||
city: String(addr.city || ''),
|
||||
area: String(addr.district || ''),
|
||||
town: '',
|
||||
// 跨境单(Shopify 等)地址没有区县/街道:用 "-" 占位,保证下游(审核/推 WMS/面单)必填项有值
|
||||
area: String(addr.district || '').trim() || '-',
|
||||
town: '-',
|
||||
masked: !!addr.hasAsterisk,
|
||||
},
|
||||
remark: String(data.sellerComment || data.orderRemark || '') || null,
|
||||
|
||||
@ -372,8 +372,9 @@ describe('printPlatform/dxm listOrders', () => {
|
||||
email: '',
|
||||
province: 'Illinois',
|
||||
city: 'Collinsville',
|
||||
area: '',
|
||||
town: '',
|
||||
// 跨境单没有区县/街道,用 "-" 占位
|
||||
area: '-',
|
||||
town: '-',
|
||||
masked: false,
|
||||
});
|
||||
|
||||
|
||||
6
店小秘接入.md
6
店小秘接入.md
@ -205,7 +205,11 @@ POST /api/package/list.json (x-www-form-urlencoded)
|
||||
OMS 实现(`dxm.js#listOrders`):
|
||||
|
||||
- 按 `totalPage` 逐页拉(每页 100),**一个包裹 = 一张 OMS 订单**,`external_order_id` = 包裹ID;
|
||||
- `total_amount` / `pay_amount` = `orderAmount + shipAmount`;收件人取 `dxmPackageAddr`;
|
||||
- `total_amount` / `pay_amount` = `orderAmount + shipAmount`;
|
||||
- 收件人取 `dxmPackageAddr`:`contactPerson`→姓名、`phoneNumber`/`mobile`→电话、`province`→省(州)、
|
||||
`city`→市、`district`→区县、`detailAddress`+`address2`→详细地址、`country`→`country_code`、
|
||||
`zip`→`zip_code`、`email`→`email`;
|
||||
**跨境单没有区县/街道,`area`/`town` 用 `-` 占位**(下游必填项、面单打印都需要有值),不做中英文转换;
|
||||
- 明细跳过 `cancelFlag=true` 的行;
|
||||
- **订单明细只给平台规格ID**(`productId`/`vid`/`stockProductId` 都是规格ID),不给平台商品ID,
|
||||
因此明细的 `outer_item_id` 留空,由 `lib/shopProductMatch` 按「规格ID 在店铺内唯一命中」匹配店铺商品,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user