|
|
@@ -172,10 +172,10 @@ class BaseLogic
|
|
|
$data = $searchWhere;
|
|
|
|
|
|
// 获取游戏权限
|
|
|
- $auth_game_list = request()->header('auth_game_list');
|
|
|
+ $authGameList = request()->header('auth_game_list');
|
|
|
|
|
|
- $auth_normal_game_list = request()->header('auth_normal_game_list');
|
|
|
- $auth_ad_permission = request()->header('auth_ad_permission');
|
|
|
+ $authNormalGameList = request()->header('auth_normal_game_list');
|
|
|
+ $authAdPermission = request()->header('auth_ad_permission');
|
|
|
|
|
|
|
|
|
foreach ($withSearch as $k => $v) {
|
|
|
@@ -186,39 +186,39 @@ class BaseLogic
|
|
|
}
|
|
|
|
|
|
// 游戏权限
|
|
|
- if(!empty($auth_game_list)){
|
|
|
+ if(!empty($authGameList)){
|
|
|
if(!empty($data['game_id'])){
|
|
|
$inputGameIds = is_array($data['game_id']) ? $data['game_id'] : explode(',', $data['game_id']);
|
|
|
- $authGameIds = explode(',', $auth_game_list);
|
|
|
+ $authGameIds = explode(',', $authGameList);
|
|
|
$data['game_id'] = array_values(array_intersect($inputGameIds, $authGameIds));
|
|
|
}else{
|
|
|
- $data['game_id'] = $auth_game_list ? explode(',', $auth_game_list) : '';
|
|
|
+ $data['game_id'] = $authGameList ? explode(',', $authGameList) : '';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 自然量游戏权限
|
|
|
- if(!empty($auth_normal_game_list)){
|
|
|
+ if(!empty($authNormalGameList)){
|
|
|
// 如果传入了game_id,则取auth_normal_game_list交集
|
|
|
if(!empty($data['game_id'])){
|
|
|
- $data['nomal_game_id'] = array_values(array_intersect($auth_normal_game_list, $data['game_id']));
|
|
|
+ $data['nomal_game_id'] = array_values(array_intersect($authNormalGameList, $data['game_id']));
|
|
|
}else{
|
|
|
- $data['nomal_game_id'] = $auth_normal_game_list ? explode(',', $auth_normal_game_list) : '';
|
|
|
+ $data['nomal_game_id'] = $authNormalGameList ? explode(',', $authNormalGameList) : '';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**广告数据权限-开始***************************************** */
|
|
|
// 广告数据权限-全公司数据
|
|
|
- if($auth_ad_permission==1){
|
|
|
+ if($authAdPermission==1){
|
|
|
// 如果传入了auth_id,则取交集
|
|
|
if(!empty($data['auth_id'])){
|
|
|
- $data['auth_id'] = array_values(array_intersect(explode(',', $data['auth_id']), explode(',', $auth_ad_permission)));
|
|
|
+ $data['auth_id'] = array_values(array_intersect(explode(',', $data['auth_id']), explode(',', $authAdPermission)));
|
|
|
}else{
|
|
|
$data['auth_id'] = '';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 广告数据权限-自己以及下面组员
|
|
|
- if($auth_ad_permission==2){
|
|
|
+ if($authAdPermission==2){
|
|
|
// 如果没有传入负责人ID, 则取当前用户以及下面组员
|
|
|
$current_user_id = $this->adminInfo['id'];
|
|
|
$result = Db::connect('db_system')->table('sa_system_user')->field('dept_id')->where('id', $current_user_id)->select()->toArray();
|
|
|
@@ -236,7 +236,7 @@ class BaseLogic
|
|
|
}
|
|
|
|
|
|
// 广告数据权限-如果auth_id为空,则取当前用户
|
|
|
- if($auth_ad_permission==''){
|
|
|
+ if($authAdPermission==0){
|
|
|
$current_user_id = $this->adminInfo['id'];
|
|
|
if(!empty($data['auth_id'])){
|
|
|
// 如果传入了负责人ID,则取交集
|