Browse Source

fixed:用户端-钱包明细

刘学玺 4 months ago
parent
commit
68178cdfce
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Services/Client/WalletService.php

+ 2 - 2
app/Services/Client/WalletService.php

@@ -2,6 +2,7 @@
 
 namespace App\Services\Client;
 
+use App\Enums\UserStatus;
 use App\Models\MemberUser;
 use Illuminate\Support\Facades\Log;
 
@@ -25,11 +26,10 @@ class WalletService
             // 检查用户是否存在
             abort_if(! $user, 400, '用户不存在');
             // 检查用户状态
-            abort_if($user->state !== 'enable', 400, '用户状态异常');
+            abort_if($user->state != UserStatus::OPEN->value, 400, '用户状态异常');
 
             // 获取钱包交易记录
             $records = $user->wallet->transRecords()
-                ->where('state', 'enable')
                 ->orderBy('created_at', 'desc')
                 ->paginate($perPage);