From 08a0409a6d1eb04ff63c967352c98ca7fff136e8 Mon Sep 17 00:00:00 2001 From: lccsw <1127794702@qq.com> Date: Thu, 14 Oct 2021 15:02:59 +0800 Subject: [PATCH] add-script-up_money_json --- api/controllers/plan/Xzcall.php | 26 +++++++++++++++++------ api/controllers/wxapp/licheb/Cusorder.php | 1 - 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/api/controllers/plan/Xzcall.php b/api/controllers/plan/Xzcall.php index 5024b4fd..4d2f26a7 100644 --- a/api/controllers/plan/Xzcall.php +++ b/api/controllers/plan/Xzcall.php @@ -162,13 +162,27 @@ class Xzcall extends HD_Controller $date = date("Y-m-d H:i:s.x", $usec); return $mescdate = str_replace('x', $sec, $date); } - - public function robot(){ + //更新订单金融服务费 + public function up_srv_money(){ $o_id = $this->input->get('id'); - if($o_id){ - $this->load->library('qyrobot'); - $robot_res = $this->qyrobot->deposit_notify($o_id); - var_dump($robot_res); + $show = $this->input->get('show'); + $money = $this->input->get('money'); + $row = $this->orders_model->get(['id'=>$o_id]); + if(!$row){ + return false; + } + if($show){ + print_r($row); + } + if($money){ + $money_json = json_decode($row['money_json'],true); + $money_json['price_finance'] = 0; + $up_data = [ + 'money_json' => json_encode($money_json,JSON_UNESCAPED_UNICODE) + ]; + $res = $this->orders_model->update($up_data,['id'=>$row['id']]); + var_dump($res); + } } } diff --git a/api/controllers/wxapp/licheb/Cusorder.php b/api/controllers/wxapp/licheb/Cusorder.php index 5190b672..94b8cc5e 100644 --- a/api/controllers/wxapp/licheb/Cusorder.php +++ b/api/controllers/wxapp/licheb/Cusorder.php @@ -171,7 +171,6 @@ class Cusorder extends Wxapp{ 'price_insure' => $car_row['price_insure'], 'price_fine' => $car_row['price_fine'], ]; - !$payway && $money_json['price_finance'] = 1000; if(!$payway){ $orders_entity = new Orders_entity(); $money_json['price_finance'] = $orders_entity::PRICE_FINANCE;