sunhao 5 年之前
父節點
當前提交
3a889808d0
共有 1 個文件被更改,包括 2 次插入2 次删除
  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){