diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php
index 190eb19c6..1b51e7fd5 100644
--- a/Application/Admin/Common/function.php
+++ b/Application/Admin/Common/function.php
@@ -552,11 +552,11 @@ function getGameByName($game_name=null, $sdk_version=null)
if ($sdk_version) {
$map['sdk_version'] = $sdk_version;
}
- $result = D("Game")->where($map)->select();
- if(empty($result))
- {
+ $result = D("Game")->field('id')->where($map)->select();
+ if(empty($result)) {
return [['id' => -1]];
- }else{
+ }else
+ {
return $result;
}
}
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 9178333a7..b22b33d20 100644
--- a/Application/Admin/View/BehaviorLog/index.html
+++ b/Application/Admin/View/BehaviorLog/index.html
@@ -68,8 +68,6 @@
@@ -429,7 +427,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')}",
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')