From 0c873747e4299d5bc5762ac2d658413512e86614 Mon Sep 17 00:00:00 2001 From: dengbw Date: Mon, 25 Oct 2021 11:33:40 +0800 Subject: [PATCH] customer_visit_1025_6 --- api/controllers/wxapp/licheb/Customers.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/controllers/wxapp/licheb/Customers.php b/api/controllers/wxapp/licheb/Customers.php index fcf156d2..61fded76 100644 --- a/api/controllers/wxapp/licheb/Customers.php +++ b/api/controllers/wxapp/licheb/Customers.php @@ -534,12 +534,14 @@ class Customers extends Wxapp private function visit_lists($params = array()) { $biz_id = $this->session['new_biz_id'] ? $this->session['new_biz_id'] : intval($this->session['biz_id']); + $group_id = $this->session['group_id']; $this->load->model('receiver/receiver_customers_visit_model', 'mdCustomersVisit'); $page = $params['page']; $size = $params['size']; !$page && $page = 1; !$size && $size = 10; - $where = array('a.biz_id' => $biz_id, 'a.admin_id' => $this->session['uid'], 'b.contact=' => 1, 'b.status=' => 1); + $where = array('a.biz_id' => $biz_id, 'b.contact=' => 1, 'b.status=' => 1); + $group_id == 1 && $where['a.admin_id'] = $this->session['uid']; $count = $this->mdCustomersVisit->count_visit($where); $lists = []; if ($count) {