Files
guilixu-admin/zone-discount-rate-10606.sql
T
gxwebsoft 8d8080c7bf feat(shopZone): 新增专区折扣系数功能及购物车链路支持
- HomeSection 模型增加 discountRate 字段,默认 1.00 表示不打折
- zoneEdit 组件新增折扣系数输入框,支持设置 0.01~1 之间的折扣率
- 后端 guilixu-java 增加专区折扣逻辑,成交价=市场价×折扣系数,保证后端价格计算安全
- 小程序 guilixu-taro 频道详情和商品详情支持专区折扣展示和传参
- 购物车新增 sectionId 字段,支持专区折扣价计算,完善购物车加购与价格计算逻辑
- 提供对应迁移 SQL 脚本更新数据库结构(专区折扣率与购物车 section_id)
- 修复历史订单商品支付状态,补偿专区销量统计数据
- MEMORY 文档补充详细开发与设计说明,明确双后端接口调度和业务逻辑划分
2026-08-18 10:53:15 +08:00

11 lines
625 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 专区商城价折扣系数:成交价 = 市场价(salePrice) × discount_rate
-- 作用于 guilixu-java 的 db_guilixu 库(shop_home_section 表)
-- 租户 10606 生效环境执行;默认 1.00 表示不打折,本专区按需求填 0.78
ALTER TABLE shop_home_section
ADD COLUMN discount_rate DECIMAL(10, 2) NOT NULL DEFAULT 1.00
COMMENT '专区商城价折扣系数, 成交价=市场价×系数, 1.00表示不打折';
-- 如需将「某专区」直接设为 0.78 折(替换 <section_id>):
-- UPDATE shop_home_section SET discount_rate = 0.78 WHERE section_id = <section_id> AND tenant_id = 10606;