|
|
|
@ -1172,7 +1172,7 @@ class StatisticsController extends ThinkController {
|
|
|
|
|
$pdlMap .= " and pdl.create_time < {$endTime}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($info['level'] == PromoteModel::LEVEL_GROUP_LEADER) {
|
|
|
|
|
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')
|
|
|
|
@ -1183,6 +1183,7 @@ class StatisticsController extends ThinkController {
|
|
|
|
|
->page($p, $row)
|
|
|
|
|
->group('p.id')
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
$total = 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')
|
|
|
|
|
->join("tab_package_download_log pdl on pdl.promote_id = p.id $pdlMap", 'left')
|
|
|
|
|