当前位置:网站首页>Spicy food advertising e-commerce system development function and spicy food advertising e-commerce app system development source code sharing
Spicy food advertising e-commerce system development function and spicy food advertising e-commerce app system development source code sharing
2022-06-25 12:27:00 【Procedure 15528175269】
Recently developed a set of advertising e-commerce system , Advertising e-commerce system is based on e-commerce system + Look at the advertising revenue model to operate . The advertising e-commerce system includes 4 Subsystem : Mall system , Advertising system , Blind box system , Distribution system
Let me introduce several major functional modules of the advertising e-commerce system , At the bottom of the text is the core source code of the advertising e-commerce system. Let's share it with you .
The function of the mall :
Free registration invitation code registration system , Community based private domain traffic distribution
Buy products and give corresponding points , Points can be exchanged for advertising tasks , Different points open different advertising tasks , for example 100 The product of yuan is presented as a gift 100 Integral of element ,500 The product of yuan is presented as a gift 500 Integral of element , Points can open corresponding advertising tasks
Advertising system functions :
See the opening of the advertising task :
for example :100 The ad task level that points open is not bronze , The number of times you watch advertisements every day is also a reward for the bronze task ;1000 The advertising task of starting points is silver task , Then the corresponding reward is the silver gradient advertising reward
The overall procedural rules of the system are , Different integral gradients correspond to different levels of advertising tasks , Corresponding to different times of watching advertisements and red envelope rewards , This model is applicable to the shopping mall to promote the shopping mall users to purchase products .
About the relationship between mall points and advertising , The points of the mall and the task points of advertising are one-to-one related
See the reward income distribution of advertising :
When the advertising video is played , It will be distributed to members' accounts in real time , This is the advertising revenue from the platform , Users can withdraw cash at any time .
System withdrawal :
The system can freely set the minimum withdrawal limit , for example :10 From yuan to yuan ,10 Integral multiples of , Withdrawal service rate , Withdrawal period
Advertising task operation :
Enter the advertising area , Click on the video advertisement , The playing time of each video advertisement is different , After the video is broadcast, the advertising reward will be automatically distributed to the member account
Function of blind box system
The blind box category area is divided freely , It can be a blind box of various price levels ; Set the products of each blind box category freely ; The blind box has its own control panel to set the winning prize ; After the user orders the blind box and wins the prize , You can choose to get products , It can also be a bad product , Select consignment mode , Once the consignment is successful , The money for selling products is automatically transferred to the member account
Advertising e-commerce system part of the source code :
protected static function sendReward( $spread_uid, $money, $level=0, $eq = 0,$up_level=0)
{
if( $money < 0.01 ) return false;
$user_info = User::where('uid',$spread_uid)->field('uid,spread_uid,now_money,level')->find();
if( !$user_info ) return false;
$user_info = $user_info->toArray();
// See if there is a grade perhaps A level has been triggered and is equal to the current level
if( $user_info['level'] < 1 || ( $eq == 1 && $level == $user_info['level'] ) )
return self::sendReward($user_info['spread_uid'],$money,$level,$eq,$up_level);
$level_info = SystemUserLevel::where('id',$user_info['level'])->find();
// See if there is a grade
if( !$level_info )
return false;
$level_info = $level_info->toArray();
// If the superior level is less than the current level to be queried
if( $user_info['level'] < $level )
return self::sendReward($user_info['spread_uid'],$money,$level,$eq,$up_level);
// ::todo Calculate current level Level of team rewards . It is convenient to calculate the grade difference of reward ; If not, it means 0;
$level_rate = SystemUserLevel::where('id',$user_info['level'] > $level ? $level : $up_level)->value('team_rate',0);
// Calculate level rewards
// ::todo My reward = ( My rank team ratio - Proportion of lower level teams )* Total sum /100;
$reward_money = bcdiv(bcmul(bcsub($level_info['team_rate'],$level_rate,2),$money,2),100,2);
// If the team reward does not , Grade +1; Level =0 Continue to find ;
if( $level_info['team_rate'] == 0 )
{
$level++;
$eq = 0;
return self::sendReward($user_info['spread_uid'],$money,$level,$eq,$up_level);
}
// :todo If a leveling occurs , That's my reward = ( My grade level rewards * Team rewards corresponding to my level )/100;
if( $eq == 0 && $user_info['level'] == $level )
{
// The percentage of peers taking their superiors ;
$reward_money = bcdiv(bcmul($level_info['eq_rate'],$reward_money,2),100,2);
$eq = 1;
}
// If the user level is greater than the current level , be eq=0;
if( $user_info['level'] > $level )
$eq = 0;
$up_level = $level;
$level = $user_info['level'];
if( $reward_money < 0.01 )
return self::sendReward($user_info['spread_uid'],$money,$level,$eq,$up_level);
// Award
User::bcInc($user_info['uid'],'now_money',$reward_money,'uid');
UserBill::income(' Team rewards ',$user_info['uid'],'now_money','team_reward',$reward_money,'',bcadd($user_info['now_money'],$reward_money,2),' Team rewards get :'.$reward_money.' element ');
// Send a message
UserMessage::sendMessage($user_info['uid'],' Team rewards ',' Congratulations , Because your umbrella members watch advertisements , You get a team reward '.$reward_money.' Yuan Oh ~~~');
if( $user_info['spread_uid'] > 0 )
return self::sendReward($user_info['spread_uid'],$money,$level,$eq,$up_level);
return true;
}边栏推荐
- 设置图片的透明度从左到右渐变
- R语言dplyr包summarise_at函数计算dataframe数据中多个数据列(通过向量指定)的计数个数、均值和中位数、在每个函数内部指定na.rm参数、通过list指定函数列表
- R language uses the scale function to scale the input data of neural network to the minimum and maximum, scale the data to between 0 and 1, and divide the data set into training set and test set
- plt.gca()画框及打标签
- [regression analysis] understand ridge regression with case teaching
- 15. Notes on the button style of WPF
- Hook technology
- SDN系统方法 | 9. 接入网
- The first techo day Tencent technology open day in 2022 will be held online on June 28
- What is principal component analysis? Dimension reduction of classical case analysis variables
猜你喜欢

Installation and removal of MySQL under Windows
![[data midrange] what is the oneid of the data midrange? Isn't the master data fragrant?](/img/51/9aceaaeed1f6db7c60685d53477eba.png)
[data midrange] what is the oneid of the data midrange? Isn't the master data fragrant?

2022年首期Techo Day腾讯技术开放日将于6月28日线上举办

The source code of the hottest online disk money making system in 2022 imitates Lanzou online disk / Chengtong online disk / sharing money making cloud disk system / online disk VIP Download System

Explanation of ideas and sharing of pre-processing procedures for 2021 US game D (with pre-processing data code)

What are redis avalanche, penetration and breakdown?

Windows下MySQL的安装和删除

devsecops与devops的理解与建设

黑馬暢購商城---3.商品管理

Dark horse shopping mall ---6 Brand, specification statistics, condition filtering, paging sorting, highlighting
随机推荐
R language dplyr package summary_ The at function calculates the count number, mean and median of multiple data columns (specified by vectors) in the dataframe data, and specifies na RM parameter, spe
confluence7.4.X升级实录
ARM V7 ldr str 内存访问
网络 | 衡量网络好坏的指标及测试方法
Uncover gaussdb (for redis): comprehensive comparison of CODIS
Hook技术
Installation and removal of MySQL under Windows
揭秘GaussDB(for Redis):全面对比Codis
JS monitors the width and height changes of div
devsecops与devops的理解与建设
Set the transparency of the picture to gradient from left to right
Kotlin Foundation
Dark horse shopping mall ---8 Microservice gateway and JWT token
Dark horse shopping mall ---3 Commodity management
The source code of the hottest online disk money making system in 2022 imitates Lanzou online disk / Chengtong online disk / sharing money making cloud disk system / online disk VIP Download System
An example of using dynamic datalist
MYSQL中对复杂JSON的更新
SDN system method | 9 Access network
Why can't you Ping the website but you can access it?
K8s, docker compose install MySQL 8.0.18