Browse Source

摄像头状态历史数据

任敬轩 1 năm trước cách đây
mục cha
commit
c745bc617f
1 tập tin đã thay đổi với 2 bổ sung4 xóa
  1. 2 4
      app/Console/Commands/CameraStatusHistory.php

+ 2 - 4
app/Console/Commands/CameraStatusHistory.php

@@ -67,8 +67,7 @@ class CameraStatusHistory extends Command
         $ningmei['total_offline'] = $ningmei['total'] - $ningmei['total_online'];
         $ningmei['rate'] = round($ningmei['total_online'] / $ningmei['total'] * 100,2);
         $ningmei['type'] = 0;
-        $ningmei['created_at'] = date('Y-m-d H:i:s');
-        $ningmei['updated_at'] = date('Y-m-d H:i:s');
+        $ningmei['date'] = date('Y-m-d');
         DB::table('camera_status_history')->insert($ningmei);
 
         $data = [];
@@ -129,8 +128,7 @@ class CameraStatusHistory extends Command
             }else{
                 $res['type'] = 3;
             }
-            $res['created_at'] = date('Y-m-d H:i:s');
-            $res['updated_at'] = date('Y-m-d H:i:s');
+            $res['date'] = date('Y-m-d');
             DB::table('camera_status_history')->insert($res);
         }
     }