试读部分
刚开始只有一个抽奖大转盘活动 有如下抽奖规则 每个用户每天可以抽3次 新客第一次抽奖100%中奖 新客接下来抽奖只能中红包奖品 中了优惠券一个月内只能中红包 中了实物半年内只能中红包 对应的数据库表设计为 create table lottery_activity(
id int primary key auto_increment,
name varchar(20) not null comment '活动名称',
start_time datetime not null default current_timestamp comment '活动起始时间',
end_time datetime comment '活动截止时间 为空表示无截止时间',
daily_draw_count tinyint default 3 not null comment '每日抽奖次数',
new_user_probability tinyint not null comment '新客中奖概率',
old_user_probability tinyint not null comment '老客中奖概率',
new_user_first_probability tinyint not null comment '新客首次中奖概率',
coupon_interval decimal(10,5) not null comment '优惠券间隔时间 单位天',
real_object_interval decimal(10,5) not null comment '实物间隔时间 单位天'
)charset utf8 comment '抽奖活动配置'; 但是后面又有开宝箱活动需要复用抽奖大转盘的玩法 而开宝箱与……
本文为 VIP 文章,已展示部分内容,
开通 VIP 后查看全文
觉得这篇文章有帮助?
点个赞,或赞赏支持作者持续创作