From e5f745b56ec06f032b13f1f24ae47e9648f4dd28 Mon Sep 17 00:00:00 2001 From: lcc <805383944@qq.com> Date: Thu, 23 Oct 2025 22:28:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A9=BA=E9=97=B4=E7=AB=99?= =?UTF-8?q?=E5=88=86=E9=85=8D=E7=BA=BF=E7=B4=A2=E4=B9=9F=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E8=A7=A3=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/controllers/receiver/Clues.php | 13 ++++++++----- api/controllers/wxapp/licheb/Customers.php | 20 ++++++++++++++------ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/admin/controllers/receiver/Clues.php b/admin/controllers/receiver/Clues.php index ecc4947f..64d17b6a 100644 --- a/admin/controllers/receiver/Clues.php +++ b/admin/controllers/receiver/Clues.php @@ -1309,15 +1309,18 @@ class Clues extends HD_Controller 'c_time' => $re['c_time'], 'rec_time' => $info['rec_time'] ); + if ($re['app_id'] == Receiver_clues_model::APP_ID_ACTIVITY) { + $add['un_lock'] = Receiver_customers_model::UNLOCK_STATUS; + } $customers_id = $this->customers_model->add($add); if (!$customers_id) { continue; } - if ($biz['type'] == Biz_model::BIZ_TYPE_SPACE) { - //解锁 - /** @var MyResponse $result */ - $result = $this->customers_model->unlock($customers_id, $biz['id'], false); - } +// if ($biz['type'] == Biz_model::BIZ_TYPE_SPACE) { +// //解锁 +// /** @var MyResponse $result */ +// $result = $this->customers_model->unlock($customers_id, $biz['id'], false); +// } //同步线索日志到客户日志 $this->load->library('receiver/customers_entity'); $this->customers_entity->syn_clues($customers_id, $re['id']); diff --git a/api/controllers/wxapp/licheb/Customers.php b/api/controllers/wxapp/licheb/Customers.php index b83c8a81..9403dcba 100644 --- a/api/controllers/wxapp/licheb/Customers.php +++ b/api/controllers/wxapp/licheb/Customers.php @@ -716,7 +716,7 @@ class Customers extends Wxapp $biz = $this->get_biz_info(); $rows = $this->customers_model->get_status(); $lists = []; - if ($biz['type'] == Biz_model::BIZ_TYPE_4s) { + if (in_array($biz['type'], [Biz_model::BIZ_TYPE_4s, Biz_model::BIZ_TYPE_SPACE])) { $lists[] = ['key' => 1000, 'name' => '线索池']; } if ($rows) { @@ -855,7 +855,9 @@ class Customers extends Wxapp $status = 0; $show_log = true; } else { - $biz_type == Biz_model::BIZ_TYPE_4s && $where['un_lock'] = 1; + if (in_array($biz_type, [Biz_model::BIZ_TYPE_4s, Biz_model::BIZ_TYPE_SPACE])) { + $where['un_lock'] = 1; + } } if ($of_id) { $where["of_id"] = $of_id; @@ -1016,7 +1018,7 @@ class Customers extends Wxapp $tip = $status_name[$val['status']] ? $status_name[$val['status']] : ''; $left_time = 0; $mobile = $this->get_mobile(['mobile' => $val['mobile'], 'rid' => $val['rid'], 'un_lock' => $val['un_lock']]); - if ($param['biz_type'] == Biz_model::BIZ_TYPE_4s) { + if (in_array($param['biz_type'], [Biz_model::BIZ_TYPE_4s, Biz_model::BIZ_TYPE_SPACE])) { !$param['un_lock'] && $mobile = mobile_asterisk($mobile); $rec_time = strtotime($val['rec_time']); $left_time = $rec_time > time() ? $rec_time - time() : 0; @@ -1239,7 +1241,9 @@ class Customers extends Wxapp } } $group_id == 1 && $where['a.admin_id'] = $this->myuid; - $biz_type == Biz_model::BIZ_TYPE_4s && $where['a.un_lock'] = 1; + if (in_array($biz_type, [Biz_model::BIZ_TYPE_4s, Biz_model::BIZ_TYPE_SPACE])) { + $where['a.un_lock'] = 1; + } $count = $this->mdCustomerVisitData->count_visit($where); } else {//数据看板 数据列表 if ($tab_id == 2) {//今日 @@ -1253,7 +1257,9 @@ class Customers extends Wxapp $where = ['biz_id' => $this->biz_id, 'status>=' => 0, 'p_time>=' => $s_c_time , 'p_time<=' => $e_c_time]; $group_id == 1 && $where['admin_id'] = $this->myuid; - $biz_type == Biz_model::BIZ_TYPE_4s && $where['un_lock'] = 1; + if (in_array($biz_type, [Biz_model::BIZ_TYPE_4s, Biz_model::BIZ_TYPE_SPACE])) { + $where['un_lock'] = 1; + } $count = $this->customers_model->count($where); } else if ($visit == 5 || $visit == 7) {//今日/本月到店/战败 $oplogs_type = $visit == 7 ? 7 : 4;//4到店7战败 @@ -1271,7 +1277,9 @@ class Customers extends Wxapp } !$str_uids && $str_uids = '-1'; $where["(of2_id = 10 and c_time>={$s_c_time} and c_time<={$e_c_time}) OR id in(select customer_id from lc_receiver_customer_oplogs where type={$oplogs_type} and uid in({$str_uids}) and c_time>={$s_c_time} and c_time<={$e_c_time})"] = null; - $biz_type == Biz_model::BIZ_TYPE_4s && $where['un_lock'] = 1; + if (in_array($biz_type, [Biz_model::BIZ_TYPE_4s, Biz_model::BIZ_TYPE_SPACE])) { + $where['un_lock'] = 1; + } $count = $this->customers_model->count($where); } }