作者 lyh

gx脚本

... ... @@ -66,7 +66,7 @@ class Notice extends Command
}
foreach ($domainList as $v1){
//TODO::通知C端
@file_put_contents(storage_path('logs/notice_c_'.date('Y-m-d').'.log'), var_export($v1['domain'], true) . PHP_EOL, FILE_APPEND);
@file_put_contents(storage_path('logs/notice_c'.'.log'), var_export($v1['domain'], true) . PHP_EOL, FILE_APPEND);
$this->curlDelRoute($v1['domain'],$v1['project_id']);
}
return true;
... ...
... ... @@ -63,6 +63,7 @@ class CopyProjectJob implements ShouldQueue
$data['delete_status'] = 1;
unset($data['id']);
$project_id = $projectModel->insertGetId($data);
@file_put_contents(storage_path('logs/lyh/copy_project'.'.log'), var_export('复制项目成功:'.$project_id, true) . PHP_EOL, FILE_APPEND);
$hashids = new Hashids($data['from_order_id'], 13, 'abcdefghjkmnpqrstuvwxyz1234567890');
$projectModel->edit(['from_order_id'=>$hashids->encode($project_id)],['id'=>$project_id]);
//复制设置的模版
... ... @@ -128,6 +129,7 @@ class CopyProjectJob implements ShouldQueue
DB::commit();
}catch (\Exception $e){
DB::rollBack();
@file_put_contents(storage_path('logs/lyh/copy_project'.'.log'), var_export('复制项目失败:'.$e->getMessage(), true) . PHP_EOL, FILE_APPEND);
$this->fail('error');
}
if($type != 0){
... ...