From bb8052614b06c712565c07aa19fc14f0067a3f13 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Wed, 22 Jul 2020 16:01:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A8=E5=B9=BF=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E5=88=86=E6=88=90=E5=B8=82=E5=9C=BA=E4=B8=93=E5=91=98?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyGameRatioController.class.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/CompanyGameRatioController.class.php b/Application/Admin/Controller/CompanyGameRatioController.class.php index 12b7dc362..921bd5391 100644 --- a/Application/Admin/Controller/CompanyGameRatioController.class.php +++ b/Application/Admin/Controller/CompanyGameRatioController.class.php @@ -46,7 +46,6 @@ class CompanyGameRatioController extends AdminController if(isset($params['company_belong'])){ $pwhere = " and p.company_belong = {$params['company_belong']}"; } - if(isset($params['company_id'])){ $where['m.company_id'] = $params['company_id']; @@ -69,6 +68,21 @@ class CompanyGameRatioController extends AdminController } } + $isMarketAdmin = isMarketAdmin(); + if($isMarketAdmin) { + $userAuth = session('user_auth'); + $adminId = $userAuth['uid']; + $companyIds = M('promote', 'tab_')->where(['amdin_id' => $adminId, 'level' => 1])->getField('company_id', true); + $companyIds = array_unique($companyIds); + $marketCondition = ''; + if (count($companyIds) > 0) { + $marketCondition = 'm.company_id in(' . implode(',', $companyIds) . ')'; + } else { + $marketCondition = '1<>1'; + } + $where['_sttring'] = isset($where['_sttring']) ? $where['_sttring'] . ' and ' . $marketCondition : $marketCondition; + } + if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { $time_start = strtotime($_REQUEST['time_start']); $time_end = strtotime($_REQUEST['time_end'])+ 86399;