mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
opt
This commit is contained in:
parent
35917ad199
commit
00c2dee361
@ -66,13 +66,16 @@ class ResetTraffic extends Command
|
||||
private function resetByExpireDay($user):void
|
||||
{
|
||||
$lastDay = date('d', strtotime('last day of +0 months'));
|
||||
$users = [];
|
||||
foreach ($user->get() as $item) {
|
||||
$expireDay = date('d', $item->expired_at);
|
||||
if ($expireDay === date('d') || (string)$lastDay === '29' || (string)$lastDay === '30') {
|
||||
$item->u = 0;
|
||||
$item->d = 0;
|
||||
$item->save();
|
||||
array_push($users, $item->id);
|
||||
}
|
||||
}
|
||||
$user->whereIn('id', $users)->update([
|
||||
'u' => 0,
|
||||
'd' => 0
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
2
public/assets/admin/umi.js
vendored
2
public/assets/admin/umi.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user