推广员列表显示

master
ELF 5 years ago
parent 2cc1bd221f
commit b4d35af3cb

@ -217,6 +217,10 @@ class ApplyService {
{ {
$promoteService = new PromoteService(); $promoteService = new PromoteService();
$topPromote = $promoteService->getTopPromote($promote); $topPromote = $promoteService->getTopPromote($promote);
return M('sociaty_games', 'tab_')->where(['game_id' => $game['id'], 'promote_id' => $topPromote['id']])->getField('game_id', true); $tempIds = M('sociaty_games', 'tab_')->where(['promote_id' => $topPromote['id']])->getField('game_id', true);
$tempIds = $tempIds ?? [];
$ids = M('game', 'tab_')->where(['apply_auth' => 1])->getField('id', true);
$ids = $ids ?? [];
return array_merge($tempIds, $ids);
} }
} }

@ -92,6 +92,10 @@ class ApplyController extends BaseController
$map['tab_game.sdk_version'] = $type; $map['tab_game.sdk_version'] = $type;
$applyService = new ApplyService();
$tempIds = $applyService->getSociatyGameIds($loginPromote);
$gameIdList = array_intersect($gameIdList, $tempIds);
if (count($gameIdList) > 0) { if (count($gameIdList) > 0) {
$gameIds = implode(',', $gameIdList); $gameIds = implode(',', $gameIdList);
@ -115,6 +119,10 @@ class ApplyController extends BaseController
} else { } else {
$gameIdList = M('Game', 'tab_')->group('relation_game_id')->having('count(id) = 2')->getField('id', true); $gameIdList = M('Game', 'tab_')->group('relation_game_id')->having('count(id) = 2')->getField('id', true);
$applyService = new ApplyService();
$tempIds = $applyService->getSociatyGameIds($loginPromote);
$gameIdList = array_intersect($gameIdList, $tempIds);
if (count($gameIdList) > 0) { if (count($gameIdList) > 0) {
$gameIds = implode(',', $gameIdList); $gameIds = implode(',', $gameIdList);
$map['tab_game.id'] = ['in', $gameIds]; $map['tab_game.id'] = ['in', $gameIds];

Loading…
Cancel
Save