Przeglądaj źródła

发布关系被绑定,发布者获益

lizhen_gitee 1 rok temu
rodzic
commit
037f7f132f

+ 7 - 5
application/api/controller/Notifynew.php

@@ -86,11 +86,13 @@ class Notifynew extends Api
         if($userinfo['pre_userid']){
             $bili = config('site.introsite_recharge_intro_bili') ?: 3;
             $jewel = bcdiv(bcmul($args['jewel'],$bili,0),100,0);
-            $result = model('Wallet')->lockChangeAccountRemain($userinfo['pre_userid'],$jewel,'+',0,$userinfo['nickname'].'充值金币返奖励',2,'jewel');
-            if($result['status']===false)
-            {
-                Db::rollback();
-                return false;
+            if($jewel > 0){
+                $result = model('Wallet')->lockChangeAccountRemain($userinfo['pre_userid'],$jewel,'+',0,$userinfo['nickname'].'充值金币返奖励',2,'jewel');
+                if($result['status']===false)
+                {
+                    Db::rollback();
+                    return false;
+                }
             }
         }
         //逻辑结束

+ 13 - 0
application/api/controller/Relation.php

@@ -103,6 +103,19 @@ class Relation extends Api
                 Db::rollback();
                 $this->error($rs_wallet['msg']);
             }
+
+            //给发布关系的人钱
+            $bili = config('site.relation_joinin_platbili') ?: 30;
+            $get_bili = 100-$bili;
+            $jewel = bcdiv(bcmul($info['price'],$get_bili,0),100,0);
+            if($jewel > 0){
+                $rs_wallet = model('wallet')->lockChangeAccountRemain($info['uid'],$jewel,'+',0,'发布关系被绑定',35,'jewel');
+                if($rs_wallet['status'] === false){
+                    Db::rollback();
+                    $this->error($rs_wallet['msg']);
+                }
+            }
+
         }
 
         Db::commit();

+ 3 - 4
application/extra/site.php

@@ -70,14 +70,13 @@ return [
         .'3、提现扣除手续费1‰ '."\r\n"
         .'4、相关额度会在1个工作日内审核发放,请注意查收',
     'introsite_activeinfo' => '好友充值:'."\r\n"
-        .'好友充值后获得充值额对应的10%金币奖励'."\r\n"
-        .'好友收益:'."\r\n"
-        .'好友产生收益后获得其收益额对应的10%金 币奖励',
+        .'好友充值后获得充值额对应的3%金币奖励',
     'introsite_introrule' => '1、所有用户都可以参加邀请好友活动'."\r\n"
-        .'2、通过自己分享的活动页面地址下载注册成功,即发放注册奖励,若好友充值即奖励充值 金额的10%。',
+        .'2、通过自己分享的活动页面地址下载注册成功,即发放注册奖励,若好友充值即奖励充值 金额的3%。',
     'min_withdrawal_money' => '1',
     'max_withdrawal_money' => '10000',
     'withdrawal_plat_bili' => '6',
     'gift_plat_scale' => '15',
     'introsite_recharge_intro_bili' => '3',
+    'relation_joinin_platbili' => '30',
 ];

+ 1 - 0
application/extra/wallet.php

@@ -20,6 +20,7 @@ return [
         21 => '赠送礼物爆币', //增加
         32 => '购买家族卡', //减少
         33 => '充值', //增加 ios
+        35 => '发布关系被绑定', //增加
 
         //money
         101 => '获赠礼物', //增加