if ($thisParentPromoteId == 0 && $promoteRole == 3) {
$addPermission = 0;
}
// $addPermission = 1;//是否有添加游戏权限
// if ($thisParentPromoteId == 0 && $promoteRole == 3) {
// $addPermission = 0;
// }
$map['tab_game.online_status'] = 1;//开发者游戏上线状态
$map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请
@ -131,14 +131,14 @@ class ApplyController extends BaseController
$map['_complex'] = $where;
}
$join = 'inner join tab_apply on tab_game.id = tab_apply.game_id ';//查询上级游戏
$join = 'inner join tab_apply on tab_game.id = tab_apply.game_id and tab_apply.offline_status = 0';//查询上级游戏
}
$data = M('Game', 'tab_')
->field('tab_game.id,tab_game.icon,tab_game.game_name,tab_game.features,tab_game.sdk_version,tab_game.game_size,tab_game.game_type_name,tab_game.relation_game_name,ta_1.id as apply_id_1,ta_2.id as apply_id_2')
->join($join)
->join('left join tab_apply as ta_1 on tab_game.id = ta_1.game_id and ta_1.promote_id = ' . $promoteId)//查询是否拥有该游戏
->join('left join tab_apply as ta_2 on tab_game.relation_game_id = ta_2.game_id and tab_game.id != tab_game.relation_game_id and ta_2.promote_id = ' . $promoteId)//查询是否拥有关联游戏
->join('left join tab_apply as ta_1 on tab_game.id = ta_1.game_id and ta_1.offline_status = 0 and ta_1.promote_id = ' . $promoteId)//查询是否拥有该游戏
->join('left join tab_apply as ta_2 on tab_game.relation_game_id = ta_2.game_id and ta_2.offline_status = 0 and tab_game.id != tab_game.relation_game_id and ta_2.promote_id = ' . $promoteId)//查询是否拥有关联游戏
->join('left join tab_game_source on tab_game.id = tab_game_source.game_id')//查询游戏版本
->where($map)
->group($group)
@ -146,6 +146,9 @@ class ApplyController extends BaseController
->page($page, $row)
->select();
// var_dump($data);
// die;
/* 查询记录总数 */
$count = M("Game", "tab_")
->field('tab_game.id')
@ -175,7 +178,7 @@ class ApplyController extends BaseController
$data = M('game', 'tab_')->field('tab_game.id,tab_game.sdk_version,tab_game.icon,tab_game.screenshot,tab_game.relation_game_id,tab_game.relation_game_name,ta.enable_status,tab_game.dow_status,tab_game.features,tab_game.flooring_page_imgs')->where($map)->join('tab_apply ta ON ta.game_id = tab_game.id and ta.promote_id=' . $_GET['pid'])->select();
$data = M('game', 'tab_')->field('tab_game.id,tab_game.sdk_version,tab_game.icon,tab_game.screenshot,tab_game.relation_game_id,tab_game.relation_game_name,ta.enable_status,tab_game.dow_status,tab_game.features,tab_game.flooring_page_imgs')->where($map)->join('tab_apply ta ON ta.game_id = tab_game.id and ta.offline_status = 0 and ta.promote_id=' . $_GET['pid'])->select();
foreach ($data as $key => $value) {
if (!empty($value['flooring_page_imgs'])) {
@ -108,6 +115,7 @@ class HomeController extends Controller