diff --git a/Application/Base/Repository/PromoteRepository.class.php b/Application/Base/Repository/PromoteRepository.class.php index ed7704485..9f2f55f50 100644 --- a/Application/Base/Repository/PromoteRepository.class.php +++ b/Application/Base/Repository/PromoteRepository.class.php @@ -53,6 +53,10 @@ class PromoteRepository { } else { $map['user_id'] = ['in', $lockUserIds]; } + } else { + if ($params['lock_status'] == 2) { + $map['_string'] = ' 1<>1'; + } } } return $map; @@ -218,7 +222,11 @@ class PromoteRepository { } $subQuery = M('user_play_info', 'tab_')->field('user_id')->group('user_id')->where($subMap)->buildSql(); - $map['_string'] = ' user_id not in (' . $subQuery . ')'; + if (isset($map['_string'])) { + $map['_string'] .= ' and user_id not in (' . $subQuery . ')'; + } else { + $map['_string'] = ' user_id not in (' . $subQuery . ')'; + } $inQuery = M('user_play_info', 'tab_')->field('user_id')->group('user_id')->where($map)->buildSql(); $resultMap = ['_string' => 'user_id in (' . $inQuery . ')']; diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index d4774857b..7fd048109 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -37,7 +37,11 @@ class PromoteController extends BaseController { $this->meta_title = "首页"; $loginPromote = $this->getLoginPromote(); - if ($loginPromote['id'] != 1 && $loginPromote['parent_id'] != 1 && $loginPromote['grand_id'] != 1) { + + $whiteList = [1, 8]; + $isOpenQuery = in_array($loginer['id'], $whiteList) || in_array($loginer['parent_id'], $whiteList) || in_array($loginer['grand_id'], $whiteList) ? true : false; + + if (!$isOpenQuery) { $this->display('prepare'); exit(0); } diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html index 6342067b6..21ceebfe2 100644 --- a/Application/Home/View/default/Public/promote_base.html +++ b/Application/Home/View/default/Public/promote_base.html @@ -47,7 +47,10 @@ 推广员管理 - + diff --git a/Application/Home/View/default/Query/achievement.html b/Application/Home/View/default/Query/achievement.html index 00b1b8500..56ede133f 100644 --- a/Application/Home/View/default/Query/achievement.html +++ b/Application/Home/View/default/Query/achievement.html @@ -81,7 +81,7 @@ 0):?>
- + 返回上级