正在显示
1 个修改的文件
包含
15 行增加
和
15 行删除
| @@ -92,14 +92,14 @@ class ProjectLogic extends BaseLogic | @@ -92,14 +92,14 @@ class ProjectLogic extends BaseLogic | ||
| 92 | $info['deploy_build']['other_project']= json_decode($info['deploy_build']['other_project']); | 92 | $info['deploy_build']['other_project']= json_decode($info['deploy_build']['other_project']); |
| 93 | } | 93 | } |
| 94 | //升级项目采集完成时间 | 94 | //升级项目采集完成时间 |
| 95 | - $collect_time = ''; | ||
| 96 | - if($info['is_upgrade'] == 1){ | ||
| 97 | - $collect_info = UpdateLog::where('project_id',$id)->where('api_type','blog')->first(); | ||
| 98 | - if($collect_info){ | ||
| 99 | - $collect_time = $collect_info->collect_status == 0 ? '采集中' : $collect_info->updated_at->format('Y-m-d H:i:s'); | ||
| 100 | - } | ||
| 101 | - } | ||
| 102 | - $info['collect_time'] = $collect_time; | 95 | +// $collect_time = ''; |
| 96 | +// if($info['is_upgrade'] == 1){ | ||
| 97 | +// $collect_info = UpdateLog::where('project_id',$id)->where('api_type','blog')->first(); | ||
| 98 | +// if($collect_info){ | ||
| 99 | +// $collect_time = $collect_info->collect_status == 0 ? '采集中' : $collect_info->updated_at->format('Y-m-d H:i:s'); | ||
| 100 | +// } | ||
| 101 | +// } | ||
| 102 | +// $info['collect_time'] = $collect_time; | ||
| 103 | return $this->success($info); | 103 | return $this->success($info); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| @@ -130,8 +130,8 @@ class ProjectLogic extends BaseLogic | @@ -130,8 +130,8 @@ class ProjectLogic extends BaseLogic | ||
| 130 | * @time :2023/8/30 11:57 | 130 | * @time :2023/8/30 11:57 |
| 131 | */ | 131 | */ |
| 132 | public function projectSave(){ | 132 | public function projectSave(){ |
| 133 | -// DB::beginTransaction(); | ||
| 134 | -// try { | 133 | + DB::beginTransaction(); |
| 134 | + try { | ||
| 135 | if($this->param['type'] == Project::TYPE_SEVEN){ | 135 | if($this->param['type'] == Project::TYPE_SEVEN){ |
| 136 | //错误单直接返回,单独处理 | 136 | //错误单直接返回,单独处理 |
| 137 | $this->setTypeSevenEdit($this->param); | 137 | $this->setTypeSevenEdit($this->param); |
| @@ -151,11 +151,11 @@ class ProjectLogic extends BaseLogic | @@ -151,11 +151,11 @@ class ProjectLogic extends BaseLogic | ||
| 151 | //创建站点 | 151 | //创建站点 |
| 152 | // $this->createSite($this->param); | 152 | // $this->createSite($this->param); |
| 153 | } | 153 | } |
| 154 | -// DB::commit(); | ||
| 155 | -// }catch (\Exception $e){ | ||
| 156 | -// DB::rollBack(); | ||
| 157 | -// $this->fail('保存失败,请联系管理员'); | ||
| 158 | -// } | 154 | + DB::commit(); |
| 155 | + }catch (\Exception $e){ | ||
| 156 | + DB::rollBack(); | ||
| 157 | + $this->fail('保存失败,请联系管理员'); | ||
| 158 | + } | ||
| 159 | (new SyncService())->projectAcceptAddress($this->param['id']); | 159 | (new SyncService())->projectAcceptAddress($this->param['id']); |
| 160 | return $this->success(); | 160 | return $this->success(); |
| 161 | } | 161 | } |
-
请 注册 或 登录 后发表评论