diff --git a/src/Services/Cron.php b/src/Services/Cron.php index ac3f47bbc..265e338ab 100755 --- a/src/Services/Cron.php +++ b/src/Services/Cron.php @@ -299,18 +299,20 @@ final class Cron // 确保时间比较的正确性 if (isset($oUser->reg_date) && ($row['update_time'] - strtotime($oUser->reg_date)) < (86400 * 30)) { $aUserMix[$sFrom]['pay_count_new']++; - $aUserMix[$sFrom]['money_count_new'] += $row["price"]; + $aUserMix[$sFrom]['money_count_new'] += $row["user_price"]; } else { $aUserMix[$sFrom]['pay_count_old']++; - $aUserMix[$sFrom]['money_count_old'] += $row["price"]; + $aUserMix[$sFrom]['money_count_old'] += $row["user_price"]; } $aUserMix[$sFrom]['pay_count']++; - $aUserMix[$sFrom]['money_count'] += $row["price"]; + $aUserMix[$sFrom]['money_count'] += $row["user_price"]; } $aAllMix = array_merge($aVisitorMix, $aRegMix, $aUserMix); + CountUser::where("date", $sPrevDate)->delete(); + foreach ($aAllMix as $k => $v) { $oCountUserModel = new CountUser(); @@ -330,7 +332,8 @@ final class Cron Visitor::truncate(); - $sMsg = (new ReportUser())->ByDay(1); +// $sMsg = (new ReportUser())->ByDay(1); + $sMsg = (new ReportUser())->ByDate($sPrevDate); (new Telegram())->send(0, $sMsg); } diff --git a/src/Services/Cron/Cron.php b/src/Services/Cron/Cron_meiyong.php similarity index 100% rename from src/Services/Cron/Cron.php rename to src/Services/Cron/Cron_meiyong.php