作者 lyh

gx

@@ -131,8 +131,8 @@ class ProjectLogic extends BaseLogic @@ -131,8 +131,8 @@ class ProjectLogic extends BaseLogic
131 * @time :2023/8/30 11:57 131 * @time :2023/8/30 11:57
132 */ 132 */
133 public function projectSave(){ 133 public function projectSave(){
134 -// DB::beginTransaction();  
135 -// try { 134 + DB::beginTransaction();
  135 + try {
136 $this->param['project_location'] = 0;//TODO::图片文件存储不同地方,上线后删除 136 $this->param['project_location'] = 0;//TODO::图片文件存储不同地方,上线后删除
137 if($this->param['type'] == Project::TYPE_SEVEN){ 137 if($this->param['type'] == Project::TYPE_SEVEN){
138 //错误单直接返回,单独处理 138 //错误单直接返回,单独处理
@@ -158,11 +158,11 @@ class ProjectLogic extends BaseLogic @@ -158,11 +158,11 @@ class ProjectLogic extends BaseLogic
158 // $this->createSite($this->param); 158 // $this->createSite($this->param);
159 (new SyncService())->projectAcceptAddress($this->param['id']); 159 (new SyncService())->projectAcceptAddress($this->param['id']);
160 } 160 }
161 -// DB::commit();  
162 -// }catch (\Exception $e){  
163 -// DB::rollBack();  
164 -// $this->fail('保存失败,请联系管理员');  
165 -// } 161 + DB::commit();
  162 + }catch (\Exception $e){
  163 + DB::rollBack();
  164 + $this->fail('保存失败,请联系管理员');
  165 + }
166 166
167 return $this->success(); 167 return $this->success();
168 } 168 }