xielin преди 5 години
родител
ревизия
063e9a2247
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      app/Console/Commands/PostStatistics.php

+ 1 - 1
app/Console/Commands/PostStatistics.php

@@ -137,7 +137,7 @@ class PostStatistics extends Command
         $data['like_count'] = $likeCount;
         $data['collect_count'] = $collectCount;
         $data['comment_count'] = $commentCount;
-        $data['created_at'] = $yesterdayStart;
+        $data['created_at'] = Carbon::yesterday()->toDateTimeString();
         $this->postStatistics->create($data);
         Log::info(date('Y-m-d H:i:s').'统计'.$yesterdayStart.'最终记录数据:'.json_encode($data));
     }