作者 lyh

gx

@@ -41,6 +41,9 @@ class SyncTimeMinuteFile extends Command @@ -41,6 +41,9 @@ class SyncTimeMinuteFile extends Command
41 $end = date('Y-m-d H:i:s'); 41 $end = date('Y-m-d H:i:s');
42 $fileModel = new File(); 42 $fileModel = new File();
43 $lists = $fileModel->list(['created_at'=>['between',[$start,$end]]]); 43 $lists = $fileModel->list(['created_at'=>['between',[$start,$end]]]);
  44 + if(empty($lists)){
  45 + return true;
  46 + }
44 foreach ($lists as $v){ 47 foreach ($lists as $v){
45 $path = $v['path']; 48 $path = $v['path'];
46 if (file_exists($dir.$path)) { 49 if (file_exists($dir.$path)) {