作者 lyh

gx

... ... @@ -120,7 +120,6 @@ class SyncProject extends Command
'contract' => json_encode($param['files']),
'bill' => json_encode($param['images']),
];
// @file_put_contents(storage_path('logs/lyh_error.log'), var_export($data, true) . PHP_EOL, FILE_APPEND);
$renewModel = new ProjectRenew();
$rs = $renewModel->add($data);
if($rs === false){
... ... @@ -184,8 +183,8 @@ class SyncProject extends Command
];
// DB::beginTransaction();
// try {
$res = $this->saveProject($data['project']);
$id = $res;
$id = $this->saveProject($data['project']);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($data['deploy_build']['plan'], true) . PHP_EOL, FILE_APPEND);
$this->setPostId($data['deploy_build']['plan'],$id);
$this->savePayment($data['payment'],$id);
$this->saveDeployBuild($data['deploy_build'],$id);
... ... @@ -211,6 +210,7 @@ class SyncProject extends Command
$paddingLength = Project::TYPE_FIVE - $length; // 计算填充前面的 0 的位数
$zeros = str_repeat("0", $paddingLength);
$number = Project::TYPE_SIX.$plan.$zeros.$id;
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($number, true) . PHP_EOL, FILE_APPEND);
$projectModel = new Project();
$projectModel->edit(['post_id'=>$number],['id'=>$id]);
return true;
... ...