正在显示
1 个修改的文件
包含
14 行增加
和
10 行删除
| @@ -79,8 +79,9 @@ class RenewLogic extends BaseLogic | @@ -79,8 +79,9 @@ class RenewLogic extends BaseLogic | ||
| 79 | DB::beginTransaction(); | 79 | DB::beginTransaction(); |
| 80 | try { | 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'], | ||
| 83 | - $info['amount'],$info['api_no'],$this->param['id'],$this->param['remark']); | 82 | + $param = $this->param; |
| 83 | + $param['api_no'] = $info['api_no']; | ||
| 84 | + $this->saveLog($param); | ||
| 84 | $this->updateProject($this->param['id'],$this->param['type']); | 85 | $this->updateProject($this->param['id'],$this->param['type']); |
| 85 | $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']); |
| 86 | DB::commit(); | 87 | DB::commit(); |
| @@ -113,16 +114,19 @@ class RenewLogic extends BaseLogic | @@ -113,16 +114,19 @@ class RenewLogic extends BaseLogic | ||
| 113 | * @method :post | 114 | * @method :post |
| 114 | * @time :2023/9/27 16:29 | 115 | * @time :2023/9/27 16:29 |
| 115 | */ | 116 | */ |
| 116 | - public function saveLog($renew_id,$service_duration,$plan,$amount,$api_no,$project_id,$remark){ | 117 | + public function saveLog($param){ |
| 117 | $data = [ | 118 | $data = [ |
| 118 | - 'renew_id'=>$renew_id, | ||
| 119 | - 'service_duration'=>$service_duration, | ||
| 120 | - 'plan'=>$plan, | ||
| 121 | - 'amount'=>$amount, | ||
| 122 | - 'api_no'=>$api_no, | ||
| 123 | - 'project_id'=>$project_id, | 119 | + 'renew_id'=>$param['renew_id'], |
| 120 | + 'service_duration'=>$param['service_duration'], | ||
| 121 | + 'plan'=>$param['plan'], | ||
| 122 | + 'old_plan'=>$param['old_plan'], | ||
| 123 | + 'type'=>$param['type'], | ||
| 124 | + 'old_type'=>$param['old_type'], | ||
| 125 | + 'amount'=>$param['amount'], | ||
| 126 | + 'api_no'=>$param['api_no'], | ||
| 127 | + 'project_id'=>$param['id'], | ||
| 124 | 'operator_id'=>$this->manager['id'], | 128 | 'operator_id'=>$this->manager['id'], |
| 125 | - 'remark'=>$remark | 129 | + 'remark'=>$param['remark'] |
| 126 | ]; | 130 | ]; |
| 127 | $renewLogModel = new RenewLog(); | 131 | $renewLogModel = new RenewLog(); |
| 128 | return $renewLogModel->add($data); | 132 | return $renewLogModel->add($data); |
-
请 注册 或 登录 后发表评论