diff --git a/api/controllers/Welcome.php b/api/controllers/Welcome.php index e372e8f2..b80b45fe 100755 --- a/api/controllers/Welcome.php +++ b/api/controllers/Welcome.php @@ -1,6 +1,6 @@ uid<=10){ $total = 0.01; } - if($row['id']>=Orders_v2_entity::V2_START_ID){ + if($row['o_id']>=Orders_v2_entity::V2_START_ID){ $order_row = $this->receiver_orders_v2_model->get(['id'=>$row['o_id']],'name,brand_id,s_id,biz_id'); }else{ $order_row = $this->orders_model->get(['id'=>$row['o_id']],'name,brand_id,s_id,biz_id'); @@ -180,12 +180,13 @@ class Pay extends Wxapp{ $brand_row = $this->auto_brand_model->get(['id'=>$order_row['brand_id']],'name'); $s_row = $this->auto_series_model->get(['id'=>$order_row['s_id']],'name'); $biz_row = $this->biz_model->get(['id'=>$order_row['biz_id']],'biz_name,company_id'); - $company_row = $this->sys_company_model->get(['id'=>$biz_row['company_id']],'short'); - if($row['id']>=Orders_v2_entity::V2_START_ID){ - $company_row = $this->sys_company_model->get(['id'=>$row['company_id']],'short'); - } + //$company_row = $this->sys_company_model->get(['id'=>$biz_row['company_id']],'short'); + //if($row['o_id']>=Orders_v2_entity::V2_START_ID){ + // $company_row = $this->sys_company_model->get(['id'=>$row['company_id']],'short'); + //} $type_name = $type_arr[$row['type']]; - $description = "{$brand_row['name']}{$s_row['name']}-{$order_row['name']}-{$biz_row['biz_name']}-{$type_name}-{$company_row['short']}"; + //$description = "{$brand_row['name']}{$s_row['name']}-{$order_row['name']}-{$biz_row['biz_name']}-{$type_name}-{$company_row['short']}"; + $description = "{$brand_row['name']}{$s_row['name']}-{$order_row['name']}-{$biz_row['biz_name']}-{$type_name}"; $this->config->load('wxpay'); $wx_config = $this->config->item('default'); $params = [ diff --git a/api/controllers/wxapp/liche/User.php b/api/controllers/wxapp/liche/User.php index 3cfb6b17..33d038b0 100644 --- a/api/controllers/wxapp/liche/User.php +++ b/api/controllers/wxapp/liche/User.php @@ -23,6 +23,7 @@ class User extends Wxapp{ $this->load->model('auto/auto_attr_model'); $this->load->model('receiver/order/receiver_orders_model','orders_model'); + $this->load->model('receiver/order/receiver_orders_v2_model'); $this->load->model('app/liche/app_liche_orders_model'); } @@ -167,6 +168,17 @@ class User extends Wxapp{ if($en_order_ids){ $this->app_liche_orders_model->update(['entrust_uid'=>$this->session['uid']],["o_id in ($en_order_ids)"=>null,'entrust_uid'=>0]); } + //更新新的购车订单 + $new_order_rows = $this->receiver_orders_v2_model->select(['mobile'=>$mobile],'','','id'); + $new_order_rows && $new_order_ids = implode(',',array_column($new_order_rows,'id')); + if($new_order_ids){ + $this->app_liche_orders_model->update(['uid'=>$this->session['uid']],["o_id in ($new_order_ids)"=>null,'uid'=>0]); + } + $new_en_order_rows = $this->receiver_orders_v2_model->select(["owner_mobile"=>$mobile],'','','id'); + $new_en_order_rows && $new_en_order_ids = implode(',',array_column($new_en_order_rows,'id')); + if($new_en_order_ids){ + $this->app_liche_orders_model->update(['entrust_uid'=>$this->session['uid']],["o_id in ($new_en_order_ids)"=>null,'entrust_uid'=>0]); + } } } else {//编辑其他信息 diff --git a/api/controllers/wxapp/licheb/CusorderV2.php b/api/controllers/wxapp/licheb/CusorderV2.php index 3ea96f9a..c1ed090e 100644 --- a/api/controllers/wxapp/licheb/CusorderV2.php +++ b/api/controllers/wxapp/licheb/CusorderV2.php @@ -637,7 +637,7 @@ class CusorderV2 extends Wxapp{ $price_book_text = $money_json['price_book']."($book_is_pay_text)"; $other_data['定金金额'] = ['type'=> 'text','value'=>$price_book_text,'bg_color'=>'']; } - $last_is_pay_text = $is_pay_price == $need_pay ? '已支付':'未支付'; + $last_is_pay_text = $is_pay_price >= $need_pay ? '已支付':'未支付'; $last_text = $need_last_pay."($last_is_pay_text)"; $other_data['尾款金额'] = ['type'=> 'text','value'=>$last_text,'bg_color'=>'']; diff --git a/common/libraries/Qyrobot.php b/common/libraries/Qyrobot.php index bdf64ebc..9e1944d2 100644 --- a/common/libraries/Qyrobot.php +++ b/common/libraries/Qyrobot.php @@ -41,7 +41,7 @@ class Qyrobot{ return false; } $biz_row = $this->ci->biz_model->get(['id'=>$order_row['biz_id']]); - if($biz_row['type']==3){ + if($biz_row['type']==3){ //代理店 $channel_users = $this->ci->app_licheb_channel_biz_model->select(['biz_id'=>$biz_row['id']],'','','','uid'); $user_ids = array_column($channel_users,'uid'); $user_ids_str = implode(',',$user_ids); @@ -109,7 +109,7 @@ class Qyrobot{ } /** - * 支付后推送消息 + * 新订单支付后推送消息 * @param $oid * @return mixed */ @@ -151,8 +151,10 @@ class Qyrobot{ } } $biz_info = "{$user_info}渠道 {$biz_row['biz_name']}"; + }elseif($biz_row['type']==4){ //合伙店 + $biz_info = "合伙店 {$biz_row['biz_name']}"; }else{ - $user = $this->ci->app_licheb_users_model->get(['id'=>$order_row['admin_id']],'uname'); //获取销售员 + $user = $this->ci->app_licheb_users_model->get(['id'=>$order_row['sale_id']],'uname'); //获取销售员 $biz_info = "{$biz_row['biz_name']} {$user['uname']}"; } $brand_row = $this->ci->auto_brand_model->get(['id'=>$order_row['brand_id']],'name'); diff --git a/common/libraries/receiver/Order_datas_entity.php b/common/libraries/receiver/Order_datas_entity.php index 10c394a0..d7cc7ba1 100644 --- a/common/libraries/receiver/Order_datas_entity.php +++ b/common/libraries/receiver/Order_datas_entity.php @@ -51,7 +51,7 @@ class Order_datas_entity{ public function data_ckinfo($o_data,$main_type=0){ if($main_type){ $result = [ - 'business_licence' => ['text'=>'营业执照','type'=>1,'up_status'=>0,'status'=>0,'status_cn'=>'未审核','imgs' => []], //身份证 + 'business_licence' => ['text'=>'营业执照','type'=>1,'up_status'=>0,'status'=>0,'status_cn'=>'未审核','imgs' => []], //公司营业执照 'register_img' => ['text'=>'登记证','type'=>2,'up_status'=>0,'status'=>0,'status_cn'=>'未审核','imgs' => []], //登记证 'car_img' => ['text'=>'行驶证','type'=>3,'up_status'=>0,'status'=>0,'status_cn'=>'未审核','imgs'=>[]], //行驶证 'ins_img' => ['text'=>'保单证','type'=>4,'up_status'=>0,'status'=>0,'status_cn'=>'未审核','imgs'=>[]], //保单证 @@ -59,7 +59,7 @@ class Order_datas_entity{ ]; }else{ $result = [ - 'cardida' => ['text'=>'身份证正反面','type'=>1,'up_status'=>0,'status'=>0,'status_cn'=>'未审核','imgs' => []], //身份证 + 'cardida' => ['text'=>'身份证正面','type'=>1,'up_status'=>0,'status'=>0,'status_cn'=>'未审核','imgs' => []], //身份证 'register_img' => ['text'=>'登记证','type'=>2,'up_status'=>0,'status'=>0,'status_cn'=>'未审核','imgs' => []], //登记证 'car_img' => ['text'=>'行驶证','type'=>3,'up_status'=>0,'status'=>0,'status_cn'=>'未审核','imgs'=>[]], //行驶证 'ins_img' => ['text'=>'保单证','type'=>4,'up_status'=>0,'status'=>0,'status_cn'=>'未审核','imgs'=>[]], //保单证 @@ -74,7 +74,7 @@ class Order_datas_entity{ ]; $check_data = $this->ci->app_checkdata_model->map('type','',$where,'','','','id,cf_id,type,ifcheck'); foreach ($result as $key=>$item) { - if($o_data[$key]){ + if($o_data[$key] || $o_data['cardidb']){ $result[$key]['up_status'] = 1; $ifcheck = $check_data[$item['type']][0]['ifcheck']; $imgs = []; @@ -86,7 +86,7 @@ class Order_datas_entity{ }else{ $imgs[] = build_qiniu_image_url($o_data[$key]); if($key=='cardida' && $o_data['cardidb']){ - $imgs[] = build_qiniu_image_url($o_data['cardidb']); + $imgs[1] = build_qiniu_image_url($o_data['cardidb']); } } $result[$key]['imgs'] = $imgs; diff --git a/common/libraries/receiver/Orders_v2_entity.php b/common/libraries/receiver/Orders_v2_entity.php index 103d0dd4..c96e0333 100644 --- a/common/libraries/receiver/Orders_v2_entity.php +++ b/common/libraries/receiver/Orders_v2_entity.php @@ -502,6 +502,8 @@ class Orders_v2_entity{ 'company' => $fill_info['companys']['srv_company']['title'], 'name' => $fill_info['name'], 'mobile' => $this->order_row['owner_mobile'], + 'owner_name' => $fill_info['owner_name'], + 'owner_mobile' => $fill_info['owner_mobile'], 'service_str' => implode(' ',$fill_info['services']), ];