Your Name il y a 3 ans
Parent
commit
b600abd484
1 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 8 1
      service/bill/lib/Cron.php

+ 8 - 1
service/bill/lib/Cron.php

@@ -483,7 +483,14 @@ class Cron
     }
     }
     #归店统计
     #归店统计
     public function shop_stat_api(){
     public function shop_stat_api(){
-        $month = Dever::input('month', date('Y-m'));
+        $month = Dever::input('month');
+        $y = date('Y');
+        $m = date('m')-1;
+        if($month){
+            $month = $month;
+        }else{
+            $month = $y.'-'.'0'.$m;
+        }
         $start_time = $month .'-01 00:00:00';
         $start_time = $month .'-01 00:00:00';
         $end_time = date('Y-m-d', strtotime($start_time. ' +1 month -1 day')).' 23:59:59';
         $end_time = date('Y-m-d', strtotime($start_time. ' +1 month -1 day')).' 23:59:59';
         $start = Dever::maketime($start_time);
         $start = Dever::maketime($start_time);