|
...
|
...
|
@@ -76,19 +76,19 @@ class RenewLogic extends BaseLogic |
|
|
|
if($info['project_id'] != 0){
|
|
|
|
$this->fail('当前续费单已关联项目,请重新选择');
|
|
|
|
}
|
|
|
|
// DB::beginTransaction();
|
|
|
|
// try {
|
|
|
|
$this->model->edit(['project_id'=>$this->param['id'],'operator_id'=>$this->manager['id'],'status'=>1],['id'=>$this->param['renew_id']]);
|
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
$this->model->edit(['project_id'=>$this->param['id'],'operator_id'=>$this->manager['id']],['id'=>$this->param['renew_id']]);
|
|
|
|
$param = $this->param;
|
|
|
|
$param['api_no'] = $info['api_no'];
|
|
|
|
$this->saveLog($param);
|
|
|
|
$this->updateProject($this->param['id'],$this->param['type']);
|
|
|
|
$this->updateProjectBuild($this->param['id'],$this->param['service_duration'],$this->param['plan']);
|
|
|
|
// DB::commit();
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// DB::rollBack();
|
|
|
|
// $this->fail('系统错误,请联系管理员');
|
|
|
|
// }
|
|
|
|
DB::commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::rollBack();
|
|
|
|
$this->fail('系统错误,请联系管理员');
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|