|
...
|
...
|
@@ -79,8 +79,9 @@ class RenewLogic extends BaseLogic |
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
$this->model->edit(['project_id'=>$this->param['id'],'operator_id'=>$this->manager['id'],'status'=>1],['id'=>$this->param['renew_id']]);
|
|
|
|
$this->saveLog($this->param['renew_id'],$this->param['service_duration'],$this->param['plan'],
|
|
|
|
$info['amount'],$info['api_no'],$this->param['id'],$this->param['remark']);
|
|
|
|
$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();
|
|
...
|
...
|
@@ -113,16 +114,19 @@ class RenewLogic extends BaseLogic |
|
|
|
* @method :post
|
|
|
|
* @time :2023/9/27 16:29
|
|
|
|
*/
|
|
|
|
public function saveLog($renew_id,$service_duration,$plan,$amount,$api_no,$project_id,$remark){
|
|
|
|
public function saveLog($param){
|
|
|
|
$data = [
|
|
|
|
'renew_id'=>$renew_id,
|
|
|
|
'service_duration'=>$service_duration,
|
|
|
|
'plan'=>$plan,
|
|
|
|
'amount'=>$amount,
|
|
|
|
'api_no'=>$api_no,
|
|
|
|
'project_id'=>$project_id,
|
|
|
|
'renew_id'=>$param['renew_id'],
|
|
|
|
'service_duration'=>$param['service_duration'],
|
|
|
|
'plan'=>$param['plan'],
|
|
|
|
'old_plan'=>$param['old_plan'],
|
|
|
|
'type'=>$param['type'],
|
|
|
|
'old_type'=>$param['old_type'],
|
|
|
|
'amount'=>$param['amount'],
|
|
|
|
'api_no'=>$param['api_no'],
|
|
|
|
'project_id'=>$param['id'],
|
|
|
|
'operator_id'=>$this->manager['id'],
|
|
|
|
'remark'=>$remark
|
|
|
|
'remark'=>$param['remark']
|
|
|
|
];
|
|
|
|
$renewLogModel = new RenewLog();
|
|
|
|
return $renewLogModel->add($data);
|
...
|
...
|
|