Files
hhrs/docs/brand_ddl_2026-10-26.sql
T
jacobxu666andClaude Fable 5 9f13a21263 feat:商户列表/品牌详情页改版 + 云闪付付款码接入
- 新增 pages/shop/detail 品牌详情页:头部卡(logo/角标/付款码按钮)、富文本优惠说明(数字标红)、适用门店清单(距离排序+高德导航+拨号,无二级页);付款码走 upsdk.qrCodePay 容器原生拉起,非云闪付环境 3s 超时给引导弹窗
- 折扣列表行按参考图改版:logo/品牌名/券类型标签/付款方式纵排,右侧结构化优惠数字放大红色+直线距离;搜索区瘦身;未迁移门店全字段回退旧文案不断档
- 首页宫格与列表统一跳新详情页
- docs:brand 建表 DDL、后端需求文档、终版收集表(187 品牌/197 门店已导入 UAT+DEV,脚本按名称幂等)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-26 16:40:38 +08:00

49 lines
3.5 KiB
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.
-- ============================================================
-- 怀化社保卡商户板块改版 · 品牌表 DDL
-- 需求文档:品牌表建表与接口需求_2026-10-26.md
-- 执行顺序:① 本文件建表/加列 → ② 导入脚本回填(另交) → ③ 接口发布
-- 环境:dscp_business_uat 与 生产库 各执行一次(两库不同机器)
-- ============================================================
-- 1. 品牌表(平台通用命名风格,无前缀;其他项目通过自有方式关联 brand_id)
CREATE TABLE `brand` (
`id` BIGINT NOT NULL COMMENT '雪花ID',
`name` VARCHAR(50) NOT NULL COMMENT '品牌名称(唯一业务名,收集表①B列)',
`logo` VARCHAR(255) COMMENT '品牌LOGO图片URL(OSS)',
`brand_type` VARCHAR(30) COMMENT '品牌类型(连锁餐饮/连锁商超等,运营自定文本)',
`introduction` TEXT COMMENT '品牌简介',
`discount_type` TINYINT COMMENT '优惠类型:1满减券 2折扣券 3立减券 4余额券 5免费体验 6固定价 9其他',
`discount_display` VARCHAR(50) COMMENT '列表展示文案(如:满200减8元 / 9.8折)',
`threshold_fen` INT COMMENT '优惠门槛(分;折扣类为空)',
`discount_value` INT COMMENT '优惠力度(满减/立减=减额分;折扣=折数×10,如9.8折存98)',
`pay_mode` VARCHAR(30) COMMENT '付款方式(付款码,扫一扫…多值逗号分隔)',
`pay_rule` VARCHAR(50) COMMENT '付款规则(如:付款立减)',
`discount_rules` TEXT COMMENT '优惠说明(富文本HTML,后台富文本编辑器维护,详情页编号列表直接渲染)',
`service_phone` VARCHAR(20) COMMENT '客服电话(详情页/列表拨号用)',
`remark` VARCHAR(500) COMMENT '优惠原文备份(迁移追溯,兼容 shop_relation.remark)',
`status` TINYINT DEFAULT 1 COMMENT '1上架 0下架',
`sort` INT DEFAULT 0 COMMENT '排序',
`is_deleted` BIT(1) DEFAULT b'0',
`created_by` VARCHAR(50),
`created_time` DATETIME,
`updated_by` VARCHAR(50),
`updated_time` DATETIME,
PRIMARY KEY (`id`),
KEY `idx_brand_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='品牌表';
-- 2. 商铺表挂品牌(其余字段复用现有:logo/lat/lng/mobile/business_time/main_pic 均已存在)
ALTER TABLE `shop`
ADD COLUMN `brand_id` BIGINT NULL COMMENT 'FK brand.id' AFTER `merchant_id`,
ADD INDEX `idx_shop_brand_id` (`brand_id`);
-- 3. 权益项目:card_resource_rule 大部分复用现有字段,仅新增一列 use_mode——
-- 权益内容物 → resource_name/introduce;可用次数 → total_times/month_times/day_times;
-- 是否预约 → is_appointment/can_appointment/advance_days/advance_hour;
-- 使用规则/注意事项 → notice/card_instruction;状态 → status/resource_status。
-- ⚠ settlement_way/check_settlement_type 属于财务结算域(结算单/分成/买断链路),
-- 不可挪用为用户端核销方式。用户端"核销方式"用新列:
ALTER TABLE `card_resource_rule`
ADD COLUMN `use_mode` VARCHAR(30) NULL COMMENT '使用/核销方式(展示用):付款码/扫一扫/权益券核销/出示页面/现场登记' AFTER `settlement_way`;