|
|
|
@ -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);
|
|
|
|
|