@ -110,12 +110,16 @@ class MemberController extends ThinkController
}
$game_map = "";
if (isset($_REQUEST['game_type'])) {
$game_map .= " and tab_user_play.sdk_version = {$_REQUEST['game_type']}";
}
// if (isset($_REQUEST['game_type'])) {
// $game_map .= " and tab_user_play.sdk_version = {$_REQUEST['game_type']}";
// }
if (isset($_REQUEST['game_name'])) {
$game_map .= " and tab_user_play.game_name like '{$_REQUEST['game_name']}%'";
$game_map .= " and tab_user_play.game_id in (".implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')).")";
}
$game_play_map = '';
if (isset($_REQUEST['server_name'])) {
$game_play_map .= " and tab_user_play_info.server_name = '{$_REQUEST['server_name']}' ";
}
if (isset($_REQUEST['viplevel'])) {
@ -173,6 +177,7 @@ class MemberController extends ThinkController
$data = $usermodel->table('('.$sql1.') as a ')->field('a.id,a.device_number,a.age_status,a.account,a.balance,a.gold_coin,a.alipay,a.promote_id,a.register_type,a.promote_account,a.register_time,a.lock_status,a.register_way,a.register_type,a.register_ip,a.login_time,(a.deposit_total+IFNULL(sum(ss.pay_amount),0)) as recharge_total,check_status')
->join('left join tab_spend as ss on ss.user_id=a.id AND ss.pay_status = 1')
->join($game_map ? "tab_user_play on tab_user_play.user_id = a.id $game_map" : false)
->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = a.id $game_play_map" : false)
->page($page, $row)
->having($havs)
->group('a.id')
@ -186,6 +191,7 @@ class MemberController extends ThinkController
->join('left join tab_deposit AS b ON tab_user.id = b.user_id AND b.pay_status = 1')
->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1')
->join($game_map ? "tab_user_play on tab_user_play.user_id = tab_user.id $game_map" : false)
->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = tab_user.id $game_play_map" : false)
->where($map)
->group('tab_user.id')
->where($hav)
@ -690,6 +696,10 @@ class MemberController extends ThinkController