From 2437d613bbeccac656c4b34ed22b7cf12403b29d Mon Sep 17 00:00:00 2001
From: sunke <18850253506@163.com>
Date: Fri, 22 Nov 2019 22:33:34 +0800
Subject: [PATCH 1/9] bug
---
.../Controller/DownloadController.class.php | 46 ++++++++++++++++++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php
index 72465e89d..d9c05a31b 100644
--- a/Application/Home/Controller/DownloadController.class.php
+++ b/Application/Home/Controller/DownloadController.class.php
@@ -1420,7 +1420,9 @@ class DownloadController extends BaseController {
'basicPromotes' => json_encode($basicPromotes,FALSE),
];
$map['promotes'] = json_encode($data,FALSE);
- $map['ids'] = $ids;
+ $map['parentsinfo'] = json_encode($parent,FALSE);;
+ $map['currentDisplay'] = $currentDisplay;
+ $map['ids'] = $ids;
if ($gameId > 0) {
$params['game_id'] = $gameId;
}
@@ -2693,6 +2695,15 @@ class DownloadController extends BaseController {
if(!empty($map['lock_status'])) {
$params['lock_status'] = $map["lock_status"];
}
+
+ if(!empty($map['parentsinfo'])) {
+ $parent = json_decode($map['parentsinfo'],TRUE);
+ unset($map['parentsinfo']);
+ }
+ if(!empty($map['currentDisplay'])) {
+ $currentDisplay = $map['currentDisplay'];
+ unset($map['currentDisplay']);
+ }
$params['begin_time'] = $map['begin_time'];
$params['end_time'] = $map['end_time'];
@@ -2707,6 +2718,39 @@ class DownloadController extends BaseController {
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
$records = [];
+ if (I('p', 1) == 1) {
+ $selfParams = $params;
+ $selfParams['isContainSubs'] = false;
+ $selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$parent['id']], $selfParams);
+ $selfCreateRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds([$parent['id']], $selfParams);
+ $selfNewCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds([$parent['id']], $selfParams);
+ // $selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$parent['id']], $selfParams);
+ $selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$parent['id']], $selfParams);
+
+ $selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$parent['id']], $selfParams);
+ $selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$parent['id']], $selfParams);
+ $selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$parent['id']], $selfParams);
+ $selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$parent['id']], $selfParams);
+ $records[] = [
+ 'id' => $parent['id'],
+ 'account' => $parent['account'],
+ 'real_name' => $parent['real_name'],
+ 'level' => $parent['level'],
+ 'create_role_count' => $selfCreateRoleCountList[$parent['id']],
+ 'create_role_user_count' => $selfCreateRoleUserCountList[$parent['id']],
+ 'new_create_role_user_count' => $selfNewCreateRoleUserCountList[$parent['id']],
+ // 'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$parent['id']],
+ 'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$parent['id']],
+ 'login_user_count' => $selfLoginUserCountList[$parent['id']],
+ 'recharge_count' => $selfRechargeCountList[$parent['id']],
+ 'recharge_user_count' => $selfRechargeUserCountList[$parent['id']],
+ 'recharge_amount' => $selfRechargeAmountList[$parent['id']]['ban_coin'] + $selfRechargeAmountList[$parent['id']]['coin'] + $selfRechargeAmountList[$parent['id']]['cash'],
+ 'recharge_by_ban_coin' => $selfRechargeAmountList[$parent['id']]['ban_coin'],
+ 'recharge_by_coin' => $selfRechargeAmountList[$parent['id']]['coin'],
+ 'recharge_by_cash' => $selfRechargeAmountList[$parent['id']]['cash'],
+ 'current_display' => $currentDisplay,
+ ];
+ }
foreach ($promotes as $promote) {
$id = $promote['id'];
$records[] = [
From dc6790b4041dd67b876fd650b9633a4e7052b433 Mon Sep 17 00:00:00 2001
From: "elf@home" <360197197@qq.com>
Date: Sun, 24 Nov 2019 10:42:04 +0800
Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Admin/Controller/RechargeSumController.class.php | 2 +-
Application/Admin/Controller/SpendController.class.php | 1 -
Application/Admin/View/Member/user_info.html | 4 ++--
Application/Home/Controller/DownloadController.class.php | 8 +++++---
Application/Home/Controller/QueryController.class.php | 4 +++-
5 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/Application/Admin/Controller/RechargeSumController.class.php b/Application/Admin/Controller/RechargeSumController.class.php
index c877ce33e..3c6b68fa8 100644
--- a/Application/Admin/Controller/RechargeSumController.class.php
+++ b/Application/Admin/Controller/RechargeSumController.class.php
@@ -48,7 +48,7 @@ class RechargeSumController extends ThinkController
}
//当天注册人数
- $registerNum = D('User')->where(array_merge($rmap, array('puid' => 0)))->join("tab_user_play on tab_user.id = tab_user_play.user_id and tab_user.fgame_id = tab_user_play.game_id")->field("tab_user.id")->select();
+ $registerNum = D('User')->where(array_merge($rmap, array('puid' => 0)))->join("tab_user_play on tab_user.id = tab_user_play.user_id and tab_user.fgame_id = tab_user_play.game_id", 'left')->field("tab_user.id")->select();
$registerNum = $registerNum ? array_column($registerNum, 'id') : [];
//当天活跃人数
diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php
index ade87c965..945cc790f 100644
--- a/Application/Admin/Controller/SpendController.class.php
+++ b/Application/Admin/Controller/SpendController.class.php
@@ -100,7 +100,6 @@ class SpendController extends ThinkController
$map = '1 = 2';
$map1 = $map;
}
- echo (D(self::model_name)->where($map1)->fetchSql(true)->sum('pay_amount'));
$total = null_to_0(D(self::model_name)->where($map1)->sum('pay_amount'));
$ttotal = null_to_0(D(self::model_name)->where('pay_time' . total(1))->where(array('pay_status' => 1))->sum('pay_amount'));
$ytotal = null_to_0(D(self::model_name)->where('pay_time' . total(5))->where(array('pay_status' => 1))->sum('pay_amount'));
diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html
index 3111dcb7f..313c68e1e 100644
--- a/Application/Admin/View/Member/user_info.html
+++ b/Application/Admin/View/Member/user_info.html
@@ -224,8 +224,8 @@
注册方式 |
注册时间 |
+ 注册IP |
最后登录时间 |
- 最后登录IP |
设备号 |
账号状态 |
拉黑状态 |
@@ -276,6 +276,7 @@
{$data.register_time|date='Y-m-d H:i:s',###} |
+ {$data.register_ip} |
空
@@ -283,7 +284,6 @@
{$data['login_time']|date='Y-m-d H:i:s',###}
|
- {$data.register_ip} |
{$data.device_number} |
diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php
index d9c05a31b..a88cc4292 100644
--- a/Application/Home/Controller/DownloadController.class.php
+++ b/Application/Home/Controller/DownloadController.class.php
@@ -1814,7 +1814,7 @@ class DownloadController extends BaseController {
array('create_time','创建时间'),
);
$model = M('user_play_info','tab_');
- $data = $model->field('user_account,promote_account,game_name,server_name,role_name,role_level')->where($map)->order('create_time desc')->select();
+ $data = $model->field('user_account,promote_account,game_name,server_name,role_name,role_level,create_time')->where($map)->order('create_time desc')->select();
$xlsData = [];
foreach ($data as $key1 => $value1) {
$value1['user_account'] = $this->encryption($value1['user_account']);
@@ -1875,7 +1875,7 @@ class DownloadController extends BaseController {
->join($serverJoin)//关联区服表
->where($map)
->group('tab_apply.game_id')
- ->order('g.sort desc,tab_apply.id desc')
+ ->order('g.sort desc,g.id desc')
->select();
$records = [];
if (!empty($data)) {
@@ -2813,7 +2813,9 @@ class DownloadController extends BaseController {
$subMap['create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]];
$roleIdMap = $subMap;
$roleIds = M('user_play_data_count', 'tab_')->where($roleIdMap)->group('role_id')->getField('role_id', true);
- $map['role_id'] = ['in', $roleIds];
+ if (count($roleIds) > 0) {
+ $map['role_id'] = ['in', $roleIds];
+ }
if ($costBegin != '' || $costEnd != '') {
$having = '';
if ($costBegin != '' && $costEnd != '') {
diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php
index c4d6fa044..8b2338baa 100644
--- a/Application/Home/Controller/QueryController.class.php
+++ b/Application/Home/Controller/QueryController.class.php
@@ -1772,7 +1772,9 @@ class QueryController extends BaseController
$subMap['create_time'] = ['between', [$begTime, $endTime - 1]];
$roleIdMap = $subMap;
$roleIds = M('user_play_data_count', 'tab_')->where($roleIdMap)->group('role_id')->getField('role_id', true);
- $map['role_id'] = ['in', $roleIds];
+ if (count($roleIds) > 0) {
+ $map['role_id'] = ['in', $roleIds];
+ }
if ($costBegin != '' || $costEnd != '') {
$having = '';
if ($costBegin != '' && $costEnd != '') {
From d176d51c5ce357a1e00a43ae9b741fd096f7b3bb Mon Sep 17 00:00:00 2001
From: tpingzhang <635929049@qq.com>
Date: Mon, 25 Nov 2019 10:20:07 +0800
Subject: [PATCH 3/9] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=86=99=E5=88=B0?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Controller/ToolController.class.php | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Application/Admin/Controller/ToolController.class.php b/Application/Admin/Controller/ToolController.class.php
index 6f177429b..449d853ef 100644
--- a/Application/Admin/Controller/ToolController.class.php
+++ b/Application/Admin/Controller/ToolController.class.php
@@ -339,6 +339,13 @@ class ToolController extends ThinkController {
$data[$name] = $config;
$configs=array_merge($configs,$data);
$result = file_put_contents($config_file, "where([
+ 'name' => 'age'
+ ])->save([
+ 'config' => $ageConfigJson
+ ]);
}
public function ios_game(){
From da794baa96a27c90a44ebb5eae5d16e609f0f782 Mon Sep 17 00:00:00 2001
From: tpingzhang <635929049@qq.com>
Date: Mon, 25 Nov 2019 10:22:16 +0800
Subject: [PATCH 4/9] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=86=99=E5=88=B0?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Controller/ToolController.class.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Application/Admin/Controller/ToolController.class.php b/Application/Admin/Controller/ToolController.class.php
index 449d853ef..8620da5a9 100644
--- a/Application/Admin/Controller/ToolController.class.php
+++ b/Application/Admin/Controller/ToolController.class.php
@@ -344,7 +344,9 @@ class ToolController extends ThinkController {
M('tool', 'tab_')->where([
'name' => 'age'
])->save([
- 'config' => $ageConfigJson
+ 'config' => $ageConfigJson,
+ 'type' => 1,
+ 'status' => $config['status']
]);
}
From 3cb2f2b47921de915f9efc6c9a9de0a7dc069c8c Mon Sep 17 00:00:00 2001
From: sunke <18850253506@163.com>
Date: Mon, 25 Nov 2019 10:46:14 +0800
Subject: [PATCH 5/9] =?UTF-8?q?arpu=E5=90=8D=E8=AF=8D=E8=AF=B4=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Home/View/default/Query/arpu.html | 22 +++++++++----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/Application/Home/View/default/Query/arpu.html b/Application/Home/View/default/Query/arpu.html
index 8a7c9619f..a3aa103aa 100644
--- a/Application/Home/View/default/Query/arpu.html
+++ b/Application/Home/View/default/Query/arpu.html
@@ -159,22 +159,22 @@
游戏名称 |
- 付费游戏数 |
+ 付费游戏数 |
所属渠道 |
- 活跃用户 |
- 新增用户 |
- 付费用户 |
- 新增付费用户 |
- 付费总额 |
- 付费率 |
- 新增付费额 |
- 累计付费用户 |
+ 活跃用户 |
+ 新增用户 |
+ 付费用户 |
+ 新增付费用户 |
+ 付费总额 |
+ 付费率 |
+ 新增付费额 |
+ 累计付费用户 |
- ARPU |
- ARPPU |
+ ARPU |
+ ARPPU |
详情 |
From 704dd789eb005adf0ee7ed5ae2d456e9a191ec90 Mon Sep 17 00:00:00 2001
From: tpingzhang <635929049@qq.com>
Date: Mon, 25 Nov 2019 10:50:02 +0800
Subject: [PATCH 6/9] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E9=98=B2=E6=B2=89?=
=?UTF-8?q?=E8=BF=B7=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Controller/ToolController.class.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Application/Admin/Controller/ToolController.class.php b/Application/Admin/Controller/ToolController.class.php
index 8620da5a9..ee888c619 100644
--- a/Application/Admin/Controller/ToolController.class.php
+++ b/Application/Admin/Controller/ToolController.class.php
@@ -342,11 +342,11 @@ class ToolController extends ThinkController {
$ageConfigJson = json_encode($config);
M('tool', 'tab_')->where([
- 'name' => 'age'
+ 'name' => $name
])->save([
'config' => $ageConfigJson,
'type' => 1,
- 'status' => $config['status']
+ 'status' => $config['status'] ? $config['status'] : $config['bat'];
]);
}
From 8bb10aea61a2d31bffd71ace4039ed7210800071 Mon Sep 17 00:00:00 2001
From: chenzhi <“chenzhi063@qq.com>
Date: Mon, 25 Nov 2019 10:52:10 +0800
Subject: [PATCH 7/9] =?UTF-8?q?[bug]=E7=8E=A9=E5=AE=B6=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E7=B4=AF=E8=AE=A1=E5=85=85=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Admin/Controller/MemberController.class.php | 11 +++++++----
Application/Admin/View/Member/user_info.html | 5 +++--
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php
index 01c9b978d..0d6029bf6 100644
--- a/Application/Admin/Controller/MemberController.class.php
+++ b/Application/Admin/Controller/MemberController.class.php
@@ -219,9 +219,11 @@ class MemberController extends ThinkController
->group('tab_user.id')
->where($hav)
->having($havs)->select(false);
+
+ $allcountsql = str_replace("tab_user.promote_id","ss.promote_id",$sql);
//获取总额
- $allcount = M()->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $sql . ') as a')->select();
- $this->assign('history_count', $allcount[0]['recharge_total']);
+ $allcount = M()->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $allcountsql . ') as a')->select();
+ $this->assign('history_count', $allcount[0]['recharge_total']?:0);
//替换为新表
if($_REQUEST['promote_id'] && $_REQUEST['promote_id'] > -1){
@@ -236,9 +238,10 @@ class MemberController extends ThinkController
}
$jcount = M('User', 'tab_')->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $sql . ') as a')->select();
- $count = $jcount[0]['count'];
+ $count = $jcount[0]['count'] ?:0 ;
+ $this->assign('user_count', $count);
// var_dump($jcount);die();
- $this->assign('now_count', $jcount[0]['recharge_total']);
+ $this->assign('now_count', $jcount[0]['recharge_total']?:0);
$model = M('Model')->getByName('user');
diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html
index 3111dcb7f..3faaa8021 100644
--- a/Application/Admin/View/Member/user_info.html
+++ b/Application/Admin/View/Member/user_info.html
@@ -310,7 +310,8 @@
当前用户累计充值:{$now_count}
- 历史累计充值:{$history_count}
+ 历史累计充值:{$history_count}
+ 用户数:{$user_count}
|
当前用户累计充值: 当前属于该推广员的用户的充值累计(不含用户换绑前记录) /
@@ -318,7 +319,7 @@
|
- 当前用户累计充值:{$now_count}
+ 当前用户累计充值:{$now_count} 用户数:{$user_count}
|
From f9307ee710e18df6a3e652a4f4e7a5ceac03a36b Mon Sep 17 00:00:00 2001
From: tpingzhang <635929049@qq.com>
Date: Mon, 25 Nov 2019 10:54:00 +0800
Subject: [PATCH 8/9] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E9=98=B2=E6=B2=89?=
=?UTF-8?q?=E8=BF=B7=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Controller/ToolController.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application/Admin/Controller/ToolController.class.php b/Application/Admin/Controller/ToolController.class.php
index ee888c619..58cb75272 100644
--- a/Application/Admin/Controller/ToolController.class.php
+++ b/Application/Admin/Controller/ToolController.class.php
@@ -346,7 +346,7 @@ class ToolController extends ThinkController {
])->save([
'config' => $ageConfigJson,
'type' => 1,
- 'status' => $config['status'] ? $config['status'] : $config['bat'];
+ 'status' => $config['status'] ? $config['status'] : $config['bat']
]);
}
From a0ab440e1a2c8db749c5f283a9f1ff87dc977ad2 Mon Sep 17 00:00:00 2001
From: tpingzhang <635929049@qq.com>
Date: Mon, 25 Nov 2019 11:11:38 +0800
Subject: [PATCH 9/9] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E9=98=B2=E6=B2=89?=
=?UTF-8?q?=E8=BF=B7=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Controller/ToolController.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application/Admin/Controller/ToolController.class.php b/Application/Admin/Controller/ToolController.class.php
index 58cb75272..5d36aab97 100644
--- a/Application/Admin/Controller/ToolController.class.php
+++ b/Application/Admin/Controller/ToolController.class.php
@@ -346,7 +346,7 @@ class ToolController extends ThinkController {
])->save([
'config' => $ageConfigJson,
'type' => 1,
- 'status' => $config['status'] ? $config['status'] : $config['bat']
+ 'status' => isset($config['status']) ? $config['status'] : $config['bat']
]);
}