From 742070e7fc31a1c304737b8c9f3924ffa253a631 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Sun, 30 Mar 2025 21:03:38 +0800 Subject: [PATCH] no message --- src/Services/Cron.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Services/Cron.php b/src/Services/Cron.php index 18941689..f3c01681 100755 --- a/src/Services/Cron.php +++ b/src/Services/Cron.php @@ -67,13 +67,13 @@ final class Cron public static function userCount(): void { - $sPrevDate = date("Y-m-d", strtotime("-2 day")); - $sPrevDateStart = date("Y-m-d 00:00:00", strtotime("-2 day")); - $sPrevDateEnd = date("Y-m-d 23:59:59", strtotime("-2 day")); + $sPrevDate = date("Y-m-d", strtotime("-1 day")); + $sPrevDateStart = date("Y-m-d 00:00:00", strtotime("-1 day")); + $sPrevDateEnd = date("Y-m-d 23:59:59", strtotime("-1 day")); $sPrevTimeStart = strtotime($sPrevDateStart); $sPrevTimeEnd = strtotime($sPrevDateEnd); $sPrevDate30 = date("Y-m-d", strtotime("-30 day")); - echo "
";
+// echo "";
//// 访客统计 start
$aVisitorCount = Visitor::select('from', DB::raw('count(*) as count'))
@@ -159,19 +159,19 @@ final class Cron
$oCountUserModel->from = $k;
$oCountUserModel->count_from = $aVisitorMix[$k]['count'] ?? 0;
$oCountUserModel->count_reg = $aRegMix[$k]['count'] ?? 0;
- $oCountUserModel->count_pay = $UserMix[$k]['pay_count'] ?? 0;
- $oCountUserModel->count_pay_new = $UserMix[$k]['pay_count_new'] ?? 0;
- $oCountUserModel->count_pay_old = $UserMix[$k]['pay_count_old'] ?? 0;
- $oCountUserModel->count_money = $UserMix[$k]['money_count'] ?? 0;
- $oCountUserModel->count_money_new = $UserMix[$k]['money_count_new'] ?? 0;
- $oCountUserModel->count_money_old = $UserMix[$k]['money_count_old'] ?? 0;
+ $oCountUserModel->count_pay = $aUserMix[$k]['pay_count'] ?? 0;
+ $oCountUserModel->count_pay_new = $aUserMix[$k]['pay_count_new'] ?? 0;
+ $oCountUserModel->count_pay_old = $aUserMix[$k]['pay_count_old'] ?? 0;
+ $oCountUserModel->count_money = $aUserMix[$k]['money_count'] ?? 0;
+ $oCountUserModel->count_money_new = $aUserMix[$k]['money_count_new'] ?? 0;
+ $oCountUserModel->count_money_old = $aUserMix[$k]['money_count_old'] ?? 0;
$oCountUserModel->date = $sPrevDate;
$r = $oCountUserModel->save();
}
- var_dump($r);
+ var_dump($aUserMix);
exit;
Visitor::truncate();