From bcb4b6561df0c1e147da9dcb34d5a286c2ef8307 Mon Sep 17 00:00:00 2001 From: wanqi <1985087876@qq.com> Date: Fri, 11 Feb 2022 18:21:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E4=BC=81=E5=BE=AE=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/v1/EnterCustomer.php | 29 +++++++++++++++++++++++ app/admin/model/WxkCustomerTrack.php | 5 ++++ 2 files changed, 34 insertions(+) diff --git a/app/admin/controller/v1/EnterCustomer.php b/app/admin/controller/v1/EnterCustomer.php index 3d20cba..89942ab 100644 --- a/app/admin/controller/v1/EnterCustomer.php +++ b/app/admin/controller/v1/EnterCustomer.php @@ -17,6 +17,35 @@ class EnterCustomer extends BasicController parent::__construct($app); } + /** + * 获取非企微客户画像 + * User: 万奇 + * Date: 2022/2/11 0025 + * @throws \think\db\exception\DbException + */ + public function enter_customer_portrait(){ + param_receive(['external_user_id']); + $customer = new \app\admin\model\WxkCustomer(); + $result = $customer->get_customer_portrait($this->param); + + response(200, '', $result); + } + + /** + * 非企微客户互动轨迹列表 + * User: 万奇 + * Date: 2022/2/11 0025 + * @throws \think\db\exception\DbException + */ + public function enter_customer_track_list(){ + param_receive(['external_user_id', 'page', 'limit']); + + $customer = new \app\admin\model\WxkCustomerTrack(); + $result = $customer->get_customer_track_list($this->param); + + response(200, '', $result['data'], $result['total']); + } + /** * 非企微客户跟进记录列表 * User: 万奇 diff --git a/app/admin/model/WxkCustomerTrack.php b/app/admin/model/WxkCustomerTrack.php index 7eed5bf..2a48a56 100644 --- a/app/admin/model/WxkCustomerTrack.php +++ b/app/admin/model/WxkCustomerTrack.php @@ -25,6 +25,11 @@ class WxkCustomerTrack extends BasicModel */ public function get_customer_track_list($param){ $where[] = ['external_user_id', '=', $param['external_user_id']]; + + if (!empty($param['type'])){ + $where[] = ['type', '=', $param['type']]; + } + return $this->where($where)->order(['create_at' => 'desc'])->paginate($param['limit'])->toArray(); } -- Gitee