|
|
|
@ -66,11 +66,11 @@ class ApplyController extends BaseController
|
|
|
|
|
{
|
|
|
|
|
$loginPromote = $this->getLoginPromote();
|
|
|
|
|
|
|
|
|
|
$promoteId = empty(I('promote_id')) ? $loginPromote['id'] : I('promote_id');//搜索的渠道ID
|
|
|
|
|
$promoteRole = empty(I('promote_role')) ? 1 : I('promote_role');//渠道角色
|
|
|
|
|
$parentPromoteId = getParentPromoteId($promoteId);//上级渠道ID
|
|
|
|
|
$grandPromoteId = getGrandPromoteId($promoteId);//本账号会长渠道ID
|
|
|
|
|
$childGameAddPermission = getChildGameAddPermission($grandPromoteId);//游戏添加权限
|
|
|
|
|
$promoteId = empty(I('promote_id')) ? $loginPromote['id'] : I('promote_id'); //搜索的渠道ID
|
|
|
|
|
$promoteRole = empty(I('promote_role')) ? 1 : I('promote_role'); //渠道角色
|
|
|
|
|
$parentPromoteId = getParentPromoteId($promoteId); //上级渠道ID
|
|
|
|
|
$grandPromoteId = getGrandPromoteId($promoteId); //本账号会长渠道ID
|
|
|
|
|
$childGameAddPermission = getChildGameAddPermission($grandPromoteId); //游戏添加权限
|
|
|
|
|
|
|
|
|
|
$map['tab_game.online_status'] = 1;//开发者游戏上线状态
|
|
|
|
|
$map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请
|
|
|
|
@ -1622,17 +1622,28 @@ class ApplyController extends BaseController
|
|
|
|
|
|
|
|
|
|
$gameData['sdk_name'] = getSDKTypeName($gameData['sdk_version']);
|
|
|
|
|
|
|
|
|
|
$promoteIds = getAllPromoteListByType($promoteType);
|
|
|
|
|
$promotes = getAllPromoteListByType($promoteType);
|
|
|
|
|
|
|
|
|
|
M('apply', 'tab_')->where(array('game_id' => $gameId, 'promote_id' => $value['id'], 'offline_status' => 0))->count('id');
|
|
|
|
|
|
|
|
|
|
$newPromoteData = [];
|
|
|
|
|
if (count($promoteIds) > 0) {
|
|
|
|
|
foreach ($promoteIds as $value) {
|
|
|
|
|
if (count($promotes) > 0) {
|
|
|
|
|
|
|
|
|
|
$promoteIds = array_column($promotes, 'id');
|
|
|
|
|
$oldIds = M('apply', 'tab_')->where(['game_id' => $gameId, 'promote_id' => ['in', $promoteIds], 'offline_status' => 0])->getField('id', true);
|
|
|
|
|
$newPromoteIds = array_diff($promoteIds, $oldIds);
|
|
|
|
|
foreach ($promotes as $promote) {
|
|
|
|
|
if (in_array($promote['id'], $newPromoteIds)) {
|
|
|
|
|
$newPromoteData[] = $promote;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* foreach ($promoteIds as $value) {
|
|
|
|
|
$thisPromote = M('apply', 'tab_')->where(array('game_id' => $gameId, 'promote_id' => $value['id'], 'offline_status' => 0))->count('id');
|
|
|
|
|
|
|
|
|
|
if (!$thisPromote) {
|
|
|
|
|
$newPromoteData[] = $value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$data['game_data'] = $gameData;
|
|
|
|
|