|
@@ -6,6 +6,7 @@ namespace App\Http\Controllers\Api;
|
|
|
|
|
|
use App\Models\PaymentLogModel;
|
|
use App\Models\PaymentLogModel;
|
|
use App\Models\User;
|
|
use App\Models\User;
|
|
|
|
+use App\Models\UserInviteLog;
|
|
use App\Models\UserVipLogModel;
|
|
use App\Models\UserVipLogModel;
|
|
use App\Services\PayService;
|
|
use App\Services\PayService;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\DB;
|
|
@@ -96,6 +97,16 @@ class PayNotifyController extends Controller
|
|
$user_vip_log->status = 1;
|
|
$user_vip_log->status = 1;
|
|
$user_vip_log->save();
|
|
$user_vip_log->save();
|
|
}
|
|
}
|
|
|
|
+ //赠送上级会员天数
|
|
|
|
+ if($user->pid>0){
|
|
|
|
+ //赠送会员天数
|
|
|
|
+ UserInviteLog::query()->create([
|
|
|
|
+ 'user_id'=>$user->pid,
|
|
|
|
+ 'invite_id'=>$user->id,
|
|
|
|
+ 'day'=>2,
|
|
|
|
+ 'status'=>0,
|
|
|
|
+ ]);
|
|
|
|
+ }
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|