From 23e03a41130743be479b2a79d09543c2052fb5bb Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 9 Aug 2021 16:58:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=89=E5=AE=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 4 ++-- Application/Admin/Event/MarketEvent.class.php | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 7a4e332fa..db0c3fce1 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2932,8 +2932,8 @@ function getSearchAdminIds($searchAdminParam = 'admin_id', $searchDepartmentPara } if (is_null($adminIds) && isset($_REQUEST[$searchDepartmentParam])) { - $admins = getMarketAdmin($_REQUEST[$searchDepartmentParam]); - $adminIds = count($admins) ? array_column($admins, 'uid') : [-1]; + $adminIds = explode(',', A("Market","Event")->getMarketGroupId($_REQUEST[$searchDepartmentParam])); + $adminIds = count($adminIds) ? $adminIds : [-1]; } return $adminIds; diff --git a/Application/Admin/Event/MarketEvent.class.php b/Application/Admin/Event/MarketEvent.class.php index 369df1ee5..fbe79a52b 100644 --- a/Application/Admin/Event/MarketEvent.class.php +++ b/Application/Admin/Event/MarketEvent.class.php @@ -18,9 +18,10 @@ class MarketEvent extends Controller /** * 获取所有市场部组id */ - public function getMarketGroupId() + public function getMarketGroupId($departmentId = null) { - $res = M('department','sys_')->where("id in ({$this->MarketDepartmentId})")->getField("group_ids",true); + $departmentIds = $departmentId ? $departmentId : $this->MarketDepartmentId; + $res = M('department','sys_')->where("id in ({$departmentIds})")->getField("group_ids",true); $sendData = ''; foreach ($res as $value) { $sendData .= $value.",";