修改添加下級游戲無法顯示推廣員bug

master
ELF 5 years ago
parent 45184a3a83
commit c4b03c2a7d

@ -1670,7 +1670,7 @@ class ApplyController extends BaseController
$promoteIds = array_column($promotes, 'id'); $promoteIds = array_column($promotes, 'id');
$oldIds = M('apply', 'tab_')->where(['game_id' => $gameId, 'promote_id' => ['in', $promoteIds], 'offline_status' => 0])->getField('id', true); $oldIds = M('apply', 'tab_')->where(['game_id' => $gameId, 'promote_id' => ['in', $promoteIds], 'offline_status' => 0])->getField('id', true);
$newPromoteIds = array_diff($promoteIds, $oldIds); $newPromoteIds = $oldIds && count($oldIds) > 0 ? array_diff($promoteIds, $oldIds) : $promoteIds;
foreach ($promotes as $promote) { foreach ($promotes as $promote) {
if (in_array($promote['id'], $newPromoteIds)) { if (in_array($promote['id'], $newPromoteIds)) {
$newPromoteData[] = $promote; $newPromoteData[] = $promote;

Loading…
Cancel
Save