edit-api-liche_update_order

This commit is contained in:
lccsw
2022-03-25 14:37:24 +08:00
parent a9ca75d39b
commit 5bc9ce3d64
7 changed files with 33 additions and 16 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
ini_set("display_errors", "On");//打开错误提示
ini_set("error_reporting",E_ALL);//显示所有错误
//ini_set("display_errors", "On");//打开错误提示
//ini_set("error_reporting",E_ALL);//显示所有错误
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
+7 -6
View File
@@ -172,7 +172,7 @@ class Pay extends Wxapp{
if($this->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 = [
+12
View File
@@ -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 {//编辑其他信息
+1 -1
View File
@@ -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'=>''];
+5 -3
View File
@@ -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');
@@ -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;
@@ -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']),
];