修改分区功能
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Billing quote / order sync: postcode -> zone
|
||||
|
||||
## Rule
|
||||
- Whether a country needs a zone is decided by `bms_product_country` (rows with `zone_code`).
|
||||
- If the product+country has zones: request **must** include `destPostcode`.
|
||||
- Zone is resolved at runtime: `destPostcode` -> `prc_zone_detail` + `prc_zone` -> `zone_code`, then match `bms_product_country`.
|
||||
- Billing tables store **postcode only**, not zone columns:
|
||||
- `prc_quote.dest_postcode`
|
||||
- `prc_order_bill.dest_postcode` (already existed)
|
||||
|
||||
## SQL
|
||||
Run: `bms-back/sql/price/billing_postcode_alter.sql`
|
||||
|
||||
## API fields
|
||||
- Request: `destPostcode` on `/api/tms/price/quote` and `/api/tms/price/bill` (and console `/price/billing/quote`).
|
||||
- Response may include `zoneId` / `zoneCode` / `zoneName` for display only (not persisted on bill/quote tables).
|
||||
|
||||
## Errors (i18n)
|
||||
- `price.quote.postcodeRequired`
|
||||
- `price.quote.postcodeZoneNotFound`
|
||||
- `price.quote.zonePriceNotHit`
|
||||
- `price.quote.priceNotHit`
|
||||
Reference in New Issue
Block a user