From 4d22315862413fdef4dbd48fe11604d31b510679 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Sun, 9 Nov 2025 11:22:00 +0800 Subject: [PATCH] no message --- src/Services/Cron/Cron.php | 32 -------------------------------- src/Services/Tg/ReportUser.php | 4 ++++ 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/src/Services/Cron/Cron.php b/src/Services/Cron/Cron.php index 13572347e..f7339d680 100755 --- a/src/Services/Cron/Cron.php +++ b/src/Services/Cron/Cron.php @@ -248,38 +248,6 @@ final class Cron (new Telegram())->send(0, $sMsg); } - -// public static function visitorCount(): void -// { -// $oVisitor = Visitor::select('from', DB::raw('count(*) as count')) -// ->groupBy('from') -// ->get(); -// -// foreach ($oVisitor as $row) { -// -// $oCountVisitor = new CountVisitor(); -// $oCountVisitor->from = $row->from; -// $oCountVisitor->count = $row->count; -// $oCountVisitor->date = date('Y-m-d', strtotime('-1 day')); -// $oCountVisitor->save(); -// -// } -// -// Visitor::truncate(); -// -// // tg报表 -// $aCountVisitor = CountVisitor::where('date', date('Y-m-d', strtotime('-1 day')))->get()->toArray(); -// -// $sTgReport = ''; -// foreach ($aCountVisitor as $row) { -// -// $sTgReport .= $row["from"].":".$row["count"]."\n"; -// -// } -// -// (new Telegram())->send(0, $sTgReport); -// -// } // 限制帐户检测 public static function detectInactiveUser(): void diff --git a/src/Services/Tg/ReportUser.php b/src/Services/Tg/ReportUser.php index cbc3975c3..f194f2308 100755 --- a/src/Services/Tg/ReportUser.php +++ b/src/Services/Tg/ReportUser.php @@ -112,6 +112,10 @@ final class ReportUser $iMoneyRate = 0; foreach ($aData as $row) { + if (!$row['count_reg'] && !$row['count_pay']) { + continue; + } + if ($iTotalFromCount) { $iFromRate = (int)(($row['count_from'] / $iTotalFromCount) * 100); }