From 7acf0e13bf9e512be1eda6f1beb921572fe5c205 Mon Sep 17 00:00:00 2001
From: ELF <360197197@qq.com>
Date: Mon, 18 Nov 2019 16:25:02 +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 | 20 +++++++++++++------
Application/Home/View/default/Query/arpu.html | 2 +-
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php
index 8a70ddc65..78039b451 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) <= 30) {
+ if (intval($endTime - $beginTime) / (24 * 3600) <= 31) {
$userRepository = new UserRepository();
$spendRepository = new SpendRepository();
$payGameCountList = $spendRepository->getPayGameCountGroupByDay($params);
@@ -2009,13 +2009,21 @@ class QueryController extends BaseController
$rows = [];
if (count($ids) > 0) {
- $rows = M('promote', 'tab_')->field(['id', 'parent_id'])->where(['parent_id' => ['in', $ids]])->select();
+ $rows = M('promote', 'tab_')
+ ->field(['id', 'chain'])
+ ->where(['chain' => ['like', [$parent['chain'] . $parent['id'] . '/%']], 'level' => ['gt', $parent['level'] + 1]])
+ ->select();
}
+
$basicPromotes = [];
- foreach ($rows as $row) {
- $basicPromotes[$row['id']] = $row['parent_id'];
+ foreach ($ids as $id) {
+ foreach ($rows as $row) {
+ $needChain = $parent['chain'] . $parent['id'] . '/' . $id . '/';
+ if (strpos($row['chain'], $needChain) !== false) {
+ $basicPromotes[$row['id']] = $id;
+ }
+ }
}
-
$params = [
'isContainSubs' => true,
'basicPromotes' => $basicPromotes,
@@ -2035,7 +2043,7 @@ 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);
diff --git a/Application/Home/View/default/Query/arpu.html b/Application/Home/View/default/Query/arpu.html
index f25fac533..868c4b430 100644
--- a/Application/Home/View/default/Query/arpu.html
+++ b/Application/Home/View/default/Query/arpu.html
@@ -242,7 +242,7 @@