From 1b74318619204aa2d908c69536da0d1dd071b41a Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 4 Dec 2020 11:15:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/PromoteService.class.php | 7 ++++--- Application/Home/Controller/QueryController.class.php | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index c7976697b..23828a922 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -1247,9 +1247,10 @@ class PromoteService { $map = []; $map['_string'] = ' promote_id in(' . $this->subInSql($topPromote) . ')'; $map = $spendRepository->withIsCheck($map); - $historyGameIds = M('spend', 'tab_')->field(['distinct game_id'])->where($map)->getField('game_id', true); - if (!$historyGameIds) { - $historyGameIds = []; + $historyGames = M('spend', 'tab_')->field(['distinct game_id'])->where($map)->select(); + $historyGameIds = []; + if ($historyGames) { + $historyGameIds = array_column($historyGames, 'game_id'); } $nowGameIds = $topPromote['game_ids'] == '' ? [] : explode(',', $topPromote['game_ids']); return array_unique(array_merge($historyGameIds, $nowGameIds)); diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 21e662190..33305d090 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1298,9 +1298,9 @@ class QueryController extends BaseController $parameter['own_id'] = $ownId; $parameter['p'] = $page; $parameter['row'] = $row; - + $loginPromote = $this->getLoginPromote(); - + $map = []; $map = ['_string' => '1=1']; if ($ownId) { @@ -1323,7 +1323,7 @@ class QueryController extends BaseController $params['begin_time'] = $begTime; $params['end_time'] = $endTime - 1; - + $promoteService = new PromoteService(); $allGameIs = $promoteService->getHistoryGameIds($loginPromote); if ($allGameIs && count($allGameIs) > 0) { @@ -1334,7 +1334,6 @@ class QueryController extends BaseController $data = M('game', 'tab_')->where($map)->order('sort desc,id desc')->page($page, $row)->select(); $count = M('game', 'tab_')->where($map)->count(); - $records = []; $allData = []; if (!empty($data)) {