mirror of
https://github.com/v2board/v2board.git
synced 2025-02-25 14:50:26 +08:00
1.2.4
This commit is contained in:
parent
1fc9f94dad
commit
075f7b39a8
@ -69,11 +69,16 @@ class ResetTraffic extends Command
|
|||||||
$users = [];
|
$users = [];
|
||||||
foreach ($user->get() as $item) {
|
foreach ($user->get() as $item) {
|
||||||
$expireDay = date('d', $item->expired_at);
|
$expireDay = date('d', $item->expired_at);
|
||||||
if ($expireDay === date('d') || (string)$lastDay === '29' || (string)$lastDay === '30') {
|
$today = date('d');
|
||||||
|
if ($expireDay === $today) {
|
||||||
|
array_push($users, $item->id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($today === $lastDay) && in_array($expireDay, ['29', '30', '31'])) {
|
||||||
array_push($users, $item->id);
|
array_push($users, $item->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$user->whereIn('id', $users)->update([
|
User::whereIn('id', $users)->update([
|
||||||
'u' => 0,
|
'u' => 0,
|
||||||
'd' => 0
|
'd' => 0
|
||||||
]);
|
]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user