This commit is contained in:
Tokumeikoi 2020-03-06 16:21:08 +08:00
parent dbf73f3a38
commit 6b7cea671d
2 changed files with 4 additions and 3 deletions

View File

@ -52,15 +52,16 @@ class ResetTraffic extends Command
} }
} }
private function resetByMonthFirstDay(User $user):void private function resetByMonthFirstDay($user):void
{ {
if ((string)date('d') !== '1') return
$user->update([ $user->update([
'u' => 0, 'u' => 0,
'd' => 0 'd' => 0
]); ]);
} }
private function resetByExpireDay(User $user):void private function resetByExpireDay($user):void
{ {
$date = date('Y-m-d', time()); $date = date('Y-m-d', time());
$startAt = strtotime((string)$date); $startAt = strtotime((string)$date);

File diff suppressed because one or more lines are too long