master
yulingwei 4 years ago
parent 52b478f570
commit 96327507f4

@ -643,9 +643,6 @@ class PlatformController extends ThinkController
}else{ }else{
$tmin = $tmonth[1][0]; $tmin = $tmonth[1][0];
} }
//为数据权限添加
setPowerPromoteIds($map, 'tp1.id');
if (isset($_REQUEST['promote_id'])) { if (isset($_REQUEST['promote_id'])) {
//$map['tp1.id'] = $_REQUEST['promote_id']; //$map['tp1.id'] = $_REQUEST['promote_id'];
@ -666,14 +663,13 @@ class PlatformController extends ThinkController
} }
} }
if (!empty($_REQUEST['admin_id'])) { if (isMarketAdmin()) {
$map['s.market_admin_id'] = $_REQUEST['admin_id'];
}
// 如果是市场专员那么只能看自己的
$isMarketAdmin = isMarketAdmin();
if ($isMarketAdmin) {
$map['s.market_admin_id'] = is_login(); $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') $data = M('promote', 'tab_')->alias('tp1')

Loading…
Cancel
Save