Bring the data sheet and share with you how to design the group activities

We all know that e-commerce system promotion methods basically have these: points, coupons, member discounts, sign-in, pre-sale, bargaining, and spike. In addition to these, there is also a magical method: Joining a group, why do you say that? In fact, everyone should think of Pinduoduo's super annoying teamwork mode.

All of Pinduoduo’s products basically have a group grouping model, and it is precisely because of this method that it attracts more traffic conversions and breaks a blood path.

Not much nonsense, today I will explain to you how to design the group activities.

From the following analysis of the creation of group activities, it is mainly to combine the business needs of the e-commerce system
Insert picture description here

Create a group activity in the background

A mature group joining activity contains four elements: the
goods
must be brought or related to the group. The price of the goods during the group joining must be lower than the original price, so as to attract more people to join the group.

The number of people in the group
Since you are buying together, the number of people set here must not be less than 2 people. Otherwise it won't be a group.

Valid time of
group joining activities. A certain period of time must be set after a group joining activity starts to expire. Since it is an activity, that is, the product can better achieve the promotion within a certain period of time.

Here we need to set a time for group opening, for example, it is valid for 24 hours, and users can enter the product details to open group purchases.

Effective time
for group formation The time when the user forms a group with other people after the group starts. If the group is not successfully formed within this time, it means the group failed and the system will automatically refund.

The actual end time of the group joining = the time of initiating the joining group + the effective time of forming the group (the time of starting the joining group = the payment time of the initiating group)

See the picture above is basically necessary. Others such as: group joining type, joining channel, joining group method, group leader reward, etc. are determined according to business needs.

It has been noticed that there is another mode for the pictures of the products: assist group joining, assist number of people, assist type, which should be designed for cashback joining group. In fact, this is similar to the large red envelopes issued by nearby Douyin or Pinduoduo, and it needs more people to share and help get red envelopes according to their own needs.

After the group joining is successfully created, a new record is added to the group joining activity list.
Insert picture description here
There are various statuses for group joining activities, here according to the activity time, for example: the
group joining activity has not started (the set time is greater than the current time) in the
activity: the starting time of the group joining activity is greater than the current time and the end time of the group joining activity is greater than the current time;
Ended: The end time of the group joining activity is greater than the current time;

The validity of the group join is judged by the on/off field. If the event is not on the shelves, no matter whether the event has started or is in progress, the group is not allowed.

Front end initiates a group

Insert picture description here

Insert picture description here
Join group from product details, this is an entrance. After the group is opened, there are different group joining statuses, and the number of order IDs is different from the number of people already participating in the group, assuming that the number of people in the group is 2 people.

Pending group formation: The initiator (group leader) initiated the group joining but did not pay. The order ID has the user's order data, but the payment is not made, indicating that the group joining was unsuccessful.
Joining the group: The initiator has successfully paid and opened the group. The number of participants has been 1. Orders in the "joining group" status cannot be cancelled, and can only be cancelled after the group joining is successful.
Successful group joining: The group is full and the payment is successful. At this time, one group purchase ID corresponds to two order IDs.
Failure to join the group: If the number of people in the group is not full within the effective time of the group, if the group fails, the system will automatically refund.

After the group is opened, there will be a group-joining order form. The group-joining order has failed group-jointing status, and the status of the group-joining success determines whether the group joining is successful.

The design of group joining is based on specific analysis of specific issues, but must have the above 4 elements. After Lu Qing needs, coding according to needs is basically not a problem. The code is not posted here

The more important thing is the design of the data sheet, here is the data sheet

Related data sheet

The data sheet is for reference only, because many still have to be based on your own business needs.
Joining activities list

CREATE TABLE `pintuan_activities` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `activity_title` varchar(255) NOT NULL COMMENT '活动标题',
  `activity_cover` varchar(255) NOT NULL COMMENT '活动封面',
  `share_title` varchar(255) NOT NULL COMMENT '分享标题',
  `share_desc` varchar(255) NOT NULL COMMENT '分享描述',
  `share_cover` varchar(255) NOT NULL COMMENT '分享封面',
  `start_time` datetime DEFAULT NULL COMMENT '活动开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '活动结束时间',
  `expire_hour` tinyint(3) unsigned NOT NULL DEFAULT '24' COMMENT '成团有效时间',
  `is_on_sale` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否上架 1:上架 0:下架',
  `sort` tinyint(3) unsigned NOT NULL COMMENT '排序',
  `mode` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '拼团方式:1. 老带新 2. 所有用户',
  `type` tinyint(3) unsigned NOT NULL COMMENT '拼团类型:1. 普通拼团 2. 阶梯拼团 3. 加价拼团 4. 返现拼团',
  `range` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '拼团位置: 1. 线上拼团 2. 线下拼团',
  `recommend` tinyint(3) NOT NULL DEFAULT '0' COMMENT '推荐',
  `goods_package_id` int(10) unsigned NOT NULL COMMENT '商品套餐ID',
  `original_price` decimal(10,2) unsigned NOT NULL COMMENT '原价',
  `active_rule` text COMMENT '拼团规则JSON格式',
  `is_help` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否助力0否,1是',
  `help_user_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '助力用户类型 1 老用户 2所有用户',
  `help_people_num` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '助力人数',
  `success_reward_rule` text COMMENT '成功奖励规则JSON格式 \r\nreward_type:奖励类型\r\n1:实物奖励-充值到账户\r\n2:实物奖励-直接发货\r\n3:优惠券奖励\r\n4:积分奖励\r\n5:现金返利\r\nreward_value:奖励物品\r\nreward_send_type:发放时间类型\r\n1:成团立即发放\r\n2:下一次配送完成后15天\r\n3:订单完成后7天',
  `failure_reward_rule` text COMMENT '失败奖励规则JSON格式 \r\nreward_type:奖励类型\r\n1:实物奖励-充值到账户\r\n2:实物奖励-直接发货\r\n3:优惠券奖励\r\n4:积分奖励\r\n5:现金返利\r\nreward_value:奖励物品\r\nreward_send_type:发放时间类型\r\n1:失败立即发放\r\n2:退款审核后发放',
  `return_money_rule` text COMMENT '返现规则',
  `created_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=128 DEFAULT CHARSET=utf8 COMMENT='拼团活动表';

Group Order Form

CREATE TABLE `pintuan_activity_orders` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_sn` varchar(255) NOT NULL DEFAULT '' COMMENT '拼团订单SN',
  `business_id` int(10) NOT NULL COMMENT '商家ID',
  `user_id` int(10) unsigned NOT NULL COMMENT '拼主',
  `group_activity_id` int(10) unsigned NOT NULL COMMENT '拼团活动ID',
  `success_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `goods_package_id` int(10) unsigned NOT NULL COMMENT '拼团套餐ID',
  `status` int(10) unsigned NOT NULL DEFAULT '1' COMMENT '状态:1. 未支付 2.拼团中 3. 拼团成功 4. 拼团失败',
  `range` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '拼团位置: 1. 线上拼团 2. 线下拼团',
  `people_number` int(10) unsigned NOT NULL COMMENT '成团人数',
  `remaining_people_number` int(10) unsigned NOT NULL COMMENT '剩余人数',
  `expire_hour` tinyint(3) unsigned NOT NULL COMMENT '成团有效时间',
  `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1127 DEFAULT CHARSET=utf8 COMMENT='拼团订单表';

If there are settings for group joining, for example, if the group is successful and the leader has any rewards, there will be a group reward table

CREATE TABLE `pintuan_activity_rewards` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL COMMENT '用户ID',
  `range` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '拼团位置: 1. 线上拼团 2. 线下拼团',
  `group_activity_order_id` int(10) unsigned NOT NULL COMMENT '拼团订单ID',
  `order_id` int(10) NOT NULL COMMENT '销售单id',
  `order_status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '奖励人:1, 团长奖励	 2. 失败奖励 3. 返现拼团',
  `send_time` datetime DEFAULT NULL COMMENT '发放时间',
  `reward_type` tinyint(3) unsigned NOT NULL COMMENT '奖励类型\r\n1:实物奖励-充值到账户\r\n2:实物奖励-直接发货\r\n3:优惠券奖励\r\n4:积分奖励\r\n5:现金返利\r\n6.返利拼团',
  `reward_value` varchar(255) NOT NULL COMMENT '奖励 (reward_type=6时为返现金额)',
  `reward_send_type` tinyint(3) unsigned DEFAULT NULL COMMENT '奖励发放类型: 1=成团立即发送 2=配送单完成之后15天 3=订单完成后七天',
  `reward_expect_time` datetime DEFAULT NULL COMMENT '奖励预计发送时间',
  `status` tinyint(3) DEFAULT '1' COMMENT '发放状态 1.待发放 2.已发放 3.待审核',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=855 DEFAULT CHARSET=utf8 COMMENT='拼团奖励表';


to sum up

As mentioned above, the basic elements of the design of group joining activities are inseparable: the number of people joining the group, the effective time of joining the group, the time of joining the group, and the products of the group. More expansion depends on the needs, the above design is only for reference, and I hope it can help you.

Systematic learning PHP

Pay attention to the public account: PHP Self-study Center, reply to the corresponding keywords, and receive the following video tutorials.

1 Vue2.5 core technology source code analysis
Keywords: 19082201

2 Analysis and in-depth interpretation of design pattern examples
Keywords: 20190714

3 Complete PHP advanced practical tutorials
Keywords: 20190625

**4 Zero-distance contact with mysql**
Keywords: 20190128

5 The actual combat of high-performance Linux server construction
Keywords: 20190622

6 Analysis of the underlying source code of
ThinkPHP5 Keywords: 20190621

7 Thinkphp plug-in development of WeChat system
Keywords: 201907282319

8 Laravel basic entry to the actual development of
WeChat mall Keywords: 08250045

9 PHP asynchronous communication framework Swoole actual combat
Keywords: 08250024

Insert picture description here

Guess you like

Origin blog.csdn.net/phpCenter/article/details/105414416