|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace app\v1\logic\center;
|
|
|
|
|
|
+use plugin\saiadmin\app\cache\UserInfoCache;
|
|
|
use plugin\saiadmin\basic\BaseLogic;
|
|
|
use app\v1\model\center\Game;
|
|
|
use plugin\saiadmin\app\logic\system\SystemDeptLogic;
|
|
|
@@ -35,9 +36,13 @@ class GameLogic extends BaseLogic
|
|
|
*/
|
|
|
public function getIndex($where)
|
|
|
{
|
|
|
- $authGameList = request()->header('auth_game_list');
|
|
|
+ // $authGameList = request()->header('auth_game_list');
|
|
|
+ $userAuthCache = new UserInfoCache(getCurrentInfo()['id']);
|
|
|
+ $userInfo = $userAuthCache->getUserInfo();
|
|
|
+
|
|
|
+ $authGameList = $userInfo['deptList']['game_list'];
|
|
|
$query = $this->search($where);
|
|
|
- if(!empty($authGameList)) {
|
|
|
+ if(!empty($authGameList) && $authGameList!='*') {
|
|
|
$authGameList = explode(',', $authGameList);
|
|
|
$query->where('id', 'in', $authGameList);
|
|
|
}
|
|
|
@@ -60,9 +65,12 @@ class GameLogic extends BaseLogic
|
|
|
{
|
|
|
$hasPackage = $where['has_package']??false;
|
|
|
unset($where['has_package']);
|
|
|
- $authGameList = request()->header('auth_game_list');
|
|
|
+ $userAuthCache = new UserInfoCache(getCurrentInfo()['id']);
|
|
|
+ $userInfo = $userAuthCache->getUserInfo();
|
|
|
+
|
|
|
+ $authGameList = $userInfo['deptList']['game_list'];
|
|
|
$query = $this->search($where);
|
|
|
- if(!empty($authGameList)) {
|
|
|
+ if(!empty($authGameList) && $authGameList!='*') {
|
|
|
$authGameList = explode(',', $authGameList);
|
|
|
$query->where('id', 'in', $authGameList);
|
|
|
}
|