提交价格功能绑定

This commit is contained in:
wuweihua
2026-09-07 10:41:21 +08:00
parent 7204497a65
commit 10352fca6d
12 changed files with 578 additions and 105 deletions
+5 -3
View File
@@ -1,6 +1,6 @@
-- 产品主数据(来源:威狮B2C小包价表.xlsx)
-- 导入范围:产品目录 + 各产品 sheet 国家服务明细(尺寸/尾程/时效)
-- 不导入:运费/挂号费矩阵、退件重派、申报说明、赔偿标准
-- 导入范围:产品目录 + 各产品 sheet 国家×重量段(运费/挂号费/尺寸/尾程/时效)
-- 不导入:退件重派、申报说明、赔偿标准
SET NAMES utf8mb4;
CREATE TABLE IF NOT EXISTS bms_product (
@@ -33,6 +33,8 @@ CREATE TABLE IF NOT EXISTS bms_product_country (
country_code char(2) DEFAULT NULL COMMENT 'ISO2,可空待补齐',
weight_min decimal(10,3) DEFAULT NULL COMMENT '重量段最小值KG(含)',
weight_max decimal(10,3) DEFAULT NULL COMMENT '重量段最大值KG(含)',
freight_price decimal(10,4) DEFAULT NULL COMMENT '运费 RMB/KG',
registration_fee decimal(10,2) DEFAULT NULL COMMENT '挂号费 RMB/票',
size_limit varchar(1000) DEFAULT NULL COMMENT '尺寸限制',
last_mile varchar(500) DEFAULT NULL COMMENT '尾程派送说明',
lead_time varchar(100) DEFAULT NULL COMMENT '参考时效',
@@ -44,7 +46,7 @@ CREATE TABLE IF NOT EXISTS bms_product_country (
KEY idx_country_code (country_code),
KEY idx_weight_match (product_code, country_code, weight_min, weight_max),
CONSTRAINT fk_product_country_code FOREIGN KEY (product_code) REFERENCES bms_product (product_code) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='产品国家服务明细-重量段+尺寸/尾程/时效(不含运费)';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='产品国家明细-重量段+运费挂号费+尺寸/尾程/时效';
-- 已建表升级(幂等:列已存在时跳过报错可忽略)
-- ALTER TABLE bms_product_country ADD COLUMN weight_min decimal(10,3) DEFAULT NULL COMMENT '重量段最小值KG(含)' AFTER country_code;