作者 lyh

项目选择服务器

@@ -147,8 +147,6 @@ class ProjectLogic extends BaseLogic @@ -147,8 +147,6 @@ class ProjectLogic extends BaseLogic
147 * @time :2023/8/30 11:57 147 * @time :2023/8/30 11:57
148 */ 148 */
149 public function projectSave(){ 149 public function projectSave(){
150 - DB::beginTransaction();  
151 - try {  
152 if($this->param['type'] == Project::TYPE_SEVEN){ 150 if($this->param['type'] == Project::TYPE_SEVEN){
153 //错误单直接返回,单独处理 151 //错误单直接返回,单独处理
154 $this->setTypeSevenEdit($this->param); 152 $this->setTypeSevenEdit($this->param);
@@ -171,11 +169,8 @@ class ProjectLogic extends BaseLogic @@ -171,11 +169,8 @@ class ProjectLogic extends BaseLogic
171 $this->syncImageFile($this->param['project_location'],$this->param['id']); 169 $this->syncImageFile($this->param['project_location'],$this->param['id']);
172 //同步信息表 170 //同步信息表
173 (new SyncService())->projectAcceptAddress($this->param['id']); 171 (new SyncService())->projectAcceptAddress($this->param['id']);
174 - }  
175 - DB::commit();  
176 - }catch (\Exception $e){  
177 - DB::rollBack();  
178 - $this->fail('保存失败,请联系管理员'); 172 + //双向绑定服务器
  173 + $this->setServers($this->param['server_id'],$this->param['id']);
179 } 174 }
180 return $this->success(); 175 return $this->success();
181 } 176 }