From 96327507f42e9d6a01910299f729ae435e3095ee Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Thu, 9 Jul 2020 16:54:08 +0800 Subject: [PATCH] upt --- .../Controller/PlatformController.class.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index 897d53b6d..287f59b2e 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -643,9 +643,6 @@ class PlatformController extends ThinkController }else{ $tmin = $tmonth[1][0]; } - - //为数据权限添加 - setPowerPromoteIds($map, 'tp1.id'); if (isset($_REQUEST['promote_id'])) { //$map['tp1.id'] = $_REQUEST['promote_id']; @@ -666,14 +663,13 @@ class PlatformController extends ThinkController } } - if (!empty($_REQUEST['admin_id'])) { - $map['s.market_admin_id'] = $_REQUEST['admin_id']; - } - - // 如果是市场专员那么只能看自己的 - $isMarketAdmin = isMarketAdmin(); - if ($isMarketAdmin) { + if (isMarketAdmin()) { $map['s.market_admin_id'] = is_login(); + } else if (!empty($_REQUEST['admin_id'])) { + $map['s.market_admin_id'] = $_REQUEST['admin_id']; + } else { + //为数据权限添加 + setPowerPromoteIds($map, 'tp1.id'); } $data = M('promote', 'tab_')->alias('tp1')