|
@@ -160,14 +160,16 @@ class Alltools {
|
|
|
|
|
|
//D2C,C2A
|
|
|
$invite_info = DB::table('mt_user')->select(['id','username','group_id','intro_uid','invite_uid','agent_id','gender'])->where('id',$userinfo->invite_uid)->first();
|
|
|
- if(!empty($invite_info['intro_uid']) && $times == 0){
|
|
|
+ if(!empty($invite_info->intro_uid) && $times == 0){
|
|
|
$times = 1;//可以执行的次数
|
|
|
- $this->recharge($userinfo->invite_uid,$jewel,'pay_order',$payorder_id,$remark,$times);
|
|
|
+
|
|
|
+ $recharge_rs = $this->recharge($userinfo->invite_uid,$jewel,'pay_order',$payorder_id,$invite_info['username'].'邀请'.$remark,$times);
|
|
|
+ return $recharge_rs;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//没有推荐人,女性充值不返
|
|
|
- if(empty($userinfo->intro_uid) || $userinfo->gender == 0){
|
|
|
+ if(empty($userinfo->intro_uid) || ($userinfo->gender == 0 && $times == 0)){
|
|
|
return true;
|
|
|
}
|
|
|
|