From 713a39314e130dbf13dccc19932bcf2a437c8c35 Mon Sep 17 00:00:00 2001 From: koogua Date: Thu, 20 May 2021 19:43:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=BB=9F=E8=AE=A1=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E6=96=B9=E6=B3=95=E5=90=8D=E5=8D=95=E5=A4=8D=E6=95=B0?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Admin/Services/Stat.php | 12 ++++++------ app/Repos/Stat.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Http/Admin/Services/Stat.php b/app/Http/Admin/Services/Stat.php index bacb6858..d635227c 100644 --- a/app/Http/Admin/Services/Stat.php +++ b/app/Http/Admin/Services/Stat.php @@ -334,7 +334,7 @@ class Stat extends Service foreach ($dates as $date) { $key = substr($date, -2); if ($date < $currDate) { - $list[$key] = $statRepo->countDailyRegisteredUser($date); + $list[$key] = $statRepo->countDailyRegisteredUsers($date); } elseif ($date == $currDate) { $list[$key] = -999; } else { @@ -347,13 +347,13 @@ class Stat extends Service foreach ($list as $key => $value) { if ($value < 0) { - $list[$key] = $statRepo->countDailyRegisteredUser("{$year}-{$month}-{$key}"); + $list[$key] = $statRepo->countDailyRegisteredUsers("{$year}-{$month}-{$key}"); $redis->hSet($keyName, $key, $list[$key]); } } if ($this->isCurrMonth($year, $month)) { - $list[$currDay] = $statRepo->countDailyRegisteredUser($currDate); + $list[$currDay] = $statRepo->countDailyRegisteredUsers($currDate); } return $list; @@ -377,7 +377,7 @@ class Stat extends Service foreach ($dates as $date) { $key = substr($date, -2); if ($date < $currDate) { - $list[$key] = $statRepo->countDailyOnlineUser($date); + $list[$key] = $statRepo->countDailyOnlineUsers($date); } elseif ($date == $currDate) { $list[$key] = -999; } else { @@ -390,13 +390,13 @@ class Stat extends Service foreach ($list as $key => $value) { if ($value < 0) { - $list[$key] = $statRepo->countDailyOnlineUser("{$year}-{$month}-{$key}"); + $list[$key] = $statRepo->countDailyOnlineUsers("{$year}-{$month}-{$key}"); $redis->hSet($keyName, $key, $list[$key]); } } if ($this->isCurrMonth($year, $month)) { - $list[$currDay] = $statRepo->countDailyOnlineUser($currDate); + $list[$currDay] = $statRepo->countDailyOnlineUsers($currDate); } return $list; diff --git a/app/Repos/Stat.php b/app/Repos/Stat.php index 393fffc7..2bc18afb 100644 --- a/app/Repos/Stat.php +++ b/app/Repos/Stat.php @@ -90,7 +90,7 @@ class Stat extends Repository ]); } - public function countDailyOnlineUser($date) + public function countDailyOnlineUsers($date) { $startTime = strtotime($date);