From 65e1ddbd93f502b80c9136dfc79497c24ad67b93 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Fri, 13 Dec 2019 17:25:25 +0800 Subject: [PATCH 1/7] =?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 2/7] =?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 3/7] =?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 4/7] =?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 5/7] =?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 6/7] =?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 7/7] =?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: