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')