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 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A8=E5=B9=BF?= =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=88=86=E6=88=90=E5=B8=82=E5=9C=BA=E4=B8=93?= =?UTF-8?q?=E5=91=98=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; From 546d83f4a3a175412b9dcb4c1d6f7bdc270d9a24 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Wed, 22 Jul 2020 16:05:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyGameRatioController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/CompanyGameRatioController.class.php b/Application/Admin/Controller/CompanyGameRatioController.class.php index 921bd5391..748161ec0 100644 --- a/Application/Admin/Controller/CompanyGameRatioController.class.php +++ b/Application/Admin/Controller/CompanyGameRatioController.class.php @@ -80,7 +80,7 @@ class CompanyGameRatioController extends AdminController } else { $marketCondition = '1<>1'; } - $where['_sttring'] = isset($where['_sttring']) ? $where['_sttring'] . ' and ' . $marketCondition : $marketCondition; + $where['_string'] = isset($where['_string']) ? $where['_string'] . ' and ' . $marketCondition : $marketCondition; } if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { From c127ea61391b95696fda620d03eb49ae7049096f Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Wed, 22 Jul 2020 16:14:26 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyGameRatioController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/CompanyGameRatioController.class.php b/Application/Admin/Controller/CompanyGameRatioController.class.php index 748161ec0..0ade8fe1a 100644 --- a/Application/Admin/Controller/CompanyGameRatioController.class.php +++ b/Application/Admin/Controller/CompanyGameRatioController.class.php @@ -72,7 +72,7 @@ class CompanyGameRatioController extends AdminController if($isMarketAdmin) { $userAuth = session('user_auth'); $adminId = $userAuth['uid']; - $companyIds = M('promote', 'tab_')->where(['amdin_id' => $adminId, 'level' => 1])->getField('company_id', true); + $companyIds = M('promote', 'tab_')->where(['admin_id' => $adminId, 'level' => 1])->getField('company_id', true); $companyIds = array_unique($companyIds); $marketCondition = ''; if (count($companyIds) > 0) {