正在显示
1 个修改的文件
包含
10 行增加
和
8 行删除
| @@ -114,6 +114,8 @@ class ProjectLogic extends BaseLogic | @@ -114,6 +114,8 @@ class ProjectLogic extends BaseLogic | ||
| 114 | $info = $this->model->with('payment')->with('deploy_build') | 114 | $info = $this->model->with('payment')->with('deploy_build') |
| 115 | ->with('deploy_optimize')->with('online_check') | 115 | ->with('deploy_optimize')->with('online_check') |
| 116 | ->with('project_after')->where(['id'=>$id])->first()->toArray(); | 116 | ->with('project_after')->where(['id'=>$id])->first()->toArray(); |
| 117 | + var_dump($info); | ||
| 118 | + die(); | ||
| 117 | if(!empty($info['online_check']['created_manage_id'])){ | 119 | if(!empty($info['online_check']['created_manage_id'])){ |
| 118 | $info['online_check']['name'] = (new Manage())->read(['id'=>$info['online_check']['created_manage_id']])['name'] ?? ''; | 120 | $info['online_check']['name'] = (new Manage())->read(['id'=>$info['online_check']['created_manage_id']])['name'] ?? ''; |
| 119 | } | 121 | } |
| @@ -134,8 +136,8 @@ class ProjectLogic extends BaseLogic | @@ -134,8 +136,8 @@ class ProjectLogic extends BaseLogic | ||
| 134 | * @time :2023/8/17 14:19 | 136 | * @time :2023/8/17 14:19 |
| 135 | */ | 137 | */ |
| 136 | public function save($param){ | 138 | public function save($param){ |
| 137 | -// DB::beginTransaction(); | ||
| 138 | -// try { | 139 | + DB::beginTransaction(); |
| 140 | + try { | ||
| 139 | if($param['type'] == 5){ | 141 | if($param['type'] == 5){ |
| 140 | $param['extend_type'] == 5; | 142 | $param['extend_type'] == 5; |
| 141 | unset($param['type']); | 143 | unset($param['type']); |
| @@ -147,12 +149,12 @@ class ProjectLogic extends BaseLogic | @@ -147,12 +149,12 @@ class ProjectLogic extends BaseLogic | ||
| 147 | $this->saveDeployOptimize($param); | 149 | $this->saveDeployOptimize($param); |
| 148 | $this->saveAfter($param); | 150 | $this->saveAfter($param); |
| 149 | Common::del_user_cache($this->model,$res['id']); | 151 | Common::del_user_cache($this->model,$res['id']); |
| 150 | -// DB::commit(); | ||
| 151 | -// }catch (\Exception $e){ | ||
| 152 | -// DB::rollBack(); | ||
| 153 | -// errorLog('项目保存失败', $param, $e); | ||
| 154 | -// $this->fail('保存失败'); | ||
| 155 | -// } | 152 | + DB::commit(); |
| 153 | + }catch (\Exception $e){ | ||
| 154 | + DB::rollBack(); | ||
| 155 | + errorLog('项目保存失败', $param, $e); | ||
| 156 | + $this->fail('保存失败'); | ||
| 157 | + } | ||
| 156 | return $this->success(); | 158 | return $this->success(); |
| 157 | } | 159 | } |
| 158 | 160 |
-
请 注册 或 登录 后发表评论