mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
1.2.4
This commit is contained in:
parent
1fc9f94dad
commit
075f7b39a8
@ -69,11 +69,16 @@ class ResetTraffic extends Command
|
||||
$users = [];
|
||||
foreach ($user->get() as $item) {
|
||||
$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);
|
||||
}
|
||||
}
|
||||
$user->whereIn('id', $users)->update([
|
||||
User::whereIn('id', $users)->update([
|
||||
'u' => 0,
|
||||
'd' => 0
|
||||
]);
|
||||
|
Loading…
Reference in New Issue
Block a user