From 9c9396351b0ebad03e1d5b03d2971d9229f1ed33 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 16 Dec 2019 16:51:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=AE=A1=E7=90=86>=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2--=E6=A3=80=E7=B4=A2bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 31add93cd..dcdf36f6b 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -211,6 +211,7 @@ class QueryController extends BaseController $parameter['level_promote_3'] = $levelPromote[1]; $parameter['level_promote_4'] = $levelPromote[2]; !isset($_REQUEST['pay_way']) || $parameter['pay_way'] = I('pay_way'); + !isset($_REQUEST['pay_status']) || $parameter['pay_status'] = I('pay_status', -1); $serverData = $this->getServer(I('relation_game_id'), I('sdk_version')); $page = set_pagination($count, $row, $parameter); @@ -1857,7 +1858,7 @@ class QueryController extends BaseController } $map['uc.create_time'] = ['between', [$begTime, $endTime - 1]]; - $fieldUC = "sum(uc.recharge_cost) recharge_cost,sum(uc.recharge_count) recharge_count,sum(if(uc.create_time = {$nowTime},uc.recharge_cost,0)) as recharge_cost_today"; + $fieldUC = "sum(uc.recharge_cost) recharge_cost,sum(uc.recharge_count) recharge_count,sum(if(uc.create_time = {$nowTime},uc.recharge_cost,0)) as recharge_cost_today,uc.user_id"; $fieldUI = "ui.user_account,ui.game_name,ui.role_name,ui.role_level,ui.server_name,ui.play_time,ui.play_ip,ui.promote_account,ui.sdk_version,ui.create_time"; $loginRecordMap['lr.create_time'] = $map['uc.create_time']; @@ -1869,22 +1870,25 @@ class QueryController extends BaseController $field = $fieldUC . ',' . $fieldUI . ',' . $fieldLR . ' as user_game_login_count'; $subQuery = M('user_play_data_count', 'tab_')->alias('uc') ->field($field) - ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') + ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.role_id = uc.role_id') ->where($map) - ->group('uc.role_id,uc.server_id,uc.game_id') + ->group('uc.role_id,uc.game_id,uc.user_id,uc.id') ->buildSql(); $query = M()->alias('record') ->table($subQuery) ->order($orderBy); $total = M('user_play_data_count', 'tab_')->alias('uc') ->field($fieldUC) - ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') ->where($map) ->find(); list($records, $pagination, $count) = $this->paginate($query); foreach ($records as &$list) { + if (empty($list['user_account']) ) { + $list['user_account'] = M('user', 'tab_')->where("id = {$list['user_id']}")->getField('account'); + $list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']); + } $list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']); $list['game_name'] = empty($list['game_name']) ? '--' : $list['game_name']; $list['sdk_version'] = empty($list['sdk_version']) ? '--' : getSDKTypeName($list['sdk_version']); @@ -1897,7 +1901,6 @@ class QueryController extends BaseController $list['promote_account'] = empty($list['promote_account']) ? '--' : $list['promote_account']; } } - $games = get_promote_serach_game(); $this->assign('games', $games);