Table Analysis of Marketing Module Database: Time-limited Purchase Function

Keywords: MySQL SpringBoot github Database Mobile

SpringBoot e-commerce project mall (20k+star) address: https://github.com/macrozheng/mall

abstract

This paper mainly analyzes the relevant functions of the limited time purchase (spike) function, and adopts the form of database table and function comparison.

Relevant table structure

Time limit purchase form

Information used to store time-limited purchasing activities, including start time, end time and online status.

create table sms_flash_promotion
(
   id                   bigint not null auto_increment,
   title                varchar(200) comment 'Title',
   start_date           date comment 'Start date',
   end_date             date comment 'End date',
   status               int(1) comment 'Up and down status',
   create_time          datetime comment 'Creation time',
   primary key (id)
);

Time-limited purchase list

It is used to store the information of time-limited purchasing venues. In a day, a time-limited purchasing activity will have several different time periods.

create table sms_flash_promotion_session
(
   id                   bigint not null auto_increment comment 'number',
   name                 varchar(200) comment 'Name of site',
   start_time           time comment 'Daily Start Time',
   end_time             time comment 'Daily end time',
   status               int(1) comment 'Enabled state: 0->Not enabled; 1->Enable',
   create_time          datetime comment 'Creation time',
   primary key (id)
);

Time-limited Purchase and Commodity Relations Table

It is used to store commodity information related to time-limited purchase. There are many times in a time-limited purchase. Each time can set different activities.

create table sms_flash_promotion_product_relation
(
   id                   bigint not null auto_increment,
   flash_promotion_id   bigint comment 'Limited time purchase id',
   flash_promotion_session_id bigint comment 'number',
   product_id           bigint comment 'commodity price',
   flash_promotion_price decimal(10,2) comment 'Time-limited purchase price',
   flash_promotion_count int comment 'Time-limited purchase quantity',
   flash_promotion_limit int comment 'Limited quantity per person',
   sort                 int comment 'sort',
   primary key (id)
);

Time-limited Buying Notification Record Form

Used to store members'time-limited purchase booking records. When some time-limited purchase venues have not started, members can make reservations. When the time-limited purchase venues begin, the system will remind them.

create table sms_flash_promotion_log
(
   id                   int not null auto_increment,
   member_id            int comment 'Member id',
   product_id           bigint comment 'commodity id',
   member_phone         varchar(64) comment 'Membership telephone',
   product_name         varchar(100) comment 'Trade name',
   subscribe_time       datetime comment 'Membership subscription time',
   send_time            datetime comment 'Sending time',
   primary key (id)
);

Management side presentation

Time-limited purchase data list

Editor's Time-limited Purchase Activity

Time-limited purchase list

Editorial time limit

Add commodities to time-limited Market

Click Set Commodities

Click on the list of items

Choose goods to add

Note: The promotion_type of the pms_product table needs to be modified to 5 for goods added to the time-limited purchase. The preferential calculation rules should also be changed to use the time-limited purchase preferences.

Editing time-limited merchandise information

Mobile End Display

Time-limited purchase

Time purchase in panic buying

The upcoming time-limited purchase

An appointment reminder can be set for the upcoming time-limited purchase

Public address

mall project In the whole series of learning courses, we pay attention to the first time acquisition of the public number.

Posted by Ne0_Dev on Sat, 05 Oct 2019 09:31:39 -0700