From 65e1ddbd93f502b80c9136dfc79497c24ad67b93 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Fri, 13 Dec 2019 17:25:25 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=85=85=E5=80=BC?= =?UTF-8?q?=E9=A2=84=E4=B8=8B=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/BehaviorLogController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index fbc566287..20f0213f4 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -17,7 +17,7 @@ class BehaviorLogController extends ThinkController $map['extend'] = $params['extend']; } if (isset($params['game_name'])) { - $game_id = ['in', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')]; + $game_id = ['in', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['sdk_version']), 'id')]; $map['game_id'] = $game_id; } if (isset($params['server_name'])) { From 95f7acd6ff1ded0c5c55ea89479b4a9ad76da173 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Fri, 13 Dec 2019 18:01:41 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=85=85=E5=80=BC?= =?UTF-8?q?=E9=A2=84=E4=B8=8B=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/BehaviorLogController.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index 20f0213f4..a4afb0d70 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -17,11 +17,13 @@ class BehaviorLogController extends ThinkController $map['extend'] = $params['extend']; } if (isset($params['game_name'])) { - $game_id = ['in', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['sdk_version']), 'id')]; + $game_id = ['in', array_column(getGameByName($params['game_name'], $params['sdk_version']), 'id')]; $map['game_id'] = $game_id; } if (isset($params['server_name'])) { - $map['server_name'] = $params['server_name']; + $game_id = M('game', 'tab_')->where(['relation_game_name' => $params['game_name'],'sdk_version' => $params['sdk_version']])->getField('id'); + $server_id = M('server', 'tab_')->where(['server_name' => $params['server_name'], 'game_id' => $game_id])->getField('server_num'); + $map['server_id'] = $server_id; } if (isset($params['user_nickname'])) { $map['user_nickname'] = $params['user_nickname']; From e949a4a60b22c60c4be9503c6172cf9d68b9cd45 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Fri, 13 Dec 2019 18:10:27 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=85=85=E5=80=BC?= =?UTF-8?q?=E9=A2=84=E4=B8=8B=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/BehaviorLogController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index a4afb0d70..126aa25e9 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -25,8 +25,8 @@ class BehaviorLogController extends ThinkController $server_id = M('server', 'tab_')->where(['server_name' => $params['server_name'], 'game_id' => $game_id])->getField('server_num'); $map['server_id'] = $server_id; } - if (isset($params['user_nickname'])) { - $map['user_nickname'] = $params['user_nickname']; + if (isset($params['game_player_name'])) { + $map['game_player_name'] = $params['game_player_name']; } if (isset($params['game_player_id'])) { $map['game_player_id'] = $params['game_player_id']; From fb425d3e9166eb1bddfe44860eeff39540b5c940 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Fri, 13 Dec 2019 18:31:21 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=85=85=E5=80=BC?= =?UTF-8?q?=E9=A2=84=E4=B8=8B=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/BehaviorLogController.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index 126aa25e9..87f299ebb 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -11,25 +11,25 @@ class BehaviorLogController extends ThinkController $map = []; if (isset($params['user_account'])) { - $map['user_account'] = $params['user_account']; + $map['tab_pay_info.user_account'] = $params['user_account']; } if (isset($params['extend'])) { - $map['extend'] = $params['extend']; + $map['tab_pay_info.extend'] = $params['extend']; } if (isset($params['game_name'])) { $game_id = ['in', array_column(getGameByName($params['game_name'], $params['sdk_version']), 'id')]; - $map['game_id'] = $game_id; + $map['tab_pay_info.game_id'] = $game_id; } if (isset($params['server_name'])) { $game_id = M('game', 'tab_')->where(['relation_game_name' => $params['game_name'],'sdk_version' => $params['sdk_version']])->getField('id'); $server_id = M('server', 'tab_')->where(['server_name' => $params['server_name'], 'game_id' => $game_id])->getField('server_num'); - $map['server_id'] = $server_id; + $map['tab_pay_info.server_id'] = $server_id; } if (isset($params['game_player_name'])) { - $map['game_player_name'] = $params['game_player_name']; + $map['tab_pay_info.game_player_name'] = $params['game_player_name']; } if (isset($params['game_player_id'])) { - $map['game_player_id'] = $params['game_player_id']; + $map['tab_pay_info.game_player_id'] = $params['game_player_id']; } @@ -40,7 +40,7 @@ class BehaviorLogController extends ThinkController $endDate = empty($params['timeend']) ? date('Y-m-d') : $params['timeend']; $startTime = strtotime($startDate); $endTime = strtotime($endDate) + 86399; - $map['create_time'] = array('BETWEEN', [$startTime, $endTime]); + $map['tab_pay_info.create_time'] = array('BETWEEN', [$startTime, $endTime]); if (isset($params['promote_id'])) { $promoteId = $params['promote_id']; if ($promoteId == 0) { @@ -52,7 +52,7 @@ class BehaviorLogController extends ThinkController $map['promote_id'] = ['in', $promoteIds]; } } - $data = M('pay_info', 'tab_')->where($map)->order('id DESC')->page($p, $row)->select(); + $data = M('pay_info', 'tab_')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->order('tab_pay_info.id DESC')->page($p, $row)->select(); foreach($data as $k => $v) { if(empty($v['extend'])) { From 47628f298168162385947e5ccbcfe6a36c57b90c Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Fri, 13 Dec 2019 19:54:44 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=85=85=E5=80=BC?= =?UTF-8?q?=E9=A2=84=E4=B8=8B=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/BehaviorLogController.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index 87f299ebb..e20238cca 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -52,14 +52,13 @@ class BehaviorLogController extends ThinkController $map['promote_id'] = ['in', $promoteIds]; } } - $data = M('pay_info', 'tab_')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->order('tab_pay_info.id DESC')->page($p, $row)->select(); - + $data = M('pay_info', 'tab_')->field('tab_pay_info.id,tab_pay_info.user_account,extend,tab_pay_info.create_time,tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.promote_account,tab_pay_info.order_id,tab_pay_info.game_player_id,tab_pay_info.game_player_name,price')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->order('tab_pay_info.id DESC')->page($p, $row)->select(); foreach($data as $k => $v) { if(empty($v['extend'])) { $data[$k]['extend'] = $v['order_id']; } } - $count = M('pay_info', 'tab_')->where($map)->count(); + $count = M('pay_info', 'tab_')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->count(); $page = set_pagination($count, $row); if ($page) { $this->assign('_page', $page); From eaf1cb3f176ee8e0abe2de683d7c9c592b472e95 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Mon, 16 Dec 2019 11:50:37 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=8C=BA=E6=9C=8D?= =?UTF-8?q?=E8=81=94=E5=8A=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/AjaxController.class.php | 2 ++ Application/Admin/Controller/BehaviorLogController.class.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php index 44cb0b5c3..4604dce71 100644 --- a/Application/Admin/Controller/AjaxController.class.php +++ b/Application/Admin/Controller/AjaxController.class.php @@ -82,6 +82,8 @@ class AjaxController extends ThinkController{ } if ($sdk_version) { $map['server_version'] = $game_map['sdk_version'] = $sdk_version; + }else { + $this->AjaxReturn([]); } $game = M("Game", 'tab_')->where($game_map)->getField('id', true); diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index e20238cca..3a754e5a0 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -52,7 +52,7 @@ class BehaviorLogController extends ThinkController $map['promote_id'] = ['in', $promoteIds]; } } - $data = M('pay_info', 'tab_')->field('tab_pay_info.id,tab_pay_info.user_account,extend,tab_pay_info.create_time,tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.promote_account,tab_pay_info.order_id,tab_pay_info.game_player_id,tab_pay_info.game_player_name,price')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->order('tab_pay_info.id DESC')->page($p, $row)->select(); + $data = M('pay_info', 'tab_')->field('tab_pay_info.id,tab_pay_info.user_account,extend,tab_pay_info.create_time,tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.promote_account,tab_pay_info.order_id,tab_pay_info.game_player_id,tab_pay_info.game_player_name,price,tab_server.server_name')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->order('tab_pay_info.id DESC')->page($p, $row)->select(); foreach($data as $k => $v) { if(empty($v['extend'])) { $data[$k]['extend'] = $v['order_id']; From a15e62988be8df9d837ea69f596edbc26443371b Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Mon, 16 Dec 2019 14:11:33 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E9=A2=84=E5=85=85?= =?UTF-8?q?=E5=80=BC-=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 2e6b1472d..332414b6b 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -1818,31 +1818,34 @@ class ExportController extends Controller $map = []; if (isset($params['user_account'])) { - $map['user_account'] = $params['user_account']; + $map['tab_pay_info.user_account'] = $params['user_account']; } if (isset($params['extend'])) { - $map['extend'] = $params['extend']; + $map['tab_pay_info.extend'] = $params['extend']; } if (isset($params['game_name'])) { - $game_id = ['in', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')]; - $map['game_id'] = $game_id; + $game_id = ['in', array_column(getGameByName($params['game_name'], $params['sdk_version']), 'id')]; + $map['tab_pay_info.game_id'] = $game_id; } if (isset($params['server_name'])) { - $map['server_name'] = $params['server_name']; + $game_id = M('game', 'tab_')->where(['relation_game_name' => $params['game_name'],'sdk_version' => $params['sdk_version']])->getField('id'); + $server_id = M('server', 'tab_')->where(['server_name' => $params['server_name'], 'game_id' => $game_id])->getField('server_num'); + $map['tab_pay_info.server_id'] = $server_id; } - if (isset($params['user_nickname'])) { - $map['user_nickname'] = $params['user_nickname']; + if (isset($params['game_player_name'])) { + $map['tab_pay_info.game_player_name'] = $params['game_player_name']; } if (isset($params['game_player_id'])) { - $map['game_player_id'] = $params['game_player_id']; + $map['tab_pay_info.game_player_id'] = $params['game_player_id']; } $startDate = empty($params['timestart']) ? date('Y-m-d', strtotime('-6 day', time())) : $params['timestart']; $endDate = empty($params['timeend']) ? date('Y-m-d') : $params['timeend']; $startTime = strtotime($startDate); $endTime = strtotime($endDate) + 86399; - $map['create_time'] = array('BETWEEN', [$startTime, $endTime]); - if ($promoteId = I('promote_id')) { + $map['tab_pay_info.create_time'] = array('BETWEEN', [$startTime, $endTime]); + if (isset($params['promote_id'])) { + $promoteId = $params['promote_id']; if ($promoteId == 0) { $map['promote_id'] = 0; } else { @@ -1852,10 +1855,14 @@ class ExportController extends Controller $map['promote_id'] = ['in', $promoteIds]; } } - $xlsData = M('pay_info', 'tab_')->where($map)->order('id DESC')->select(); - foreach($xlsData as $k => $v) { - $xlsData[$k]['create_time'] = date('Y-m-d H:i:s',$v['create_time']); + $data = M('pay_info', 'tab_')->field('tab_pay_info.id,tab_pay_info.user_account,extend,tab_pay_info.create_time,tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.promote_account,tab_pay_info.order_id,tab_pay_info.game_player_id,tab_pay_info.game_player_name,price,tab_server.server_name')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->order('tab_pay_info.id DESC')->select(); + foreach($data as $k => $v) { + $data[$k]['create_time'] = date('Y-m-d H:i:s',$v['create_time']); + if(empty($v['extend'])) { + $data[$k]['extend'] = $v['order_id']; + } } + $xlsData = $data; break; default: From bec8203d47968cb911d3201141d813a1aeaacab5 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 16 Dec 2019 15:42:36 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=88=91=E7=9A=84=E6=B8=B8=E6=88=8F--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/View/default/Apply/my_game.html | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/Application/Home/View/default/Apply/my_game.html b/Application/Home/View/default/Apply/my_game.html index 2fae01956..a709f5dd2 100644 --- a/Application/Home/View/default/Apply/my_game.html +++ b/Application/Home/View/default/Apply/my_game.html @@ -876,9 +876,20 @@ fontname: 'Ubuntu', fontcolor: '#ff9818', }; - var logo = $(linkTag).parents('.game-li').eq(0).find('.img-box').children('img')[0] - $('#game_link_ercode').empty().qrcode(options); - $("#game_link_ercode canvas")[0].getContext('2d').drawImage(logo, (qrcodeWidth - logoWidth) / 2, (qrcodeHeight - logoHeight) / 2, logoWidth, logoHeight); + + var logo = null; + var logoSrc = $(linkTag).parents('.game-li').eq(0).find('.img-box').children('img').attr('src'); + console.log(isImg(logoSrc)); + if (isImg(logoSrc)) { + logo = $(linkTag).parents('.game-li').eq(0).find('.img-box').children('img')[0] + } else { + var img = document.createElement('img'); + img.src = '__IMG__/game_icon.png'; + logo = img; + } + + $('#game_link_ercode').empty().qrcode(options); + $("#game_link_ercode canvas")[0].getContext('2d').drawImage(logo, (qrcodeWidth - logoWidth) / 2, (qrcodeHeight - logoHeight) / 2, logoWidth, logoHeight); $('#clipboard-btn').attr('data-text', response.data.url) $('#clipboard-btn').click() @@ -896,6 +907,15 @@ }); }); + function isImg(src) { + var img = new Image(); + img.src = src; + if (img.width > 0 || img.height > 0) { + return true; + } + return false; + } + var clipboard = new ClipboardJS('#clipboard-btn', { text: function(trigger) { return trigger.getAttribute('data-text'); 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 09/12] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=9F=A5=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); From 03edc87f4fb68298eb5bd304d0cb573e4acb6e44 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 16 Dec 2019 17:33:17 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6--=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 --- Application/Home/Controller/QueryController.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index dcdf36f6b..06e4a4e6c 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1879,6 +1879,7 @@ class QueryController extends BaseController ->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.role_id = uc.role_id') ->where($map) ->find(); From cb89467f6b3d0cbff7a1c86a45d1580b9edee172 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Mon, 16 Dec 2019 17:36:32 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/DownloadController.class.php | 7 ++++--- Application/Home/Controller/PlayersController.class.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 1b4ba9afa..468fbd5f1 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1196,13 +1196,14 @@ class DownloadController extends BaseController { empty(I('extend')) || $map['tab_pay_info.extend'] = I('extend'); empty(I('user_id')) || $map['tab_pay_info.game_player_id'] = I('user_id'); if (!empty($begTime) && !empty($endTime)) { - $map['tab_pay_info.create_time'] = ['between', [strtotime($begTime), strtotime($endTime) - 1]]; + $map['tab_pay_info.create_time'] = ['between', [strtotime($begTime), strtotime($endTime) +24*3600- 1]]; }else if (empty($begTime) && !empty($endTime)) { - $map['tab_pay_info.create_time'] = ['elt',strtotime($endTime)]; + $map['tab_pay_info.create_time'] = ['elt',strtotime($endTime) + 24*3600]; }else if (!empty($begTime) && empty($endTime)) { - $map['tab_pay_info.create_time'] = ['EGT',strtotime($begTime)]; + $map['tab_pay_info.create_time'] = ['EGT',strtotime($begTime) + 24*3600]; } + $conditions = json_encode($map,TRUE); $addtime = time(); $data = [ diff --git a/Application/Home/Controller/PlayersController.class.php b/Application/Home/Controller/PlayersController.class.php index b9172645d..742c5b773 100644 --- a/Application/Home/Controller/PlayersController.class.php +++ b/Application/Home/Controller/PlayersController.class.php @@ -22,7 +22,7 @@ class PlayersController extends BaseController { $userId = trim(I('user_id', '')); $extend = trim(I('extend', '')); //cp订单号 $begTime = strtotime(I('begtime')); - $endTime = strtotime(I('endtime')); + $endTime = strtotime(I('endtime')) + 24*3600; $levelPromote = $this->getLevelPromote(); $queryPromote = $this->getQueryPromote($levelPromote); // $loginPromote = $this->getLoginPromote(); From dc2c4ee6529e20603a926fedb51bf7723411dcdd Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 16 Dec 2019 17:50:20 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6--=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 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 06e4a4e6c..9af3fa9a9 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1877,14 +1877,20 @@ class QueryController extends BaseController $query = M()->alias('record') ->table($subQuery) ->order($orderBy); - $total = M('user_play_data_count', 'tab_')->alias('uc') + + list($records, $pagination, $count) = $this->paginate($query); + + $totalQuery = 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.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 uc.server_id = ui.server_id and ui.role_id = uc.role_id') + ->group('uc.role_id,uc.game_id,uc.server_id,uc.user_id,uc.id') ->where($map) + ->buildSql(); + $total = M()->alias('totals') + ->table($totalQuery) + ->field('sum(recharge_cost) recharge_cost,sum(recharge_count) recharge_count,sum(recharge_cost_today) as recharge_cost_today') ->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');