正在显示
1 个修改的文件
包含
8 行增加
和
8 行删除
| @@ -76,19 +76,19 @@ class RenewLogic extends BaseLogic | @@ -76,19 +76,19 @@ class RenewLogic extends BaseLogic | ||
| 76 | if($info['project_id'] != 0){ | 76 | if($info['project_id'] != 0){ |
| 77 | $this->fail('当前续费单已关联项目,请重新选择'); | 77 | $this->fail('当前续费单已关联项目,请重新选择'); |
| 78 | } | 78 | } |
| 79 | -// DB::beginTransaction(); | ||
| 80 | -// try { | ||
| 81 | - $this->model->edit(['project_id'=>$this->param['id'],'operator_id'=>$this->manager['id'],'status'=>1],['id'=>$this->param['renew_id']]); | 79 | + DB::beginTransaction(); |
| 80 | + try { | ||
| 81 | + $this->model->edit(['project_id'=>$this->param['id'],'operator_id'=>$this->manager['id']],['id'=>$this->param['renew_id']]); | ||
| 82 | $param = $this->param; | 82 | $param = $this->param; |
| 83 | $param['api_no'] = $info['api_no']; | 83 | $param['api_no'] = $info['api_no']; |
| 84 | $this->saveLog($param); | 84 | $this->saveLog($param); |
| 85 | $this->updateProject($this->param['id'],$this->param['type']); | 85 | $this->updateProject($this->param['id'],$this->param['type']); |
| 86 | $this->updateProjectBuild($this->param['id'],$this->param['service_duration'],$this->param['plan']); | 86 | $this->updateProjectBuild($this->param['id'],$this->param['service_duration'],$this->param['plan']); |
| 87 | -// DB::commit(); | ||
| 88 | -// }catch (\Exception $e){ | ||
| 89 | -// DB::rollBack(); | ||
| 90 | -// $this->fail('系统错误,请联系管理员'); | ||
| 91 | -// } | 87 | + DB::commit(); |
| 88 | + }catch (\Exception $e){ | ||
| 89 | + DB::rollBack(); | ||
| 90 | + $this->fail('系统错误,请联系管理员'); | ||
| 91 | + } | ||
| 92 | return $this->success(); | 92 | return $this->success(); |
| 93 | } | 93 | } |
| 94 | 94 |
-
请 注册 或 登录 后发表评论