From e37dbb55be17e67f9035a0e2a2865735f183b494 Mon Sep 17 00:00:00 2001 From: lcc Date: Sat, 7 Dec 2024 08:41:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=88=97=E8=A1=A8=E5=92=8C?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=A2=9E=E5=8A=A0=E5=85=B3=E6=B3=A8=E8=BD=A6?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/controllers/wxapp/licheb/Customers.php | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/api/controllers/wxapp/licheb/Customers.php b/api/controllers/wxapp/licheb/Customers.php index 3e3207dc..cb0ca9fb 100644 --- a/api/controllers/wxapp/licheb/Customers.php +++ b/api/controllers/wxapp/licheb/Customers.php @@ -58,6 +58,17 @@ class Customers extends Wxapp if ($this->get_biz('type') != 5) { $other_data['客户来源'] = $this->get_cfTitle($row); } + $brand_name = ''; + if ($row['brand_id']) { + $brand_row = $this->auto_brand_model->get(['id' => intval($row['brand_id'])]); + $brand_name = $brand_row['name'] ? $brand_row['name'] : ''; + } + if ($row['series_id']) { + $series_row = $this->auto_series_model->get(['id' => intval($row['series_id'])]); + $series_name = $series_row['name'] ? $series_row['name'] : ''; + $series_name && $brand_name .= '-' . $series_name; + } + $brand_name && $other_data['关注车型'] = $brand_name; $other_data['建档时间'] = date('Y-m-d', strtotime($row['p_time'])); $row['cont_time'] != '0000-00-00 00:00:00' && $other_data['最近联系'] = date('Y-m-d', strtotime($row['cont_time'])); if ($this->session['group_id'] == 1) { @@ -905,7 +916,7 @@ class Customers extends Wxapp $lists = []; if ($count) { $fileds = 'id,rid,name,admin_id,mobile,level,car_json,is_top,cf_title,brand_id,cont_time,c_time,p_time,if_defeat - ,of_id,of2_id,wxqy,status,biz_id,county_id,cid'; + ,of_id,of2_id,wxqy,status,biz_id,county_id,cid,brand_id,series_id'; $rows = $this->customers_model->select($where, $orderby, $page, $size, $fileds); $lists = $this->listCustomerField(['rows' => $rows, 'biz_type' => $biz_type, 'group_id' => $group_id]); } @@ -945,6 +956,17 @@ class Customers extends Wxapp if ($param['biz_type'] != 5) { $other_data['客户来源'] = $this->get_cfTitle($val); } + $brand_name = ''; + if ($val['brand_id']) { + $brand_row = $this->auto_brand_model->get(['id' => intval($val['brand_id'])]); + $brand_name = $brand_row['name'] ? $brand_row['name'] : ''; + } + if ($val['series_id']) { + $series_row = $this->auto_series_model->get(['id' => intval($val['series_id'])]); + $series_name = $series_row['name'] ? $series_row['name'] : ''; + $series_name && $brand_name .= '-' . $series_name; + } + $brand_name && $other_data['关注车型'] = $brand_name; $other_data['建档时间'] = date('Y-m-d', strtotime($val['p_time'])); $val['cont_time'] != '0000-00-00 00:00:00' && $other_data['最近联系'] = date('Y-m-d', strtotime($val['cont_time'])); if ($param['group_id'] == 1) {