shish 4 years ago
parent
commit
e11e7d4195
1 changed files with 3 additions and 5 deletions
  1. 3 5
      console/controllers/GlobalController.php

+ 3 - 5
console/controllers/GlobalController.php

@@ -30,17 +30,15 @@ class GlobalController extends Controller
             OrderClass::newOrderFromQueueDone();
         }
 
-        //每天凌晨0:10保存昨天访客数
-        //$hour = '0010';
+        //每天凌晨00:10保存昨天访客数
         if ($hour == '0010') {
             $shopList = ShopClass::getAllByCondition(['ptStyle' => 2], null, '*', null, true);
             if (!empty($shopList)) {
                 foreach ($shopList as $shop) {
-
+                    //昨天
                     $date = date("Ymd", strtotime("-1 day"));
-
+                    //今天
                     //$date = date("Ymd");
-
                     $visitNum = StatVisitClass::getVisitNum($shop, $date);
                     $currentNum = bcadd($shop->totalVisit, $visitNum, 2);
                     $shop->totalVisit = $currentNum;