master
ELF 5 years ago
parent bbdb9d8224
commit b7cf4c28a7

@ -212,4 +212,11 @@ class ApplyService {
return false;
}
}
public function getSociatyGameIds($promote)
{
$promoteService = new PromoteService();
$topPromote = $promoteService->getTopPromote($promote);
return M('sociaty_games', 'tab_')->where(['game_id' => $game['id'], 'promote_id' => $topPromote['id']])->getField('game_id', true);
}
}

@ -117,7 +117,6 @@ class ApplyController extends BaseController
if (count($gameIdList) > 0) {
$gameIds = implode(',', $gameIdList);
$map['tab_game.id'] = ['in', $gameIds];
} else {
$map = '1 = 2';

@ -173,6 +173,7 @@ class HomeController extends Controller
$columns = [
'id',
'sdk_version',
'apply_auth',
'icon',
'screenshot',
'relation_game_id',

@ -65,7 +65,7 @@ class PackageController extends Controller
}
$promote = M('promote', 'tab_')->field(['id', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find();
$game = M('game','tab_')->field(['id', 'game_name', 'sdk_version'])->where(['id' => $apply['game_id']])->find();
$game = M('game','tab_')->field(['id', 'game_name', 'sdk_version', 'apply_auth'])->where(['id' => $apply['game_id']])->find();
if (!$applyService->checkSociatyPerm($promote, $game)) {
$this->redirect("package/downloadError", ['message' => '该链接已经停止使用']);
}

Loading…
Cancel
Save