|
|
@ -644,9 +644,6 @@ class PlatformController extends ThinkController
|
|
|
|
$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'];
|
|
|
|
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
|
|
|
|
$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'])) {
|
|
|
|
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')
|
|
|
|