From 7b3006f871f9f0e4c97820fcafe9c9129412a0c9 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Mon, 13 Apr 2020 16:39:38 +0800 Subject: [PATCH] upt --- .../Admin/Controller/ExportController.class.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 7171ab0ad..8611262f1 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -9037,11 +9037,11 @@ class ExportController extends Controller $pdlMap .= " and pdl.create_time < {$endTime}"; } - if ($info['level'] == PromoteModel::LEVEL_GROUP_LEADER) { + if ($info['level'] == PromoteModel::LEVEL_TEAM_MEMBER) { $beginThisweek = mktime(0, 0 , 0,date("m"),date("d")-date("w")+1,date("Y")); - $endThisweek = mktime(23,59,59,date("m"),date("d")-date("w")+7,date("Y")); - $xlsData = M('promote', 'tab_')->alias('p') - ->field('count(distinct(u.id)) as iosCount, count(distinct(if (u.register_time between '. $beginThisweek . ' and ' . $endThisweek .', 1, null))) as weekCount, 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') + $endThisweek = mktime(23,59,59,date("m"),date("d")-date("w")+7,date("Y")); + $list = M('promote', 'tab_')->alias('p') + ->field('p.id, p.level, p.account, count(u.id) as iosCount, count(if (u.register_time between '. $beginThisweek . ' and ' . $endThisweek .', 1, null)) as weekCount, 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_package_download_log pdl on pdl.promote_id = p.id $pdlMap", 'left') ->join("tab_user u on u.promote_id = p.id and u.device_type=2") ->where($map) @@ -9057,7 +9057,7 @@ class ExportController extends Controller ->select(); } - if ($info['level'] == PromoteModel::LEVEL_GROUP_LEADER) { + if ($level == PromoteModel::LEVEL_TEAM_MEMBER) { foreach($xlsData as &$item) { $item['tfcount'] = $item['tfcount'] . "(" . (isset($item['ioscount']) ? round( ($item['tfcount'] / $item['ioscount']) * 100 , 2) : 0) . ")%"; } @@ -9078,7 +9078,6 @@ class ExportController extends Controller array('signcount', "企业签下载数"), ); } - $this->exportAddOperationLog('Statistics/packDownload','统计-IOS下载统计-导出'); $this->exportExcel($xlsName, $xlsCell, $xlsData);