sunhao 5 years ago
parent
commit
3a889808d0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Console/Commands/OrderRateByDay.php

+ 2 - 2
app/Console/Commands/OrderRateByDay.php

@@ -63,9 +63,9 @@ class OrderRateByDay extends Command {
63 63
      */
64 64
     public function updateData($idate, $rate, $date){
65 65
         #当前月
66
-        $month = date('Y-m');
66
+        $month = date('Y-m', strtotime($date));
67 67
         #当月1号
68
-        $month_first = date('Y-m-1');
68
+        $month_first = date('Y-m-01', strtotime($date));
69 69
         $data = array();
70 70
         #如果是昨天的数据(或昨天是当月一号)直接插入
71 71
         if($idate == $date || $date == $month_first){