作者 lyh

未续费项目增加搜索

... ... @@ -47,10 +47,10 @@ class SyncTimeMinuteFile extends Command
}
foreach ($lists as $v){
$path = $v['path'];
if (file_exists($dir.$path)) {
echo date('Y-m-d H:i:s') . ' | file_ok:' . $dir.$path . PHP_EOL;
continue;
}
// if (file_exists($dir.$path)) {
// echo date('Y-m-d H:i:s') . ' | file_ok:' . $dir.$path . PHP_EOL;
// continue;
// }
$code = $this->synchronizationFile($path);
if(200 != (int)$code){
echo date('Y-m-d H:i:s') . ' | 错误状态:' . $code . PHP_EOL;
... ...
... ... @@ -132,7 +132,7 @@ class FileController
$amazonS3Service->uploadFiles($files,$this->path,$fileName);
}
$this->saveMysql($fileModel,$files->getSize(),$files->getClientOriginalExtension(),$fileName,$hash,$this->upload_location,$files->getMimeType(),$name);
// $this->synchronizationFile($fileName,$this->upload_location);
$this->synchronizationFile($fileName,$this->upload_location);
$this->response('资源',Code::SUCCESS,$this->responseData($this->path.'/'.$fileName, $name));
}
... ... @@ -306,7 +306,7 @@ class FileController
$mime = $file->getMimeType();
$this->saveMysql($fileModel,$size,$file_type,$fileName,$hash,$this->upload_location,$mime,$name);
$data[] = $this->responseData($this->path.'/'.$fileName, $name);
// $this->synchronizationFile($fileName,$this->upload_location);
$this->synchronizationFile($fileName,$this->upload_location);
}
$this->response('资源',Code::SUCCESS,$data);
}
... ...