|
|
@ -2508,7 +2508,6 @@ class QueryController extends BaseController
|
|
|
|
$sunday = strtotime('-1 sunday', $iostime) + 24 * 3600;
|
|
|
|
$sunday = strtotime('-1 sunday', $iostime) + 24 * 3600;
|
|
|
|
if (I('begtime') && I('endtime')) {
|
|
|
|
if (I('begtime') && I('endtime')) {
|
|
|
|
$iostime = strtotime(I('endtime'));
|
|
|
|
$iostime = strtotime(I('endtime'));
|
|
|
|
$sunday = strtotime(I('begtime'));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$iosTimeMap['register_time'] = ['between', [$sunday, $iostime]];
|
|
|
|
$iosTimeMap['register_time'] = ['between', [$sunday, $iostime]];
|
|
|
|
$createTime = I('create_time', '');
|
|
|
|
$createTime = I('create_time', '');
|
|
|
@ -2523,7 +2522,7 @@ class QueryController extends BaseController
|
|
|
|
$tfMap['create_time'] = ['between', [$begTime, $endTime]];
|
|
|
|
$tfMap['create_time'] = ['between', [$begTime, $endTime]];
|
|
|
|
$companyMap['create_time'] = ['between', [$begTime, $endTime]];
|
|
|
|
$companyMap['create_time'] = ['between', [$begTime, $endTime]];
|
|
|
|
$superMap['create_time'] = ['between', [$begTime, $endTime]];
|
|
|
|
$superMap['create_time'] = ['between', [$begTime, $endTime]];
|
|
|
|
|
|
|
|
$map10['register_time'] = ['between', [$begTime, $endTime]];
|
|
|
|
//var_dump($map);die();
|
|
|
|
//var_dump($map);die();
|
|
|
|
$query = M('promote', 'tab_')->field(['id'])->where($map);
|
|
|
|
$query = M('promote', 'tab_')->field(['id'])->where($map);
|
|
|
|
list($promotes, $pagination, $count) = $this->paginate($query);
|
|
|
|
list($promotes, $pagination, $count) = $this->paginate($query);
|
|
|
@ -2536,6 +2535,9 @@ class QueryController extends BaseController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$allPromote = M('promote', 'tab_')->field(['id'])->where($map)->select();
|
|
|
|
$allPromote = M('promote', 'tab_')->field(['id'])->where($map)->select();
|
|
|
|
$allids = array_column($allPromote, 'id');
|
|
|
|
$allids = array_column($allPromote, 'id');
|
|
|
|
|
|
|
|
if ($localId !== PID) {
|
|
|
|
|
|
|
|
array_push($allids, $localId);
|
|
|
|
|
|
|
|
}
|
|
|
|
array_push($allids, PID);
|
|
|
|
array_push($allids, PID);
|
|
|
|
$map = [];
|
|
|
|
$map = [];
|
|
|
|
$map['tab_package_download_log.promote_id'] = ['in', $ids];
|
|
|
|
$map['tab_package_download_log.promote_id'] = ['in', $ids];
|
|
|
@ -2544,6 +2546,7 @@ class QueryController extends BaseController
|
|
|
|
$listData = [];
|
|
|
|
$listData = [];
|
|
|
|
$allUserMap['promote_id'] = ['in', $allids];
|
|
|
|
$allUserMap['promote_id'] = ['in', $allids];
|
|
|
|
$allUserMap['device_type'] = 2;
|
|
|
|
$allUserMap['device_type'] = 2;
|
|
|
|
|
|
|
|
$allUserMap['register_time'] = ['between', [$begTime, $endTime]];
|
|
|
|
$allTFMap['promote_id'] = ['in', $allids];
|
|
|
|
$allTFMap['promote_id'] = ['in', $allids];
|
|
|
|
$allTFMap['type'] = 2;
|
|
|
|
$allTFMap['type'] = 2;
|
|
|
|
$allTFMap['create_time'] = ['between', [$begTime, $endTime]];
|
|
|
|
$allTFMap['create_time'] = ['between', [$begTime, $endTime]];
|
|
|
@ -2588,7 +2591,9 @@ class QueryController extends BaseController
|
|
|
|
$superCounts = M('package_download_log', 'tab_')->where($superMap)->count(); //超级签下载量
|
|
|
|
$superCounts = M('package_download_log', 'tab_')->where($superMap)->count(); //超级签下载量
|
|
|
|
$listData[$key]['companycounts'] = intval($companyCounts);
|
|
|
|
$listData[$key]['companycounts'] = intval($companyCounts);
|
|
|
|
$listData[$key]['supercounts'] = intval($superCounts);
|
|
|
|
$listData[$key]['supercounts'] = intval($superCounts);
|
|
|
|
$usersCounts = M('user', 'tab_')->where(['promote_id' => $id, 'device_type' => 2])->count();
|
|
|
|
$map10['promote_id'] = $id;
|
|
|
|
|
|
|
|
$map10['device_type'] = 2;
|
|
|
|
|
|
|
|
$usersCounts = M('user', 'tab_')->where($map10)->count();
|
|
|
|
$listData[$key]['userscounts'] = intval($usersCounts);
|
|
|
|
$listData[$key]['userscounts'] = intval($usersCounts);
|
|
|
|
$listData[$key]['tfcounts'] = intval($tfCounts);
|
|
|
|
$listData[$key]['tfcounts'] = intval($tfCounts);
|
|
|
|
$listData[$key]['tfpercent'] = number_format((intval($tfCounts) / intval($usersCounts)),2,'.','') * 100;
|
|
|
|
$listData[$key]['tfpercent'] = number_format((intval($tfCounts) / intval($usersCounts)),2,'.','') * 100;
|
|
|
|