作者 lyh

gx

... ... @@ -92,14 +92,14 @@ class ProjectLogic extends BaseLogic
$info['deploy_build']['other_project']= json_decode($info['deploy_build']['other_project']);
}
//升级项目采集完成时间
$collect_time = '';
if($info['is_upgrade'] == 1){
$collect_info = UpdateLog::where('project_id',$id)->where('api_type','blog')->first();
if($collect_info){
$collect_time = $collect_info->collect_status == 0 ? '采集中' : $collect_info->updated_at->format('Y-m-d H:i:s');
}
}
$info['collect_time'] = $collect_time;
// $collect_time = '';
// if($info['is_upgrade'] == 1){
// $collect_info = UpdateLog::where('project_id',$id)->where('api_type','blog')->first();
// if($collect_info){
// $collect_time = $collect_info->collect_status == 0 ? '采集中' : $collect_info->updated_at->format('Y-m-d H:i:s');
// }
// }
// $info['collect_time'] = $collect_time;
return $this->success($info);
}
... ... @@ -130,8 +130,8 @@ class ProjectLogic extends BaseLogic
* @time :2023/8/30 11:57
*/
public function projectSave(){
// DB::beginTransaction();
// try {
DB::beginTransaction();
try {
if($this->param['type'] == Project::TYPE_SEVEN){
//错误单直接返回,单独处理
$this->setTypeSevenEdit($this->param);
... ... @@ -151,11 +151,11 @@ class ProjectLogic extends BaseLogic
//创建站点
// $this->createSite($this->param);
}
// DB::commit();
// }catch (\Exception $e){
// DB::rollBack();
// $this->fail('保存失败,请联系管理员');
// }
DB::commit();
}catch (\Exception $e){
DB::rollBack();
$this->fail('保存失败,请联系管理员');
}
(new SyncService())->projectAcceptAddress($this->param['id']);
return $this->success();
}
... ...