|
@@ -212,7 +212,7 @@ class Alltools {
|
|
|
$intro_userinfo = DB::table('mt_user')->select(['id','username','group_id','intro_uid','invite_uid','agent_id','gender'])->where('id',$userinfo->intro_uid)->first();
|
|
|
if(empty($intro_userinfo)){return true;}
|
|
|
|
|
|
- //上级是二级邀请B1,本人C1,贡献给B和A(表面上说B的钱在A那里,但是有记录,有总额,不能提现即可)
|
|
|
+ //上级是二级邀请B1,本人C1,贡献给B的上级A
|
|
|
if($intro_userinfo->group_id == 2){
|
|
|
|
|
|
//充值者上上级,也就是A
|
|
@@ -235,7 +235,21 @@ class Alltools {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ //上级是A1
|
|
|
+ if($intro_userinfo->group_id == 3){
|
|
|
+
|
|
|
+ $recharge_c2a_rate = $config_site['recharge_c2a_rate'];//b2a 与 b02a相等
|
|
|
+ $jewelA = bcdiv(bcmul($gold,$recharge_c2a_rate),100);
|
|
|
|
|
|
+ $result = $this->lockChangeAccountRemain($intro_userinfo->id,'agentjewel',$jewelA,51, $userinfo->username.'充值','pay_order',$payorder_id);
|
|
|
+ if($result['status']===false)
|
|
|
+ {
|
|
|
+ //Db::rollback();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;//结束了
|
|
|
+ }
|
|
|
|
|
|
//上级是普通用户,那自己肯定也是普通,则上级可能是D1、C1,找到上上级,如果也是普通C1,停止。如果上上级是B1,则一直追到A1
|
|
|
if(1 == 2 && $intro_userinfo->group_id == 1){
|