mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 17:31:49 +08:00 
			
		
		
		
	update
This commit is contained in:
		| @@ -2,6 +2,7 @@ | ||||
|  | ||||
| namespace App\Services; | ||||
|  | ||||
| use App\Models\Order; | ||||
| use App\Models\User; | ||||
|  | ||||
| class UserService | ||||
| @@ -63,4 +64,15 @@ class UserService | ||||
|         } | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     public function isNotCompleteOrderByUserId(int $userId):bool | ||||
|     { | ||||
|         $order = Order::whereIn('status', [0, 1]) | ||||
|             ->where('user_id', $userId) | ||||
|             ->first(); | ||||
|         if (!$order) { | ||||
|             return false; | ||||
|         } | ||||
|         return true; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user