diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 8611262f1..23336ec1e 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -9037,16 +9037,17 @@ class ExportController extends Controller $pdlMap .= " and pdl.create_time < {$endTime}"; } - if ($info['level'] == PromoteModel::LEVEL_TEAM_MEMBER) { + if ($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")); - $list = M('promote', 'tab_')->alias('p') + $xlsData = 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") + ->join("tab_user u on u.promote_id = p.id and u.device_type=2", 'left') ->where($map) ->group('p.id') - ->select(); + ->select(); + } else { $xlsData = M('promote', 'tab_')->alias('p') ->field('p.id, p.level, p.account, count(if(p2.level = '.($level+1).', 1, null)) 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') @@ -9078,7 +9079,6 @@ class ExportController extends Controller array('signcount', "企业签下载数"), ); } - $this->exportAddOperationLog('Statistics/packDownload','统计-IOS下载统计-导出'); $this->exportExcel($xlsName, $xlsCell, $xlsData); } diff --git a/Application/Admin/Controller/StatisticsController.class.php b/Application/Admin/Controller/StatisticsController.class.php index bc2fd58b6..583498def 100644 --- a/Application/Admin/Controller/StatisticsController.class.php +++ b/Application/Admin/Controller/StatisticsController.class.php @@ -1178,7 +1178,7 @@ class StatisticsController extends ThinkController { $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") + ->join("tab_user u on u.promote_id = p.id and u.device_type=2", 'left') ->where($map) ->page($p, $row) ->group('p.id')