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

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

原创 梦想de星空 macrozheng 2019-08-05

来自专辑

mall学习教程(业务篇)

本文主要对限时购(秒杀)功能相关表进行解析,采用数据库表与功能对照的形式。

相关表结构

限时购表

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

 
  1. create table sms_flash_promotion

  2. (

  3. id bigint not null auto_increment,

  4. title varchar(200) comment '标题',

  5. start_date date comment '开始日期',

  6. end_date date comment '结束日期',

  7. status int(1) comment '上下线状态',

  8. create_time datetime comment '创建时间',

  9. primary key (id)

  10. );

限时购场次表

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

 
  1. create table sms_flash_promotion_session

  2. (

  3. id bigint not null auto_increment comment '编号',

  4. name varchar(200) comment '场次名称',

  5. start_time time comment '每日开始时间',

  6. end_time time comment '每日结束时间',

  7. status int(1) comment '启用状态:0->不启用;1->启用',

  8. create_time datetime comment '创建时间',

  9. primary key (id)

  10. );

限时购与商品关系表

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

 
  1. create table sms_flash_promotion_product_relation

  2. (

  3. id bigint not null auto_increment,

  4. flash_promotion_id bigint comment '限时购id',

  5. flash_promotion_session_id bigint comment '编号',

  6. product_id bigint comment '商品价格',

  7. flash_promotion_price decimal(10,2) comment '限时购价格',

  8. flash_promotion_count int comment '限时购数量',

  9. flash_promotion_limit int comment '每人限购数量',

  10. sort int comment '排序',

  11. primary key (id)

  12. );

限时购通知记录表

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

 
  1. create table sms_flash_promotion_log

  2. (

  3. id int not null auto_increment,

  4. member_id int comment '会员id',

  5. product_id bigint comment '商品id',

  6. member_phone varchar(64) comment '会员电话',

  7. product_name varchar(100) comment '商品名称',

  8. subscribe_time datetime comment '会员订阅时间',

  9. send_time datetime comment '发送时间',

  10. primary key (id)

  11. );

管理端展现

限时购数据列表

编辑限时购活动

限时购场次列表

编辑限时购场次

添加商品到限时购场次

点击设置商品

点击商品列表

选择商品进行添加

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

编辑限时购商品信息

移动端展现

已开抢的限时购

抢购中的限时购

即将开始的限时购

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

推荐阅读

 

 


 

欢迎关注,点个在看

阅读原文

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值