当前位置:网站首页>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;
    }

原网站

版权声明
本文为[Procedure 15528175269]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202200532044647.html

随机推荐