master
yulingwei 4 years ago
parent 52b478f570
commit 96327507f4

@ -644,9 +644,6 @@ class PlatformController extends ThinkController
$tmin = $tmonth[1][0];
}
//为数据权限添加
setPowerPromoteIds($map, 'tp1.id');
if (isset($_REQUEST['promote_id'])) {
//$map['tp1.id'] = $_REQUEST['promote_id'];
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
@ -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')

Loading…
Cancel
Save