Преглед изворни кода

天地伟业同步摄像头修改

任敬轩 пре 3 година
родитељ
комит
8154cc3966
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      app/Console/Commands/UpdateHkList.php

+ 2 - 0
app/Console/Commands/UpdateHkList.php

@@ -216,6 +216,8 @@ class UpdateHkList extends Command
                                 $device_index_code[$j] = $device_list['content'][$j]['sId'];
                                 $device_index_code[$j] = $device_list['content'][$j]['sId'];
                             }
                             }
                         }
                         }
+                        //删除不存在的摄像头
+                        CameraList::where('mine_id', $mine_id)->where('index_code', '!=', NULL)->whereNotIn('index_code', $device_index_code)->delete();
                     }
                     }
                 }
                 }
             }
             }