diff --git a/common/libraries/receiver/Orders_v2_entity.php b/common/libraries/receiver/Orders_v2_entity.php index 8a77fef0..2628c7fd 100644 --- a/common/libraries/receiver/Orders_v2_entity.php +++ b/common/libraries/receiver/Orders_v2_entity.php @@ -454,7 +454,18 @@ class Orders_v2_entity{ $this->ci->app_liche_orders_model->delete(['o_id'=>$row['id'],'status'=>0,'pid!='=>0]); $userinfo = $this->ci->app_liche_users_model->get(['mobile'=>$row['mobile']],'id'); if(!$this->ci->app_liche_orders_model->count(['o_id'=>$row['id'],'type'=>1,'status'=>1])){ //不存在定金订单 - $this->add_book_order($row['id'],$userinfo['id']); + $int_order = $this->ci->app_liche_orders_model->get(['o_id'=>$row['id'],'type'=>4,'status'=>1]); //意向金订单 + $money_json = json_decode($new_data['money_json'],true); + if($int_order['pay_price']==$money_json['price_book']){ //意向金订单转支付订单、推送并且生成pfd + $this->ci->app_liche_orders_model->update(['type'=>1],['id'=>$int_order['id']]); + $this->ci->receiver_orders_v2_model->update(['order_time'=>date('Y-m-d H:i:s')],['id'=>$row['id']]); + //生成pdf + $this->create_pdf($row['id']); + $this->ci->load->library('qyrobot'); + $this->ci->qyrobot->deposit_notify_v2($row['id']); + }else{ + $this->add_book_order($row['id'],$userinfo['id']); + } } $this->add_order($row['id'],$userinfo['id']); //合同重新生成