diff --git a/app/Console/Commands/CheckOrder.php b/app/Console/Commands/CheckOrder.php index 6c726df1..1b153de4 100755 --- a/app/Console/Commands/CheckOrder.php +++ b/app/Console/Commands/CheckOrder.php @@ -103,7 +103,7 @@ class CheckOrder extends Command $user->d = 0; $user->plan_id = $plan->id; $user->group_id = $plan->group_id; - $user->expired_at = 0; + $user->expired_at = NULL; if ($user->save()) { $order->status = 3; $order->save(); diff --git a/app/Services/ServerService.php b/app/Services/ServerService.php index 13277bb8..c588de3e 100644 --- a/app/Services/ServerService.php +++ b/app/Services/ServerService.php @@ -12,7 +12,7 @@ class ServerService ->whereRaw('u + d < transfer_enable') ->where(function ($query) { $query->where('expired_at', '>=', time()) - ->orWhere('expired_at', 0); + ->orWhere('expired_at', NULL); }) ->where('enable', 1) ->select([ diff --git a/app/Services/UserService.php b/app/Services/UserService.php index a110d342..c8c48a3e 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -8,7 +8,7 @@ class UserService { public function isAvailable(User $user) { - if ($user->enable && $user->transfer_enable && ($user->expired_at > time() || $user->expired_at == 0)) { + if ($user->enable && $user->transfer_enable && ($user->expired_at > time() || $user->expired_at === NULL)) { return true; } return false; @@ -19,7 +19,7 @@ class UserService return User::whereRaw('u + d < transfer_enable') ->where(function ($query) { $query->where('expired_at', '>=', time()) - ->orWhere('expired_at', 0); + ->orWhere('expired_at', NULL); }) ->where('enable', 1) ->select([