no message
This commit is contained in:
1 parent
a92d2f94b1
commit
bcd9a2d2a9
3 files changed
+35
-35
No files matched your search
+31
-31
@@ -176,37 +176,37 @@ final class Cron
|
||||
Visitor::truncate();
|
||||
}
|
||||
|
||||
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 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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user