前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >营销模块数据库表解析:限时购功能

营销模块数据库表解析:限时购功能

作者头像
macrozheng
发布2019-08-06 15:18:07
1.4K0
发布2019-08-06 15:18:07
举报
文章被收录于专栏:mall学习教程

相关表结构

限时购表

用于存储限时购活动的信息,包括开始时间、结束时间以及上下线状态。

代码语言:javascript
复制
create table sms_flash_promotion
(
   id                   bigint not null auto_increment,
   title                varchar(200) comment '标题',
   start_date           date comment '开始日期',
   end_date             date comment '结束日期',
   status               int(1) comment '上下线状态',
   create_time          datetime comment '创建时间',
   primary key (id)
);

限时购场次表

用于存储限时购场次的信息,在一天中,一个限时购活动会有多个不同的活动时间段。

代码语言:javascript
复制
create table sms_flash_promotion_session
(
   id                   bigint not null auto_increment comment '编号',
   name                 varchar(200) comment '场次名称',
   start_time           time comment '每日开始时间',
   end_time             time comment '每日结束时间',
   status               int(1) comment '启用状态:0->不启用;1->启用',
   create_time          datetime comment '创建时间',
   primary key (id)
);

限时购与商品关系表

用于存储与限时购相关的商品信息,一个限时购中有多个场次,每个场次都可以设置不同活动商品。

代码语言:javascript
复制
create table sms_flash_promotion_product_relation
(
   id                   bigint not null auto_increment,
   flash_promotion_id   bigint comment '限时购id',
   flash_promotion_session_id bigint comment '编号',
   product_id           bigint comment '商品价格',
   flash_promotion_price decimal(10,2) comment '限时购价格',
   flash_promotion_count int comment '限时购数量',
   flash_promotion_limit int comment '每人限购数量',
   sort                 int comment '排序',
   primary key (id)
);

限时购通知记录表

用于存储会员的限时购预约记录,当有的限时购场次还未开始时,会员可以进行预约操作,当场次开始时,系统会进行提醒。

代码语言:javascript
复制
create table sms_flash_promotion_log
(
   id                   int not null auto_increment,
   member_id            int comment '会员id',
   product_id           bigint comment '商品id',
   member_phone         varchar(64) comment '会员电话',
   product_name         varchar(100) comment '商品名称',
   subscribe_time       datetime comment '会员订阅时间',
   send_time            datetime comment '发送时间',
   primary key (id)
);

管理端展现

限时购数据列表

编辑限时购活动

限时购场次列表

编辑限时购场次

添加商品到限时购场次

点击设置商品
点击商品列表
选择商品进行添加

注意:添加到限时购的商品需要修改 pms_product表的 promotion_type为5,优惠计算规则也应该改成使用限时购的优惠。

编辑限时购商品信息

移动端展现

已开抢的限时购

抢购中的限时购

即将开始的限时购

即将开始的限时购可以设置预约提醒

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2019-08-05,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 macrozheng 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 相关表结构
    • 限时购表
      • 限时购场次表
        • 限时购与商品关系表
          • 限时购通知记录表
          • 管理端展现
            • 限时购数据列表
              • 编辑限时购活动
                • 限时购场次列表
                  • 编辑限时购场次
                    • 添加商品到限时购场次
                      • 点击设置商品
                      • 点击商品列表
                      • 选择商品进行添加
                    • 编辑限时购商品信息
                    • 移动端展现
                      • 已开抢的限时购
                        • 抢购中的限时购
                          • 即将开始的限时购
                            • 即将开始的限时购可以设置预约提醒
                            领券
                            问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档