1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-26 12:23:06 +08:00

Merge branch 'koogua/v1.3.5' into demo

This commit is contained in:
koogua 2021-05-20 19:44:25 +08:00
commit 0ceab1885a
2 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -90,7 +90,7 @@ class Stat extends Repository
]);
}
public function countDailyOnlineUser($date)
public function countDailyOnlineUsers($date)
{
$startTime = strtotime($date);