修改推广游戏分成市场专员权限控制

master
ELF 4 years ago
parent de21d622d8
commit bb8052614b

@ -46,7 +46,6 @@ class CompanyGameRatioController extends AdminController
if(isset($params['company_belong'])){
$pwhere = " and p.company_belong = {$params['company_belong']}";
}
if(isset($params['company_id'])){
$where['m.company_id'] = $params['company_id'];
@ -69,6 +68,21 @@ class CompanyGameRatioController extends AdminController
}
}
$isMarketAdmin = isMarketAdmin();
if($isMarketAdmin) {
$userAuth = session('user_auth');
$adminId = $userAuth['uid'];
$companyIds = M('promote', 'tab_')->where(['amdin_id' => $adminId, 'level' => 1])->getField('company_id', true);
$companyIds = array_unique($companyIds);
$marketCondition = '';
if (count($companyIds) > 0) {
$marketCondition = 'm.company_id in(' . implode(',', $companyIds) . ')';
} else {
$marketCondition = '1<>1';
}
$where['_sttring'] = isset($where['_sttring']) ? $where['_sttring'] . ' and ' . $marketCondition : $marketCondition;
}
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$time_start = strtotime($_REQUEST['time_start']);
$time_end = strtotime($_REQUEST['time_end'])+ 86399;

Loading…
Cancel
Save