From 660397bf4f16b2f0cd3d1e476b8c8f3ccf38cefe Mon Sep 17 00:00:00 2001
From: sunke <18850253506@163.com>
Date: Thu, 12 Dec 2019 17:49:04 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E5=8F=8C=E4=B9=BE=E6=94=AF=E4=BB=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Home/Common/function.php | 3 ++
.../Controller/DownloadController.class.php | 1 +
.../Controller/PlayersController.class.php | 37 +++++++++++++++++++
.../Home/Controller/QueryController.class.php | 2 +
4 files changed, 43 insertions(+)
diff --git a/Application/Home/Common/function.php b/Application/Home/Common/function.php
index 892c35e21..1fb3c1774 100644
--- a/Application/Home/Common/function.php
+++ b/Application/Home/Common/function.php
@@ -393,6 +393,9 @@ function get_pay_way($id = null)
case 9:
return "双乾支付";
break;
+ case 15:
+ return "双乾支付-快捷";
+ break;
}
}
diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php
index 3f05a9ed8..fbb3391bc 100644
--- a/Application/Home/Controller/DownloadController.class.php
+++ b/Application/Home/Controller/DownloadController.class.php
@@ -27,6 +27,7 @@ class DownloadController extends BaseController {
7 => '苹果支付',
8 => '金猪支付',
9 => '双乾支付',
+ 15 => '双乾支付-快捷'
];
//提现状态
diff --git a/Application/Home/Controller/PlayersController.class.php b/Application/Home/Controller/PlayersController.class.php
index 486613b21..2f4829fb0 100644
--- a/Application/Home/Controller/PlayersController.class.php
+++ b/Application/Home/Controller/PlayersController.class.php
@@ -98,11 +98,13 @@ class PlayersController extends BaseController {
$parameter['level_promote_2'] = $levelPromote[0];
$parameter['level_promote_3'] = $levelPromote[1];
$parameter['level_promote_4'] = $levelPromote[2];
+ $serverData = $this->getServer($relationGameId, $sdkVersion);
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('listData',$rs);
+ $this->assign('serverData', $serverData);
$this->assign('initBegTime', I('begtime'));
$this->assign('initEndTime', I('endtime'));
$this->display();
@@ -134,4 +136,39 @@ class PlayersController extends BaseController {
}
return $queryPromote;
}
+
+ public function getServer($relationGameId, $sdkVersion)
+ {
+ $result['status'] = 0;
+ $result['data'] = [];
+
+ if (empty($relationGameId)) {
+ return $result;
+ }
+
+ $map['relation_game_id'] = intval($relationGameId);
+ empty($sdkVersion) || $map['sdk_version'] = intval($sdkVersion);
+
+ $gameIds = M('Game', 'tab_')
+ ->where($map)
+ ->getField('id', true);
+
+ if (empty($gameIds)) {
+ return $result;
+ }
+
+ $gameIds = implode(',', $gameIds);
+ $where['game_id'] = ['in', $gameIds];
+ $where['show_status'] = 1;
+
+ $serverData = M('Server', 'tab_')
+ ->field('server_id,server_name')
+ ->where($where)
+ ->order('server_version,start_time desc')
+ ->select();
+ $result['status'] = 1;
+ $result['data'] = $serverData;
+
+ return $result;
+ }
}
\ No newline at end of file
diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php
index 2d52f6888..631b0cdd0 100644
--- a/Application/Home/Controller/QueryController.class.php
+++ b/Application/Home/Controller/QueryController.class.php
@@ -20,6 +20,8 @@ class QueryController extends BaseController
0 => '平台币',
1 => '支付宝',
2 => '微信',
+ 9 => '双乾支付',
+ 15 => '双乾支付-快捷'
];
public static $payStatus = [
From dccb94c779afd9d721b4dadad975e89345601e5c Mon Sep 17 00:00:00 2001
From: tpingzhang <635929049@qq.com>
Date: Thu, 12 Dec 2019 18:06:31 +0800
Subject: [PATCH 2/4] tab_pay_info
---
Data/update.sql | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Data/update.sql b/Data/update.sql
index 95adabd49..8036ae36a 100644
--- a/Data/update.sql
+++ b/Data/update.sql
@@ -696,5 +696,12 @@ ALTER TABLE `tab_pay_info` ADD COLUMN `promote_id` int(11) NOT NULL DEFAULT '0'
ALTER TABLE `tab_pay_info` ADD COLUMN `game_player_id` varchar(30) DEFAULT '0' COMMENT '玩家游戏内id';
ALTER TABLE `tab_pay_info` ADD COLUMN `sdk_version` tinyint(2) DEFAULT '1' COMMENT '区别sdk版本1安卓 2苹果 ';
ALTER TABLE `tab_pay_info` ADD COLUMN `promote_account` varchar(30) DEFAULT '' COMMENT '推广员账号';
+
+ALTER TABLE `tab_pay_info`
+MODIFY COLUMN `game_player_id` varchar(255) NULL DEFAULT '0' COMMENT '玩家游戏内id' AFTER `promote_id`;
+ALTER TABLE `tab_pay_info`
+ADD COLUMN `ip` varchar(255) NOT NULL DEFAULT '0' AFTER `promote_account`,
+ADD COLUMN `pay_way` int NOT NULL DEFAULT 0 AFTER `ip`;
+
-- 菜单(游戏充值预下单)
INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) VALUES ('游戏充值预下单', 16, 0, 'BehaviorLog/game', 0, '', '行为日志', 0, 1);
From 01ef816ee16117d84052e8c6d0e97e8e8eb3bf2e Mon Sep 17 00:00:00 2001
From: chenxiaojun <956334972@qq.com>
Date: Thu, 12 Dec 2019 19:59:21 +0800
Subject: [PATCH 3/4] =?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=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Home/Controller/QueryController.class.php | 1 +
Application/Home/View/default/Query/recharge.html | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php
index ae018a7b8..66a4fa08b 100644
--- a/Application/Home/Controller/QueryController.class.php
+++ b/Application/Home/Controller/QueryController.class.php
@@ -174,6 +174,7 @@ class QueryController extends BaseController
break;
}
$list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8);
+ $list['pay_time'] = ($list['pay_status'] == 1) ? date('Y-m-d H:i:s', $list['pay_time']) : '--';
$list['pay_status'] = isset(QueryController::$payStatus[$list['pay_status']]) ? QueryController::$payStatus[$list['pay_status']] : '未知状态';
$list['sdk_version'] = getSDKTypeName($list['sdk_version']);
diff --git a/Application/Home/View/default/Query/recharge.html b/Application/Home/View/default/Query/recharge.html
index a7f02d908..89728f917 100644
--- a/Application/Home/View/default/Query/recharge.html
+++ b/Application/Home/View/default/Query/recharge.html
@@ -216,7 +216,7 @@
{$vo.p_p_pro_account}({$vo.p_p_pro_real_name}) |
{$vo.p_pro_account}({$vo.p_pro_real_name}) |
{$vo.pro_account}({$vo.pro_real_name}) |
- {$vo.pay_time|date='Y-m-d H:i:s',###} |
+ {$vo.pay_time} |
From 3a20c6811783557d1abb1f757898a67c0d973107 Mon Sep 17 00:00:00 2001
From: zhanglingsheng
Date: Thu, 12 Dec 2019 20:35:23 +0800
Subject: [PATCH 4/4] =?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=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Admin/Controller/AjaxController.class.php | 2 +
.../BehaviorLogController.class.php | 51 +++++++----------
.../Controller/ExportController.class.php | 56 +++++++++++++++++++
Application/Admin/View/BehaviorLog/index.html | 2 +-
4 files changed, 80 insertions(+), 31 deletions(-)
diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php
index 8db3fc557..44cb0b5c3 100644
--- a/Application/Admin/Controller/AjaxController.class.php
+++ b/Application/Admin/Controller/AjaxController.class.php
@@ -77,6 +77,8 @@ class AjaxController extends ThinkController{
$game_map = [];
if ($game_name) {
$game_map['relation_game_name'] = $game_name;
+ }else {
+ $this->AjaxReturn([]);
}
if ($sdk_version) {
$map['server_version'] = $game_map['sdk_version'] = $sdk_version;
diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php
index ec5612d45..f7673445a 100644
--- a/Application/Admin/Controller/BehaviorLogController.class.php
+++ b/Application/Admin/Controller/BehaviorLogController.class.php
@@ -9,34 +9,27 @@ class BehaviorLogController extends ThinkController
{
$params = I('get.');
- $ignoreData = ['p', 'row', 'timestart', 'timeend', 'promote_id'];
$map = [];
- // if (isset($params['user_account'])) {
- // $map['user_account'] = $params['user_account'];
- // }
- // if (isset($params['extend'])) {
- // $map['extend'] = $params['extend'];
- // }
- // if (isset($params['game_name'])) {
- // $map['game_name'] = $params['game_name'];
- // }
- // if (isset($params['server_name'])) {
- // $map['server_name'] = $params['server_name'];
- // }
- // if (isset($params['sdk_version'])) {
- // $map['sdk_version'] = $params['sdk_version'];
- // }
- // if (isset($params['user_nickname'])) {
- // $map['user_nickname'] = $params['user_nickname'];
- // }
- // if (isset($params['game_player_id'])) {
- // $map['game_player_id'] = $params['game_player_id'];
- // }
- foreach ($params as $k => $v) {
- if (!in_array($k, $ignoreData)) {
- $map[$k] = $v;
- }
+ if (isset($params['user_account'])) {
+ $map['user_account'] = $params['user_account'];
+ }
+ if (isset($params['extend'])) {
+ $map['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;
+ }
+ if (isset($params['server_name'])) {
+ $map['server_name'] = $params['server_name'];
}
+ if (isset($params['user_nickname'])) {
+ $map['user_nickname'] = $params['user_nickname'];
+ }
+ if (isset($params['game_player_id'])) {
+ $map['game_player_id'] = $params['game_player_id'];
+ }
+
$p = $params['p'] ? $params['p'] : 1;
$row = $params['row'] ? $params['row'] : 10;
@@ -52,10 +45,8 @@ class BehaviorLogController extends ThinkController
} else {
$promoteMap['chain'] = ['like', "%/$promoteId/%"];
$promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true);
- if(empty($promoteIds)) {
- $promoteIds[] = $promoteIds;
- }
- $map['promote_id'] = ['in', $promoteIds];
+ $promoteIds[] = $promoteId;
+ $map['promote_id'] = ['in', $promoteIds];
}
}
$data = M('pay_info', 'tab_')->where($map)->order('id DESC')->page($p, $row)->select();
diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php
index 7cd7b86cb..bde87f2c0 100644
--- a/Application/Admin/Controller/ExportController.class.php
+++ b/Application/Admin/Controller/ExportController.class.php
@@ -1753,6 +1753,62 @@ class ExportController extends Controller
$xlsData[$key]['developers'] = get_developers_account($value['developers'],'account');
}
break;
+ case 21:
+ $xlsCell = array(
+ array('extend', 'CP订单号'),
+ array('create_time', '充值时间'),
+ array('user_account', '玩家账号'),
+ array('game_name', '游戏名称'),
+ array('server_name', '游戏区服'),
+ array('promote_account', '所属推广员'),
+ array('game_player_id', '角色ID'),
+ array('game_player_name', '角色名称'),
+ array('price', '订单金额'),
+ );
+ $params = I('get.');
+
+ $map = [];
+ if (isset($params['user_account'])) {
+ $map['user_account'] = $params['user_account'];
+ }
+ if (isset($params['extend'])) {
+ $map['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;
+ }
+ if (isset($params['server_name'])) {
+ $map['server_name'] = $params['server_name'];
+ }
+ if (isset($params['user_nickname'])) {
+ $map['user_nickname'] = $params['user_nickname'];
+ }
+ if (isset($params['game_player_id'])) {
+ $map['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')) {
+ if ($promoteId == 0) {
+ $map['promote_id'] = 0;
+ } else {
+ $promoteMap['chain'] = ['like', "%/$promoteId/%"];
+ $promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true);
+ $promoteIds[] = $promoteId;
+ $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']);
+ }
+ break;
+
default:
$xlsName = $xlsCell = $xlsData = [];
diff --git a/Application/Admin/View/BehaviorLog/index.html b/Application/Admin/View/BehaviorLog/index.html
index 446c5a642..97b53ae2f 100644
--- a/Application/Admin/View/BehaviorLog/index.html
+++ b/Application/Admin/View/BehaviorLog/index.html
@@ -169,7 +169,7 @@
-
+
导出
{$_page|default=''}