|
|
@@ -195,27 +195,8 @@ class BaseLogic
|
|
|
$data['game_id'] = $authGameList ? explode(',', $authGameList) : '';
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // 自然量游戏权限
|
|
|
- if(!empty($authNormalGameList)){
|
|
|
- // 如果传入了game_id,则取auth_normal_game_list交集
|
|
|
- if(!empty($data['game_id'])){
|
|
|
- $data['nomal_game_id'] = array_values(array_intersect($authNormalGameList, $data['game_id']));
|
|
|
- }else{
|
|
|
- $data['nomal_game_id'] = $authNormalGameList ? explode(',', $authNormalGameList) : '';
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
/**广告数据权限-开始***************************************** */
|
|
|
- // 广告数据权限-全公司数据
|
|
|
- if($authAdPermission==1){
|
|
|
- // 如果传入了auth_id,则取交集
|
|
|
- if(!empty($data['auth_id'])){
|
|
|
- $data['auth_id'] = array_values(array_intersect(explode(',', $data['auth_id']), explode(',', $authAdPermission)));
|
|
|
- }else{
|
|
|
- $data['auth_id'] = '';
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
// 广告数据权限-自己以及下面组员
|
|
|
if($authAdPermission==2){
|
|
|
@@ -228,7 +209,8 @@ class BaseLogic
|
|
|
|
|
|
if(!empty($data['auth_id'])){
|
|
|
// 如果传入了负责人ID,则取交集
|
|
|
- $data['auth_id'] = array_values(array_intersect(explode(',', $data['auth_id']), array_values($under_user_ids)));
|
|
|
+ print_r($under_user_ids);
|
|
|
+ $data['auth_id'] = array_values(array_intersect( $data['auth_id'], array_values($under_user_ids)));
|
|
|
}else{
|
|
|
// 如果没有传入负责人ID, 则取当前用户以及下面组员
|
|
|
$data['auth_id'] = array_values($under_user_ids);
|
|
|
@@ -240,13 +222,36 @@ class BaseLogic
|
|
|
$current_user_id = $this->adminInfo['id'];
|
|
|
if(!empty($data['auth_id'])){
|
|
|
// 如果传入了负责人ID,则取交集
|
|
|
- $data['auth_id'] = array_values(array_intersect(explode(',', $data['auth_id']), array_values($under_user_ids)));
|
|
|
+ $data['auth_id'] = array_values(array_intersect( $data['auth_id'], array_values($under_user_ids)));
|
|
|
}else{
|
|
|
// 如果没有传入负责人ID, 则取当前用户
|
|
|
$data['auth_id'] = $current_user_id;
|
|
|
}
|
|
|
}
|
|
|
/**广告数据权限-结束***************************************** */
|
|
|
+
|
|
|
+
|
|
|
+ /**自然量权限-开始***************************************** */
|
|
|
+ // 全部游戏的自然量
|
|
|
+ if($authNormalGameList=='*'){
|
|
|
+ if(!empty($data['auth_id'])){
|
|
|
+ $data['auth_id'][] = 0;
|
|
|
+ }else{
|
|
|
+ $data['auth_id'] = [0];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 看指定游戏的自然量
|
|
|
+ if(!empty($authNormalGameList)&&$authNormalGameList!='*'&&$authNormalGameList!='-1'){
|
|
|
+ // 如果传入了game_id,则取auth_normal_game_list交集
|
|
|
+ if(!empty($data['game_id'])){
|
|
|
+ $authNormalGameList = explode(',', $authNormalGameList);
|
|
|
+ $data['nomal_game_id'] = array_values(array_intersect($authNormalGameList, $data['game_id']));
|
|
|
+ }else{
|
|
|
+ $data['nomal_game_id'] = $authNormalGameList ? explode(',', $authNormalGameList) : '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**自然量权限-结束***************************************** */
|
|
|
return $data;
|
|
|
}
|
|
|
|