Explorar o código

黑名单用户禁止下单

Tree hai 2 semanas
pai
achega
b655839588
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      app/Http/Controllers/Game/PaymentEntryController.php

+ 6 - 0
app/Http/Controllers/Game/PaymentEntryController.php

@@ -6,6 +6,7 @@ namespace App\Http\Controllers\Game;
 
 use App\Facade\TableName;
 use App\Http\Controllers\Api\BroQrController;
+use App\Models\Account\UserBlacklist;
 use App\Notification\TelegramBot;
 use App\Services\PayMentService;
 use Illuminate\Http\Request;
@@ -44,6 +45,11 @@ class PaymentEntryController {
 //        ];
 
 
+        $exists = UserBlacklist::where('UserID', $userId)->first();
+        if ($exists){
+            return apiReturnFail(['web.payment.paytype_error','User In Control']);
+        }
+
 
         // 退款订单限制(仅在 pay_method = 2 时生效)
         if ((int)$pay_method === 2) {