作者 lyh

gx

@@ -110,6 +110,8 @@ class ProjectLogic extends BaseLogic @@ -110,6 +110,8 @@ class ProjectLogic extends BaseLogic
110 */ 110 */
111 public function getProjectInfo($id){ 111 public function getProjectInfo($id){
112 $info = Common::get_user_cache($this->model,$id); 112 $info = Common::get_user_cache($this->model,$id);
  113 + var_dump($this->model);
  114 + die();
113 if(empty($info)){ 115 if(empty($info)){
114 $info = $this->model->with('payment')->with('deploy_build') 116 $info = $this->model->with('payment')->with('deploy_build')
115 ->with('deploy_optimize')->with('online_check') 117 ->with('deploy_optimize')->with('online_check')
@@ -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->saveDeployBuild($param); 149 $this->saveDeployBuild($param);
148 $this->saveDeployOptimize($param); 150 $this->saveDeployOptimize($param);
149 $this->saveAfter($param); 151 $this->saveAfter($param);
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