|
|
|
@ -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;
|
|
|
|
|