|
|
|
@ -132,6 +132,15 @@ class ApplyController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 0:
|
|
|
|
|
$applyService = new ApplyService();
|
|
|
|
|
$gameIdList = $applyService->getSociatyGameIds($loginPromote);
|
|
|
|
|
if (count($gameIdList) > 0) {
|
|
|
|
|
$gameIds = implode(',', $gameIdList);
|
|
|
|
|
$map['tab_game.id'] = ['in', $gameIds];
|
|
|
|
|
} else {
|
|
|
|
|
$map = '1 = 2';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$page = intval(I('get.p', 0));
|
|
|
|
@ -615,8 +624,13 @@ class ApplyController extends BaseController
|
|
|
|
|
$promoteId = $_REQUEST['promote_id'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$applyService = new ApplyService();
|
|
|
|
|
$gameIdList = $applyService->getSociatyGameIds($loginPromote);
|
|
|
|
|
|
|
|
|
|
$applyMap['promote_id'] = $promoteId;
|
|
|
|
|
$applyMap['offline_status'] = 0;
|
|
|
|
|
$applyMap['game_id'] = ['in', $gameIdList];
|
|
|
|
|
|
|
|
|
|
$gameIds = M('Apply', 'tab_')->where($applyMap)->getField('game_id', true);
|
|
|
|
|
$gameIds = implode(',', $gameIds);
|
|
|
|
|
|
|
|
|
@ -1795,7 +1809,7 @@ class ApplyController extends BaseController
|
|
|
|
|
$promoteId = $promote['id'];
|
|
|
|
|
}
|
|
|
|
|
$apply = M('apply', 'tab_')->where(['promote_id' => $promoteId, 'game_id' => $gameId])->find();
|
|
|
|
|
$game = M('game', 'tab_')->field(['icon'])->where(['id' => $gameId])->find();
|
|
|
|
|
$game = M('game', 'tab_')->field(['id', 'icon', 'apply_auth'])->where(['id' => $gameId])->find();
|
|
|
|
|
if ($apply == null) {
|
|
|
|
|
$this->ajaxReturn([
|
|
|
|
|
'status' => 0,
|
|
|
|
@ -1805,6 +1819,16 @@ class ApplyController extends BaseController
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$applyService = new ApplyService();
|
|
|
|
|
if (!$applyService->checkSociatyPerm($promote, $game)) {
|
|
|
|
|
$this->ajaxReturn([
|
|
|
|
|
'status' => 0,
|
|
|
|
|
'message' => '该游戏未授权',
|
|
|
|
|
'data' => [
|
|
|
|
|
]
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$promoteService = new PromoteService();
|
|
|
|
|
if (!$promoteService->canPresidentApplyGame($promote)) {
|
|
|
|
|
$this->ajaxReturn([
|
|
|
|
@ -1817,7 +1841,6 @@ class ApplyController extends BaseController
|
|
|
|
|
|
|
|
|
|
$icon = Request::getHost() . '/' . get_cover($game['icon'], 'path');
|
|
|
|
|
|
|
|
|
|
$applyService = new ApplyService();
|
|
|
|
|
$result = $applyService->checkApplyStatus($apply);
|
|
|
|
|
if (!$result['status']) {
|
|
|
|
|
$this->ajaxReturn([
|
|
|
|
@ -1847,7 +1870,8 @@ class ApplyController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$apply = M('apply', 'tab_')->where(['promote_id' => $promoteId, 'game_id' => $gameId])->find();
|
|
|
|
|
$game = M('game', 'tab_')->field(['icon'])->where(['id' => $gameId])->find();
|
|
|
|
|
$game = M('game', 'tab_')->field(['icon', 'apply_auth', 'id'])->where(['id' => $gameId])->find();
|
|
|
|
|
|
|
|
|
|
if ($apply == null) {
|
|
|
|
|
$this->ajaxReturn([
|
|
|
|
|
'status' => 1,
|
|
|
|
@ -1857,6 +1881,16 @@ class ApplyController extends BaseController
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$applyService = new ApplyService();
|
|
|
|
|
if (!$applyService->checkSociatyPerm($promote, $game)) {
|
|
|
|
|
$this->ajaxReturn([
|
|
|
|
|
'status' => 0,
|
|
|
|
|
'message' => '该游戏未授权',
|
|
|
|
|
'data' => [
|
|
|
|
|
]
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$promoteService = new PromoteService();
|
|
|
|
|
if (!$promoteService->canPresidentApplyGame($promote)) {
|
|
|
|
|
$this->ajaxReturn([
|
|
|
|
@ -1869,7 +1903,6 @@ class ApplyController extends BaseController
|
|
|
|
|
|
|
|
|
|
$icon = Request::getHost() . '/' . get_cover($game['icon'], 'path');
|
|
|
|
|
|
|
|
|
|
$applyService = new ApplyService();
|
|
|
|
|
$result = $applyService->checkApplyStatus($apply);
|
|
|
|
|
if (!$result['status']) {
|
|
|
|
|
$this->ajaxReturn([
|
|
|
|
|