wip: tiered deliver price
This commit is contained in:
1 parent
8423007350
commit
a0c13b91da
23 files changed
+426
-39
No files matched your search
@@ -0,0 +1,14 @@
|
||||
-- ============================================================
|
||||
-- 门店配送规则(阶梯配送费)升级脚本
|
||||
-- 将固定的"配送价格"扩展为基于距离区间的"配送规则"
|
||||
-- 配送规则存为 JSON 数组: [{minKm,maxKm,price}],区间左闭右开
|
||||
-- 无规则匹配时回退 delivery_price(默认配送费)
|
||||
-- ============================================================
|
||||
|
||||
ALTER TABLE `yshop_store_shop`
|
||||
ADD COLUMN `delivery_rules` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '配送规则JSON:[{minKm,maxKm,price}]' AFTER `delivery_price`;
|
||||
|
||||
-- 可选:为已有支持外卖的门店初始化一条示例规则(请按需调整)
|
||||
-- UPDATE `yshop_store_shop`
|
||||
-- SET `delivery_rules` = '[{"minKm":0,"maxKm":3,"price":8},{"minKm":3,"maxKm":5,"price":12}]'
|
||||
-- WHERE `distance` > 0 AND `delivery_rules` IS NULL;
|
||||
Reference in new issue
Block a user