From adb10b295973eca336568961f9e3d623fabf23e1 Mon Sep 17 00:00:00 2001
From: ELF <360197197@qq.com>
Date: Mon, 18 Nov 2019 21:21:46 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Home/Controller/QueryController.class.php | 135 +++++++++---------
.../Home/View/default/Query/achievement.html | 5 +
Application/Home/View/default/Query/arpu.html | 2 +-
3 files changed, 77 insertions(+), 65 deletions(-)
diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php
index 8bdc74c03..326efccd2 100644
--- a/Application/Home/Controller/QueryController.class.php
+++ b/Application/Home/Controller/QueryController.class.php
@@ -755,7 +755,7 @@ class QueryController extends BaseController
$timeout = 0;
$records = [];
- if (intval($endTime - $beginTime) / (24 * 3600) <= 31) {
+ if (intval($endTime - $beginTime) / (24 * 3600) <= 7) {
$userRepository = new UserRepository();
$spendRepository = new SpendRepository();
$payGameCountList = $spendRepository->getPayGameCountGroupByDay($params);
@@ -2040,72 +2040,78 @@ class QueryController extends BaseController
list($beginTime, $endTime) = $this->getBetweenTime($time);
$params['begin_time'] = $beginTime;
$params['end_time'] = $endTime;
- $promoteRepository = new PromoteRepository();
- $createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params);
- $createRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds($ids, $params);
- $newCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds($ids, $params);
- // $newCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds($ids, $params);
- $newCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds($ids, $params);
- $loginUserCountList = $promoteRepository->getLoginUserCountByIds($ids, $params);
- $rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params);
- $rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
- $rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
+ $timeout = 0;
$records = [];
- if (I('p', 1) == 1) {
- $selfParams = $params;
- $selfParams['isContainSubs'] = false;
- $selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$promote['id']], $selfParams);
- $selfCreateRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds([$promote['id']], $selfParams);
- $selfNewCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds([$promote['id']], $selfParams);
- // $selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$promote['id']], $selfParams);
- $selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$promote['id']], $selfParams);
- $selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$promote['id']], $selfParams);
- $selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$promote['id']], $selfParams);
- $selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$promote['id']], $selfParams);
- $selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$promote['id']], $selfParams);
+ if (intval($endTime - $beginTime) / (24 * 3600) <= 7) {
+ $promoteRepository = new PromoteRepository();
+ $createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params);
+ $createRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds($ids, $params);
+ $newCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds($ids, $params);
+ // $newCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds($ids, $params);
+ $newCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds($ids, $params);
+ $loginUserCountList = $promoteRepository->getLoginUserCountByIds($ids, $params);
+ $rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params);
+ $rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
+ $rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
+
+ if (I('p', 1) == 1) {
+ $selfParams = $params;
+ $selfParams['isContainSubs'] = false;
+ $selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$promote['id']], $selfParams);
+ $selfCreateRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds([$promote['id']], $selfParams);
+ $selfNewCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds([$promote['id']], $selfParams);
+ // $selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$promote['id']], $selfParams);
+ $selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$promote['id']], $selfParams);
+ $selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$promote['id']], $selfParams);
+ $selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$promote['id']], $selfParams);
+ $selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$promote['id']], $selfParams);
+ $selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$promote['id']], $selfParams);
- $records[] = [
- 'id' => $parent['id'],
- 'account' => $parent['account'],
- 'real_name' => $parent['real_name'],
- 'level' => $parent['level'],
- 'create_role_count' => $selfCreateRoleCountList[$promote['id']],
- 'create_role_user_count' => $selfCreateRoleUserCountList[$promote['id']],
- 'new_create_role_user_count' => $selfNewCreateRoleUserCountList[$promote['id']],
- // 'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$promote['id']],
- 'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$promote['id']],
- 'login_user_count' => $selfLoginUserCountList[$promote['id']],
- 'recharge_count' => $selfRechargeCountList[$promote['id']],
- 'recharge_user_count' => $selfRechargeUserCountList[$promote['id']],
- 'recharge_amount' => $selfRechargeAmountList[$promote['id']]['ban_coin'] + $rechargeAmountList[$promote['id']]['coin'] + $rechargeAmountList[$promote['id']]['cash'],
- 'recharge_by_ban_coin' => $selfRechargeAmountList[$promote['id']]['ban_coin'],
- 'recharge_by_coin' => $selfRechargeAmountList[$promote['id']]['coin'],
- 'recharge_by_cash' => $selfRechargeAmountList[$promote['id']]['cash'],
- 'current_display' => $currentDisplay,
- ];
- }
- foreach ($promotes as $promote) {
- $id = $promote['id'];
- $records[] = [
- 'id' => $id,
- 'account' => $promote['account'],
- 'real_name' => $promote['real_name'],
- 'level' => $promote['level'],
- 'create_role_count' => $createRoleCountList[$id],
- 'create_role_user_count' => $createRoleUserCountList[$id],
- 'new_create_role_user_count' => $newCreateRoleUserCountList[$id],
- // 'new_create_role_device_count' => $newCreateRoleDeviceCountList[$id],
- 'new_create_role_ip_count' => $newCreateRoleIpCountList[$id],
- 'login_user_count' => $loginUserCountList[$id],
- 'recharge_count' => $rechargeCountList[$id],
- 'recharge_user_count' => $rechargeUserCountList[$id],
- 'recharge_amount' => $rechargeAmountList[$id]['ban_coin'] + $rechargeAmountList[$id]['coin'] + $rechargeAmountList[$id]['cash'],
- 'recharge_by_ban_coin' => $rechargeAmountList[$id]['ban_coin'],
- 'recharge_by_coin' => $rechargeAmountList[$id]['coin'],
- 'recharge_by_cash' => $rechargeAmountList[$id]['cash'],
- 'current_display' => '',
- ];
+ $records[] = [
+ 'id' => $parent['id'],
+ 'account' => $parent['account'],
+ 'real_name' => $parent['real_name'],
+ 'level' => $parent['level'],
+ 'create_role_count' => $selfCreateRoleCountList[$promote['id']],
+ 'create_role_user_count' => $selfCreateRoleUserCountList[$promote['id']],
+ 'new_create_role_user_count' => $selfNewCreateRoleUserCountList[$promote['id']],
+ // 'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$promote['id']],
+ 'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$promote['id']],
+ 'login_user_count' => $selfLoginUserCountList[$promote['id']],
+ 'recharge_count' => $selfRechargeCountList[$promote['id']],
+ 'recharge_user_count' => $selfRechargeUserCountList[$promote['id']],
+ 'recharge_amount' => $selfRechargeAmountList[$promote['id']]['ban_coin'] + $rechargeAmountList[$promote['id']]['coin'] + $rechargeAmountList[$promote['id']]['cash'],
+ 'recharge_by_ban_coin' => $selfRechargeAmountList[$promote['id']]['ban_coin'],
+ 'recharge_by_coin' => $selfRechargeAmountList[$promote['id']]['coin'],
+ 'recharge_by_cash' => $selfRechargeAmountList[$promote['id']]['cash'],
+ 'current_display' => $currentDisplay,
+ ];
+ }
+ foreach ($promotes as $promote) {
+ $id = $promote['id'];
+ $records[] = [
+ 'id' => $id,
+ 'account' => $promote['account'],
+ 'real_name' => $promote['real_name'],
+ 'level' => $promote['level'],
+ 'create_role_count' => $createRoleCountList[$id],
+ 'create_role_user_count' => $createRoleUserCountList[$id],
+ 'new_create_role_user_count' => $newCreateRoleUserCountList[$id],
+ // 'new_create_role_device_count' => $newCreateRoleDeviceCountList[$id],
+ 'new_create_role_ip_count' => $newCreateRoleIpCountList[$id],
+ 'login_user_count' => $loginUserCountList[$id],
+ 'recharge_count' => $rechargeCountList[$id],
+ 'recharge_user_count' => $rechargeUserCountList[$id],
+ 'recharge_amount' => $rechargeAmountList[$id]['ban_coin'] + $rechargeAmountList[$id]['coin'] + $rechargeAmountList[$id]['cash'],
+ 'recharge_by_ban_coin' => $rechargeAmountList[$id]['ban_coin'],
+ 'recharge_by_coin' => $rechargeAmountList[$id]['coin'],
+ 'recharge_by_cash' => $rechargeAmountList[$id]['cash'],
+ 'current_display' => '',
+ ];
+ }
+ } else {
+ $timeout = 1;
}
$this->assign('prevParentId', $prevParentId);
@@ -2117,6 +2123,7 @@ class QueryController extends BaseController
$this->assign('pagination', $pagination);
$this->assign('parentid', $parentId);
$this->assign('count', $count);
+ $this->assign('timeout', $timeout);
$this->display();
}
diff --git a/Application/Home/View/default/Query/achievement.html b/Application/Home/View/default/Query/achievement.html
index a3952e0ce..b295ed228 100644
--- a/Application/Home/View/default/Query/achievement.html
+++ b/Application/Home/View/default/Query/achievement.html
@@ -149,6 +149,11 @@
+
+
+