|
|
|
@ -684,35 +684,41 @@ class QueryController extends BaseController
|
|
|
|
|
$dayList = $this->getDayList($beginTime, $endTime);
|
|
|
|
|
$params['dayList'] = $dayList;
|
|
|
|
|
|
|
|
|
|
$userRepository = new UserRepository();
|
|
|
|
|
$spendRepository = new SpendRepository();
|
|
|
|
|
$payGameCountList = $spendRepository->getPayGameCountByDay($params);
|
|
|
|
|
$payUserCountList = $spendRepository->getPayUserCountByDay($params);
|
|
|
|
|
$newPayUserCountList = $spendRepository->getNewPayUserCountByDay($params);
|
|
|
|
|
$payAmountList = $spendRepository->getPayAmountByDay($params);
|
|
|
|
|
$newPayAmountList = $spendRepository->getNewPayAmountByDay($params);
|
|
|
|
|
$historyPayCountList = $spendRepository->getHistoryPayCountByDay($params);
|
|
|
|
|
$loginCountList = $userRepository->getLoginCountByDay($params);
|
|
|
|
|
$registerCountList = $userRepository->getRegisterCountByDay($params);
|
|
|
|
|
|
|
|
|
|
$timeout = 0;
|
|
|
|
|
$records = [];
|
|
|
|
|
foreach ($dayList as $day) {
|
|
|
|
|
$records[] = [
|
|
|
|
|
'day' => $day,
|
|
|
|
|
'payGameCount' => $payGameCountList[$day],
|
|
|
|
|
'payUserCount' => $payUserCountList[$day],
|
|
|
|
|
'newPayUserCount' => $newPayUserCountList[$day],
|
|
|
|
|
'payAmount' => number_format($payAmountList[$day], 2),
|
|
|
|
|
'newPayAmount' => number_format($newPayAmountList[$day], 2),
|
|
|
|
|
'historyPayCount' => $historyPayCountList[$day],
|
|
|
|
|
'loginCount' => $loginCountList[$day],
|
|
|
|
|
'registerCount' => $registerCountList[$day],
|
|
|
|
|
'payRate' => $loginCountList[$day] == 0 ? '--' : round($payUserCountList[$day]/$loginCountList[$day]*100, 2) . '%',
|
|
|
|
|
'ratentionOneDay' => '--',
|
|
|
|
|
'arpu' => $loginCountList[$day] == 0 ? '0.00' : number_format(round($payAmount[$day]/$loginCountList[$day], 2), 2),
|
|
|
|
|
'arppu' => $payUserCount[$day] == 0 ? '0.00' : number_format(round($payAmount[$day]/$payUserCount[$day], 2), 2),
|
|
|
|
|
];
|
|
|
|
|
if (intval($endTime - $beginTime)/(24*3600) <= 30) {
|
|
|
|
|
$userRepository = new UserRepository();
|
|
|
|
|
$spendRepository = new SpendRepository();
|
|
|
|
|
$payGameCountList = $spendRepository->getPayGameCountByDay($params);
|
|
|
|
|
$payUserCountList = $spendRepository->getPayUserCountByDay($params);
|
|
|
|
|
$newPayUserCountList = $spendRepository->getNewPayUserCountByDay($params);
|
|
|
|
|
$payAmountList = $spendRepository->getPayAmountByDay($params);
|
|
|
|
|
$newPayAmountList = $spendRepository->getNewPayAmountByDay($params);
|
|
|
|
|
$historyPayCountList = $spendRepository->getHistoryPayCountByDay($params);
|
|
|
|
|
$loginCountList = $userRepository->getLoginCountByDay($params);
|
|
|
|
|
$registerCountList = $userRepository->getRegisterCountByDay($params);
|
|
|
|
|
|
|
|
|
|
foreach ($dayList as $day) {
|
|
|
|
|
$records[] = [
|
|
|
|
|
'day' => $day,
|
|
|
|
|
'payGameCount' => $payGameCountList[$day],
|
|
|
|
|
'payUserCount' => $payUserCountList[$day],
|
|
|
|
|
'newPayUserCount' => $newPayUserCountList[$day],
|
|
|
|
|
'payAmount' => number_format($payAmountList[$day], 2),
|
|
|
|
|
'newPayAmount' => number_format($newPayAmountList[$day], 2),
|
|
|
|
|
'historyPayCount' => $historyPayCountList[$day],
|
|
|
|
|
'loginCount' => $loginCountList[$day],
|
|
|
|
|
'registerCount' => $registerCountList[$day],
|
|
|
|
|
'payRate' => $loginCountList[$day] == 0 ? '--' : round($payUserCountList[$day]/$loginCountList[$day]*100, 2) . '%',
|
|
|
|
|
'ratentionOneDay' => '--',
|
|
|
|
|
'arpu' => $loginCountList[$day] == 0 ? '0.00' : number_format(round($payAmount[$day]/$loginCountList[$day], 2), 2),
|
|
|
|
|
'arppu' => $payUserCount[$day] == 0 ? '0.00' : number_format(round($payAmount[$day]/$payUserCount[$day], 2), 2),
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$timeout = 1;
|
|
|
|
|
}
|
|
|
|
|
$this->assign('timeout', $timeout);
|
|
|
|
|
$this->assign('records', $records);
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|