|
|
|
@ -1128,6 +1128,7 @@ class QueryController extends BaseController
|
|
|
|
|
$newDeviceNumList = $userRepository->getNewCreateRoleDeviceCountByDay($params);//新创角设备
|
|
|
|
|
$newIpNumList = $userRepository->getNewCreateRoleIpCountByDay($params);//新创角IP
|
|
|
|
|
$loginUserNumList = $userRepository->getLoginCountGroupByDayNew($params);//登录用户数
|
|
|
|
|
if ($this->canViewUserRecharge) {
|
|
|
|
|
$spendUserNumList = $spendRepository->getPayUserCountGroupByDayNew($params);//充值人数
|
|
|
|
|
$spendNumList = $spendRepository->getPayCountGroupByDay($params);//充值次数
|
|
|
|
|
$spendAllAmountList = $spendRepository->getPayAmountGroupByDayAndType($params);//充值总额
|
|
|
|
@ -1137,6 +1138,7 @@ class QueryController extends BaseController
|
|
|
|
|
$spendGenericList = $spendRepository->getPayAmountGroupByDayAndType($params);//通用币充值
|
|
|
|
|
$params['pay_way'] = -1;
|
|
|
|
|
$spendBindingList = $spendRepository->getPayAmountGroupByDayAndType($params);//绑定币充值
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$allData['role_num'] = 0;
|
|
|
|
|
$allData['user_num'] = 0;
|
|
|
|
@ -1144,6 +1146,7 @@ class QueryController extends BaseController
|
|
|
|
|
$allData['new_device_num'] = 0;
|
|
|
|
|
$allData['new_ip_num'] = 0;
|
|
|
|
|
$allData['login_user_num'] = 0;
|
|
|
|
|
if ($this->canViewUserRecharge) {
|
|
|
|
|
$allData['spend_user_num'] = 0;
|
|
|
|
|
$allData['spend_num'] = 0;
|
|
|
|
|
$allData['spend_all_amount'] = 0;
|
|
|
|
@ -1152,9 +1155,10 @@ class QueryController extends BaseController
|
|
|
|
|
$allData['spend_binding'] = 0;
|
|
|
|
|
$allData['spend_discount'] = 0;
|
|
|
|
|
$allData['spend_voucher'] = 0;
|
|
|
|
|
}
|
|
|
|
|
foreach ($dayList as $day) {
|
|
|
|
|
$date = date('Ymd', strtotime($day));
|
|
|
|
|
$records[] = [
|
|
|
|
|
$record = [
|
|
|
|
|
'day' => $date,
|
|
|
|
|
'role_num' => $roleNumList[$day],
|
|
|
|
|
'user_num' => $userNumList[$day],
|
|
|
|
@ -1162,14 +1166,6 @@ class QueryController extends BaseController
|
|
|
|
|
'new_device_num' => $newDeviceNumList[$day],
|
|
|
|
|
'new_ip_num' => $newIpNumList[$day],
|
|
|
|
|
'login_user_num' => $loginUserNumList[$day],
|
|
|
|
|
'spend_user_num' => $spendUserNumList[$day],
|
|
|
|
|
'spend_num' => $spendNumList[$day],
|
|
|
|
|
'spend_all_amount' => $spendAllAmountList[$day],
|
|
|
|
|
'spend_cash' => $spendCashList[$day],
|
|
|
|
|
'spend_generic' => $spendGenericList[$day],
|
|
|
|
|
'spend_binding' => $spendBindingList[$day],
|
|
|
|
|
'spend_discount' => 0,
|
|
|
|
|
'spend_voucher' => 0,
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
$allData['role_num'] += $roleNumList[$day];
|
|
|
|
@ -1178,6 +1174,17 @@ class QueryController extends BaseController
|
|
|
|
|
$allData['new_device_num'] += $newDeviceNumList[$day];
|
|
|
|
|
$allData['new_ip_num'] += $newIpNumList[$day];
|
|
|
|
|
$allData['login_user_num'] += $loginUserNumList[$day];
|
|
|
|
|
|
|
|
|
|
if ($this->canViewUserRecharge) {
|
|
|
|
|
$record['spend_user_num'] = $spendUserNumList[$day];
|
|
|
|
|
$record['spend_num'] = $spendNumList[$day];
|
|
|
|
|
$record['spend_all_amount'] = $spendAllAmountList[$day];
|
|
|
|
|
$record['spend_cash'] = $spendCashList[$day];
|
|
|
|
|
$record['spend_generic'] = $spendGenericList[$day];
|
|
|
|
|
$record['spend_binding'] = $spendBindingList[$day];
|
|
|
|
|
$record['spend_discount'] = 0;
|
|
|
|
|
$record['spend_voucher'] = 0;
|
|
|
|
|
|
|
|
|
|
$allData['spend_user_num'] += $spendUserNumList[$day];
|
|
|
|
|
$allData['spend_num'] += $spendNumList[$day];
|
|
|
|
|
$allData['spend_all_amount'] = bcadd($allData['spend_all_amount'], $spendAllAmountList[$day], 2);
|
|
|
|
@ -1187,6 +1194,8 @@ class QueryController extends BaseController
|
|
|
|
|
$allData['spend_discount'] = bcadd($allData['spend_discount'], 0, 2);
|
|
|
|
|
$allData['spend_voucher'] = bcadd($allData['spend_voucher'], 0, 2);
|
|
|
|
|
}
|
|
|
|
|
$records[] = $record;
|
|
|
|
|
}
|
|
|
|
|
foreach ($dayListReverse as $day) {
|
|
|
|
|
$date = date('Ymd', strtotime($day));
|
|
|
|
|
$summaryData['date'][] = $date;
|
|
|
|
@ -1194,10 +1203,12 @@ class QueryController extends BaseController
|
|
|
|
|
$summaryData['user_num'][] = $userNumList[$day];
|
|
|
|
|
$summaryData['new_user_num'][] = $newUserNumList[$day];
|
|
|
|
|
$summaryData['new_device_num'][] = $newDeviceNumList[$day];
|
|
|
|
|
if ($this->canViewUserRecharge) {
|
|
|
|
|
$summaryData['spend_user_num'][] = $spendUserNumList[$day];
|
|
|
|
|
$summaryData['spend_all_amount'][] = $spendAllAmountList[$day];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$serverData = $this->getServer($relationGameId, $sdkVersion);
|
|
|
|
|
|
|
|
|
@ -1314,6 +1325,7 @@ class QueryController extends BaseController
|
|
|
|
|
$newDeviceNumList = $userRepository->getNewCreateRoleDeviceCountByGame($params);//新创角设备
|
|
|
|
|
$newIpNumList = $userRepository->getNewCreateRoleIpCountByGame($params);//新创角IP
|
|
|
|
|
$loginUserNumList = $userRepository->getLoginCountGroupByGame($params);//登录用户数
|
|
|
|
|
if ($this->canViewUserRecharge) {
|
|
|
|
|
$spendUserNumList = $spendRepository->getPayUserCountGroupByGame($params);//充值人数
|
|
|
|
|
$spendNumList = $spendRepository->getPayCountGroupByGame($params);//充值次数
|
|
|
|
|
$spendAllAmountList = $spendRepository->getPayAmountGroupByGameAndType($params);//充值总额
|
|
|
|
@ -1323,9 +1335,10 @@ class QueryController extends BaseController
|
|
|
|
|
$spendGenericList = $spendRepository->getPayAmountGroupByGameAndType($params);//通用币充值
|
|
|
|
|
$params['pay_way'] = -1;
|
|
|
|
|
$spendBindingList = $spendRepository->getPayAmountGroupByGameAndType($params);//绑定币充值
|
|
|
|
|
}
|
|
|
|
|
foreach ($data as &$list) {
|
|
|
|
|
$gameId = $list['game_id'];
|
|
|
|
|
$records[] = [
|
|
|
|
|
$record = [
|
|
|
|
|
'game_id' => $gameId,
|
|
|
|
|
'game_name' => $list['game_name'],
|
|
|
|
|
'sdk_version' => $list['sdk_version'],
|
|
|
|
@ -1335,15 +1348,19 @@ class QueryController extends BaseController
|
|
|
|
|
'new_device_num' => $newDeviceNumList[$gameId],
|
|
|
|
|
'new_ip_num' => $newIpNumList[$gameId],
|
|
|
|
|
'login_user_num' => $loginUserNumList[$gameId],
|
|
|
|
|
'spend_user_num' => $spendUserNumList[$gameId],
|
|
|
|
|
'spend_num' => $spendNumList[$gameId],
|
|
|
|
|
'spend_all_amount' => $spendAllAmountList[$gameId],
|
|
|
|
|
'spend_cash' => $spendCashList[$gameId],
|
|
|
|
|
'spend_generic' => $spendGenericList[$gameId],
|
|
|
|
|
'spend_binding' => $spendBindingList[$gameId],
|
|
|
|
|
'spend_discount' => 0,
|
|
|
|
|
'spend_voucher' => 0,
|
|
|
|
|
];
|
|
|
|
|
if ($this->canViewUserRecharge) {
|
|
|
|
|
$record['spend_user_num'] = $spendUserNumList[$gameId];
|
|
|
|
|
$record['spend_num'] = $spendNumList[$gameId];
|
|
|
|
|
$record['spend_all_amount'] = $spendAllAmountList[$gameId];
|
|
|
|
|
$record['spend_cash'] = $spendCashList[$gameId];
|
|
|
|
|
$record['spend_generic'] = $spendGenericList[$gameId];
|
|
|
|
|
$record['spend_binding'] = $spendBindingList[$gameId];
|
|
|
|
|
$record['spend_discount'] = 0;
|
|
|
|
|
$record['spend_voucher'] = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$records[] = $record;
|
|
|
|
|
}
|
|
|
|
|
$params['all_data'] = 1;
|
|
|
|
|
$params['game_ids'] = $allGameIs;
|
|
|
|
@ -1353,6 +1370,7 @@ class QueryController extends BaseController
|
|
|
|
|
$allData['new_device_num'] = $userRepository->getNewCreateRoleDeviceCountByGame($params);//新创角设备
|
|
|
|
|
$allData['new_ip_num'] = $userRepository->getNewCreateRoleIpCountByGame($params);//新创角IP
|
|
|
|
|
$allData['login_user_num'] = $userRepository->getLoginCountGroupByGame($params);//登录用户数
|
|
|
|
|
if ($this->canViewUserRecharge) {
|
|
|
|
|
$allData['spend_user_num'] = $spendRepository->getPayUserCountByGame($params);//充值人数
|
|
|
|
|
$allData['spend_num'] = $spendRepository->getPayCountByGame($params);//充值次数
|
|
|
|
|
unset($params['pay_way']);
|
|
|
|
@ -1367,6 +1385,7 @@ class QueryController extends BaseController
|
|
|
|
|
$allData['spend_voucher'] = '0.00';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$serverData = $this->getServer($relationGameId, $sdkVersion);
|
|
|
|
|
|
|
|
|
|