当前位置:网站首页>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;
}
边栏推荐
- Understanding and construction of devsecops and Devops
- 【数据中台】数据中台的OneID是个什么鬼,主数据它不香吗?
- Gradle knowledge points
- How can we make an annual income of onemillion yuan by making our own media video?
- ECSHOP commodity wholesale multi attribute multi specification multi inventory batch purchase ECSHOP wholesale plug-in ECSHOP multi attribute order
- 黑马畅购商城---6.品牌、规格统计、条件筛选、分页排序、高亮显示
- The dist function of R language calculates the distance between two samples in dataframe data, returns the distance matrix between samples, and specifies the distance calculation method through the me
- 如果你也想做自媒体,不妨听大周给您点建议
- Kotlin学习笔记
- 网络上开户买股票是否安全呢?
猜你喜欢
Dark horse shopping mall ---8 Microservice gateway and JWT token
黑马畅购商城---6.品牌、规格统计、条件筛选、分页排序、高亮显示
SDN system method | 9 Access network
一款好用的印章设计工具 --(可转为ofd文件)
Time series analysis - how to use unit root test (ADF) correctly?
[data midrange] what is the oneid of the data midrange? Isn't the master data fragrant?
Windows下MySQL的安装和删除
What is Flink? What can Flink do?
【OceanBase】OceanBase简介及其与MySQL的比较
[regression analysis] understand ridge regression with case teaching
随机推荐
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
R language dplyr package filter function filters the data rows in the specified list whose contents in the dataframe data are not (not equal to one of the specified vectors)
ECSHOP video list_ ECSHOP uploading video, video classification, video list playing video function
The R language uses the follow up The plot function visualizes the longitudinal follow-up map of multiple ID (case) monitoring indicators, and uses stress The type parameter specifies the line type of
R语言使用nnet包的multinom函数构建无序多分类logistic回归模型、使用epiDisplay包的lrtest函数执行多个模型似然比检验对比两个模型的性能是否有差异
Mysql database logs binlog save aging (expire\u logs\u days)
Quarkus SaaS dynamic data source switching implementation, simple and perfect
Full nanny tutorial of Market Research Competition (experience sharing)
R语言使用epiDisplay包的followup.plot函数可视化多个ID(病例)监测指标的纵向随访图、使用stress.type参数指定强调线的id子集的线条的类型(type)
实现领域驱动设计 - 使用ABP框架 - 系列文章汇总
R语言dist函数计算dataframe数据中两两样本之间的距离返回样本间距离矩阵,通过method参数指定距离计算的方法、例如欧几里得距离
设置图片的透明度从左到右渐变
K8s, docker compose install MySQL 8.0.18
R语言caTools包进行数据划分、scale函数进行数据缩放、e1071包的naiveBayes函数构建朴素贝叶斯模型
Arm V7 coprocessor
thinkphp3.2.5 GIF. class. php for php7.4
The whole page turns gray
R语言使用scale函数对神经网络的输入数据进行最小最大缩放、把数据缩放到0到1之间、并划分数据集为训练集和测试集
confluence7.4. X upgrade record
19、wpf之事件转命令实现MVVM架构