作者 lyh

gx

@@ -76,17 +76,17 @@ class RenewLogic extends BaseLogic @@ -76,17 +76,17 @@ 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 { 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']]); 81 $this->model->edit(['project_id'=>$this->param['id'],'operator_id'=>$this->manager['id'],'status'=>1],['id'=>$this->param['renew_id']]);
82 $this->saveLog($this->param['renew_id'],$this->param['service_duration'],$this->param['plan'],$info['amount'],$info['api_no'],$this->param['id']); 82 $this->saveLog($this->param['renew_id'],$this->param['service_duration'],$this->param['plan'],$info['amount'],$info['api_no'],$this->param['id']);
83 $this->updateProject($this->param['id'],$this->param['type']); 83 $this->updateProject($this->param['id'],$this->param['type']);
84 $this->updateProjectBuild($this->param['id'],$this->param['service_duration'],$this->param['plan']); 84 $this->updateProjectBuild($this->param['id'],$this->param['service_duration'],$this->param['plan']);
85 -// DB::commit();  
86 -// }catch (\Exception $e){  
87 -// DB::rollBack();  
88 -// $this->fail('系统错误,请联系管理员');  
89 -// } 85 + DB::commit();
  86 + }catch (\Exception $e){
  87 + DB::rollBack();
  88 + $this->fail('系统错误,请联系管理员');
  89 + }
90 return $this->success(); 90 return $this->success();
91 } 91 }
92 92