mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-26 20:52:44 +08:00
Merge branch 'koogua/v1.3.5' into demo
This commit is contained in:
commit
0ceab1885a
@ -334,7 +334,7 @@ class Stat extends Service
|
|||||||
foreach ($dates as $date) {
|
foreach ($dates as $date) {
|
||||||
$key = substr($date, -2);
|
$key = substr($date, -2);
|
||||||
if ($date < $currDate) {
|
if ($date < $currDate) {
|
||||||
$list[$key] = $statRepo->countDailyRegisteredUser($date);
|
$list[$key] = $statRepo->countDailyRegisteredUsers($date);
|
||||||
} elseif ($date == $currDate) {
|
} elseif ($date == $currDate) {
|
||||||
$list[$key] = -999;
|
$list[$key] = -999;
|
||||||
} else {
|
} else {
|
||||||
@ -347,13 +347,13 @@ class Stat extends Service
|
|||||||
|
|
||||||
foreach ($list as $key => $value) {
|
foreach ($list as $key => $value) {
|
||||||
if ($value < 0) {
|
if ($value < 0) {
|
||||||
$list[$key] = $statRepo->countDailyRegisteredUser("{$year}-{$month}-{$key}");
|
$list[$key] = $statRepo->countDailyRegisteredUsers("{$year}-{$month}-{$key}");
|
||||||
$redis->hSet($keyName, $key, $list[$key]);
|
$redis->hSet($keyName, $key, $list[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isCurrMonth($year, $month)) {
|
if ($this->isCurrMonth($year, $month)) {
|
||||||
$list[$currDay] = $statRepo->countDailyRegisteredUser($currDate);
|
$list[$currDay] = $statRepo->countDailyRegisteredUsers($currDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $list;
|
return $list;
|
||||||
@ -377,7 +377,7 @@ class Stat extends Service
|
|||||||
foreach ($dates as $date) {
|
foreach ($dates as $date) {
|
||||||
$key = substr($date, -2);
|
$key = substr($date, -2);
|
||||||
if ($date < $currDate) {
|
if ($date < $currDate) {
|
||||||
$list[$key] = $statRepo->countDailyOnlineUser($date);
|
$list[$key] = $statRepo->countDailyOnlineUsers($date);
|
||||||
} elseif ($date == $currDate) {
|
} elseif ($date == $currDate) {
|
||||||
$list[$key] = -999;
|
$list[$key] = -999;
|
||||||
} else {
|
} else {
|
||||||
@ -390,13 +390,13 @@ class Stat extends Service
|
|||||||
|
|
||||||
foreach ($list as $key => $value) {
|
foreach ($list as $key => $value) {
|
||||||
if ($value < 0) {
|
if ($value < 0) {
|
||||||
$list[$key] = $statRepo->countDailyOnlineUser("{$year}-{$month}-{$key}");
|
$list[$key] = $statRepo->countDailyOnlineUsers("{$year}-{$month}-{$key}");
|
||||||
$redis->hSet($keyName, $key, $list[$key]);
|
$redis->hSet($keyName, $key, $list[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isCurrMonth($year, $month)) {
|
if ($this->isCurrMonth($year, $month)) {
|
||||||
$list[$currDay] = $statRepo->countDailyOnlineUser($currDate);
|
$list[$currDay] = $statRepo->countDailyOnlineUsers($currDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $list;
|
return $list;
|
||||||
|
@ -90,7 +90,7 @@ class Stat extends Repository
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function countDailyOnlineUser($date)
|
public function countDailyOnlineUsers($date)
|
||||||
{
|
{
|
||||||
$startTime = strtotime($date);
|
$startTime = strtotime($date);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user