From b78dbf8c5fda6ed03a22ff73111df4e9e6178a2e Mon Sep 17 00:00:00 2001 From: lcc Date: Sun, 11 Aug 2024 18:25:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96=E9=97=A8?= =?UTF-8?q?=E5=BA=97=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/controllers/wxapp/licheb/OpenApi.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/api/controllers/wxapp/licheb/OpenApi.php b/api/controllers/wxapp/licheb/OpenApi.php index a9ff914a..8869b693 100644 --- a/api/controllers/wxapp/licheb/OpenApi.php +++ b/api/controllers/wxapp/licheb/OpenApi.php @@ -33,6 +33,7 @@ class OpenApi extends Wxapp $en_time = $this->input_param('en_time'); $biz_id = $this->input_param('biz_id'); $to_customers = $this->input_param('to_customers'); + $remark = $this->input_param('remark'); if (!$name || !$mobile) { throw new Exception('参数错误', API_CODE_FAIL); } @@ -54,7 +55,7 @@ class OpenApi extends Wxapp } $ret = $this->clues_model->add($data); if (is_numeric($ret)) { - $this->clues_entity->add_log($ret, '', '', '新增线索', 3); + $this->clues_entity->add_log($ret, 1, 'admin', $remark ?: '新增线索', 3); } if ($to_customers) { // 分配到客户池 $this->customers($ret); @@ -91,7 +92,7 @@ class OpenApi extends Wxapp $customers_id = $this->customers_model->add($add); if ($customers_id) { - $this->clues_entity->add_log($re['id'], '', '', '转交门店跟进', 3); + $this->clues_entity->add_log($re['id'], 1, 'admin', '转交门店跟进', 3); $this->clues_model->update(['status' => 1, 'status2' => 2], ['id' => $re['id']]); //同步线索日志到客户日志 @@ -165,13 +166,15 @@ class OpenApi extends Wxapp } $row = $this->biz_model->get(['id' => $biz_id]); $address = $row['address'] ?: ''; - if($row['county_id']){ + if ($row['county_id']) { $areas = $this->area_model->get(['county_id' => $row['county_id']]); - $address = $areas['province_name'].$areas['city_name'].$areas['county_name'].$address; + $address = $areas['province_name'] . $areas['city_name'] . $areas['county_name'] . $address; } $data = [ 'biz_name' => $row['biz_name'] ?: '', 'address' => $address, + 'lat' => $row['lat'] ?: '', + 'lng' => $row['lng'] ?: '', ]; return $data; }