摸大红支持购物车多选一起结账

下单支持多商品行快照与一次支付;支付后整单复制文案,前台提供购物车加购与结账。
This commit is contained in:
yml2213
2026-07-16 20:58:39 +08:00
parent e241607535
commit 183351a297
17 changed files with 1159 additions and 117 deletions
@@ -0,0 +1,15 @@
-- +goose Up
-- 摸大红订单支持多商品:商品行快照(兼容旧单:无 items 时仍读 product_snapshot
ALTER TABLE mohong_orders
ADD COLUMN items_snapshot JSON NULL COMMENT '订单商品行快照[{product_id,title,quantity,unit_price_cent,...}]' AFTER product_snapshot;
UPDATE system_configs
SET `value` = '【摸大红订单】\n订单号:{{order_no}}\n下单时间:{{created_at}}\n商品明细:\n{{items}}\n数量合计:{{quantity}}\n金额:{{amount}}\n下单人:{{buyer_name}}{{buyer_phone}}',
description = '摸大红订单一键复制文案模板(支持多商品 {{items}})'
WHERE `key` = 'mohong.order_copy_template'
AND (`value` LIKE '%商品:{{product_title}}%' OR `value` = '');
-- +goose Down
ALTER TABLE mohong_orders DROP COLUMN items_snapshot;