|
...
|
...
|
@@ -52,7 +52,7 @@ class SyncProject extends Command |
|
|
|
$list = NoticeLog::where('type', NoticeLog::TYPE_PROJECT)->where('status', NoticeLog::STATUS_PENDING)->get()->toArray();
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($list, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
foreach ($list as $item){
|
|
|
|
try {
|
|
|
|
// try {
|
|
|
|
$api = new OaGlobalsoApi();
|
|
|
|
$data = $api->order_info($item['data']['order_id']);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($data, true) . PHP_EOL, FILE_APPEND);
|
|
...
|
...
|
@@ -68,10 +68,10 @@ class SyncProject extends Command |
|
|
|
}
|
|
|
|
$item->status = NoticeLog::STATUS_SUCCESS;
|
|
|
|
$item->save();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
errorLog('项目同步失败', $item, $e);
|
|
|
|
$this->retry($item);
|
|
|
|
}
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// errorLog('项目同步失败', $item, $e);
|
|
|
|
// $this->retry($item);
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|