From fa5a47ea75089d56073579f73e95de81777d5397 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Mon, 16 Dec 2019 18:25:02 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E8=A1=8C=E4=B8=BA=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/DownloadController.class.php | 5 ++++- .../Home/Controller/PlayersController.class.php | 16 ++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 468fbd5f1..7fb7f3c61 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1897,13 +1897,16 @@ class DownloadController extends BaseController { foreach($data as $key => $v) { $v['create_time'] = date('Y-m-d H:i:s',$v['create_time']); $promoteInfo = M('promote','tab_')->field("nickname")->where(['id' => intval($v['promote_id'])])->find(); + $serverId = $v['server_id']; + $gameId = $v['game_id']; + $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find(); $v['promote_id']= $promoteInfo['nickname']; $csvData['extend'] = $this->encryption($v['extend']); $csvData['create_time'] = $v['create_time']; $csvData['user_account'] = $v['user_account']; $csvData['game_name'] = $v['game_name']; $csvData['promote_id'] = $v['promote_id']; - $csvData['server_name'] = $v['server_name']; + $csvData['server_name'] = $serverInfo['server_name']; $csvData['user_id'] = $v['game_player_id']; $csvData['game_player_name'] = $v['game_player_name']; $csvData['price'] = $v['price']; diff --git a/Application/Home/Controller/PlayersController.class.php b/Application/Home/Controller/PlayersController.class.php index 742c5b773..f067ef786 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')) + 24*3600; + $endTime = strtotime(I('endtime')); $levelPromote = $this->getLevelPromote(); $queryPromote = $this->getQueryPromote($levelPromote); // $loginPromote = $this->getLoginPromote(); @@ -60,11 +60,11 @@ class PlayersController extends BaseController { $map['tab_pay_info.game_player_id'] = $userId; } if (!empty($begTime) && !empty($endTime)) { - $map['tab_pay_info.create_time'] = ['between', [$begTime, $endTime - 1]]; + $map['tab_pay_info.create_time'] = ['between', [$begTime, $endTime + 24*3600 - 1]]; }else if (empty($begTime) && !empty($endTime)) { - $map['tab_pay_info.create_time'] = ['elt',$endTime]; + $map['tab_pay_info.create_time'] = ['elt',$endTime + 24*3600]; }else if (!empty($begTime) && empty($endTime)) { - $map['tab_pay_info.create_time'] = ['EGT',$begTime]; + $map['tab_pay_info.create_time'] = ['EGT',$begTime + 24*3600]; } $page = intval(I('get.p', 1)); $page = $page ? $page : 1; //默认显示第一页数据arraypage @@ -73,8 +73,12 @@ class PlayersController extends BaseController { foreach($rs as $key => $v) { $rs[$key]['extend'] = encryption($v['extend']); $rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']); - $promoteInfo = M('promote','tab_')->field("nickname")->where(['id' => intval($v['promote_id'])])->find(); - $rs[$key]['promote_id']= $promoteInfo['nickname']; + $promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find(); + $serverId = $v['server_id']; + $gameId = $v['game_id']; + $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find(); + $rs[$key]['server_name'] = $serverInfo['server_name']; + $rs[$key]['promote_id']= $promoteInfo['account']; } $count = M('pay_info', 'tab_') ->field('tab_pay_info.id') From 24d47089dd78f6addd6f157b67847a612b462d5f Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Mon, 16 Dec 2019 19:20:31 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E9=A2=84=E5=85=85?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/AjaxController.class.php | 11 +++++++ Application/Admin/View/BehaviorLog/index.html | 33 ++++++++++++++++--- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php index 4604dce71..4dbe626e8 100644 --- a/Application/Admin/Controller/AjaxController.class.php +++ b/Application/Admin/Controller/AjaxController.class.php @@ -96,6 +96,17 @@ class AjaxController extends ThinkController{ $this->AjaxReturn($data); } + public function getGameVersion($game_name="") + { + if ($game_name) { + $map['relation_game_name'] = $game_name; + }else { + $this->AjaxReturn([]); + } + $data = M('Game','tab_')->field('sdk_version')->where($map)->select(); + $this->AjaxReturn($data); + } + /** * 获取游戏折扣 * @param $game_id diff --git a/Application/Admin/View/BehaviorLog/index.html b/Application/Admin/View/BehaviorLog/index.html index 97b53ae2f..5ef1b52a3 100644 --- a/Application/Admin/View/BehaviorLog/index.html +++ b/Application/Admin/View/BehaviorLog/index.html @@ -68,8 +68,6 @@
@@ -217,7 +215,14 @@ layer.msg('时间间隔不能超过31天,请重新选择日期'); return false; } - + var game_name = $("#game_name").val(); + var sdk_version = $("#sdk_version").val(); + var server_name = $("#server_name").val(); + console.log(server_name) + if(game_name != '' && server_name == '') { + layer.msg('请选择区服'); + return false; + } var url = $(this).attr('url'); var query = $('.jssearch').find('input').serialize(); query += "&" + $('.jssearch').find('select').serialize(); @@ -430,7 +435,27 @@ }); $("#promote_level").change(); - var game_server = "{:I('server_name')}"; + + var game_server = "{:I('game_version')}"; + var sdk_version = "{:I('sdk_version')}"; + $("#game_name").change(function(){ + $.ajax({ + url:"{:U('Ajax/getGameVersion')}", + type:"post", + data:{game_name:$("#game_name option:selected").val()}, + dataType:'json', + success:function(data){ + str = ""; + for (var i in data){ + var version_name = data[i].sdk_version == "1" ? '安卓' : '苹果' + str += "" + } + $("#sdk_version").empty(); + $("#sdk_version").append(str); + $("#sdk_version").select2(); + } + }) + }); $("#sdk_version").change(function(){ $.ajax({ url:"{:U('Ajax/getGmeServer')}", From 6ddf42181c6a4d3035af7fea174c1cde102d07a4 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Mon, 16 Dec 2019 19:32:26 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=81=94=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/function.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index c76087014..1b51e7fd5 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -552,8 +552,13 @@ function getGameByName($game_name=null, $sdk_version=null) if ($sdk_version) { $map['sdk_version'] = $sdk_version; } - $result = D("Game")->where($map)->select(); - return $result; + $result = D("Game")->field('id')->where($map)->select(); + if(empty($result)) { + return [['id' => -1]]; + }else + { + return $result; + } } function getTopPromote($promote_id)