|
@@ -73,6 +73,7 @@ class Notifynew extends Api
|
|
|
}
|
|
|
|
|
|
//逻辑开始
|
|
|
+ //加钱
|
|
|
$args = json_decode($orderInfo['args'],true);
|
|
|
$result = model('Wallet')->lockChangeAccountRemain($orderInfo['user_id'],$args['jewel'],'+',0,'金币充值',1,'jewel');
|
|
|
if($result['status']===false)
|
|
@@ -80,6 +81,18 @@ class Notifynew extends Api
|
|
|
Db::rollback();
|
|
|
return false;
|
|
|
}
|
|
|
+ //找到上级用户并加钱
|
|
|
+ $userinfo = Db::name('user')->where('id',$orderInfo['user_id'])->field('id,nickname,pre_userid')->find();
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ }
|
|
|
//逻辑结束
|
|
|
|
|
|
//状态
|