update onetime package

This commit is contained in:
Tokumeikoi 2020-03-01 23:29:49 +08:00
parent 60b197410c
commit 47d8dfd7c8
3 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -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([

View File

@ -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([