From 1ad299ffbe93457676340824789d08c36653e0ba Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Tue, 17 Mar 2020 10:46:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BB=9F=E8=AE=A1=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 2 +- Application/Admin/Controller/StatisticsController.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 962049ad0..6fab41881 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -8519,7 +8519,7 @@ class ExportController extends Controller } else { $xlsData = M('promote', 'tab_')->alias('p') ->field('p.id, p.level, p.account, count(p2.id) as lowerCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount') - ->join("tab_promote p2 on p2.chain like CONCAT(p.chain, p.id, '/%')", 'left') + ->join("tab_promote p2 on p2.chain like CONCAT(p.chain, p.id, '/%') and p2.level=".($level+1), 'left') ->join("tab_package_download_log pdl on pdl.promote_id = p2.id $pdlMap", 'left') ->where($map) ->group('p.id') diff --git a/Application/Admin/Controller/StatisticsController.class.php b/Application/Admin/Controller/StatisticsController.class.php index 9ee7ba26f..9f090e7e2 100644 --- a/Application/Admin/Controller/StatisticsController.class.php +++ b/Application/Admin/Controller/StatisticsController.class.php @@ -1187,7 +1187,7 @@ class StatisticsController extends ThinkController { } else { $list = M('promote', 'tab_')->alias('p') ->field('p.id, p.level, p.account, count(p2.id) as lowerCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount') - ->join("tab_promote p2 on p2.chain like CONCAT(p.chain, p.id, '/%')", 'left') + ->join("tab_promote p2 on p2.chain like CONCAT(p.chain, p.id, '/%') and p2.level=".($level+1), 'left') ->join("tab_package_download_log pdl on pdl.promote_id = p2.id $pdlMap", 'left') ->where($map) ->page($p, $row) @@ -1196,7 +1196,7 @@ class StatisticsController extends ThinkController { $total = M('promote', 'tab_')->alias('p') ->field('count(p2.id) as lowerCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount') - ->join("tab_promote p2 on p2.chain like CONCAT(p.chain, p.id, '/%')", 'left') + ->join("tab_promote p2 on p2.chain like CONCAT(p.chain, p.id, '/%') and p2.level=".($level+1), 'left') ->join("tab_package_download_log pdl on pdl.promote_id = p2.id $pdlMap", 'left') ->where($map) ->select();