|
|
|
@ -755,7 +755,7 @@ class QueryController extends BaseController
|
|
|
|
|
|
|
|
|
|
$timeout = 0;
|
|
|
|
|
$records = [];
|
|
|
|
|
if (intval($endTime - $beginTime) / (24 * 3600) <= 31) {
|
|
|
|
|
if (intval($endTime - $beginTime) / (24 * 3600) <= 7) {
|
|
|
|
|
$userRepository = new UserRepository();
|
|
|
|
|
$spendRepository = new SpendRepository();
|
|
|
|
|
$payGameCountList = $spendRepository->getPayGameCountGroupByDay($params);
|
|
|
|
@ -2040,72 +2040,78 @@ class QueryController extends BaseController
|
|
|
|
|
list($beginTime, $endTime) = $this->getBetweenTime($time);
|
|
|
|
|
$params['begin_time'] = $beginTime;
|
|
|
|
|
$params['end_time'] = $endTime;
|
|
|
|
|
$promoteRepository = new PromoteRepository();
|
|
|
|
|
$createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params);
|
|
|
|
|
$createRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds($ids, $params);
|
|
|
|
|
$newCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds($ids, $params);
|
|
|
|
|
// $newCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds($ids, $params);
|
|
|
|
|
$newCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds($ids, $params);
|
|
|
|
|
$loginUserCountList = $promoteRepository->getLoginUserCountByIds($ids, $params);
|
|
|
|
|
$rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params);
|
|
|
|
|
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
|
|
|
|
|
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
|
|
|
|
|
|
|
|
|
|
$timeout = 0;
|
|
|
|
|
$records = [];
|
|
|
|
|
if (I('p', 1) == 1) {
|
|
|
|
|
$selfParams = $params;
|
|
|
|
|
$selfParams['isContainSubs'] = false;
|
|
|
|
|
$selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfCreateRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfNewCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
// $selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$promote['id']], $selfParams);
|
|
|
|
|
if (intval($endTime - $beginTime) / (24 * 3600) <= 7) {
|
|
|
|
|
$promoteRepository = new PromoteRepository();
|
|
|
|
|
$createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params);
|
|
|
|
|
$createRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds($ids, $params);
|
|
|
|
|
$newCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds($ids, $params);
|
|
|
|
|
// $newCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds($ids, $params);
|
|
|
|
|
$newCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds($ids, $params);
|
|
|
|
|
$loginUserCountList = $promoteRepository->getLoginUserCountByIds($ids, $params);
|
|
|
|
|
$rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params);
|
|
|
|
|
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
|
|
|
|
|
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
|
|
|
|
|
|
|
|
|
|
if (I('p', 1) == 1) {
|
|
|
|
|
$selfParams = $params;
|
|
|
|
|
$selfParams['isContainSubs'] = false;
|
|
|
|
|
$selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfCreateRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfNewCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
// $selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$promote['id']], $selfParams);
|
|
|
|
|
$selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$promote['id']], $selfParams);
|
|
|
|
|
|
|
|
|
|
$records[] = [
|
|
|
|
|
'id' => $parent['id'],
|
|
|
|
|
'account' => $parent['account'],
|
|
|
|
|
'real_name' => $parent['real_name'],
|
|
|
|
|
'level' => $parent['level'],
|
|
|
|
|
'create_role_count' => $selfCreateRoleCountList[$promote['id']],
|
|
|
|
|
'create_role_user_count' => $selfCreateRoleUserCountList[$promote['id']],
|
|
|
|
|
'new_create_role_user_count' => $selfNewCreateRoleUserCountList[$promote['id']],
|
|
|
|
|
// 'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$promote['id']],
|
|
|
|
|
'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$promote['id']],
|
|
|
|
|
'login_user_count' => $selfLoginUserCountList[$promote['id']],
|
|
|
|
|
'recharge_count' => $selfRechargeCountList[$promote['id']],
|
|
|
|
|
'recharge_user_count' => $selfRechargeUserCountList[$promote['id']],
|
|
|
|
|
'recharge_amount' => $selfRechargeAmountList[$promote['id']]['ban_coin'] + $rechargeAmountList[$promote['id']]['coin'] + $rechargeAmountList[$promote['id']]['cash'],
|
|
|
|
|
'recharge_by_ban_coin' => $selfRechargeAmountList[$promote['id']]['ban_coin'],
|
|
|
|
|
'recharge_by_coin' => $selfRechargeAmountList[$promote['id']]['coin'],
|
|
|
|
|
'recharge_by_cash' => $selfRechargeAmountList[$promote['id']]['cash'],
|
|
|
|
|
'current_display' => $currentDisplay,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
foreach ($promotes as $promote) {
|
|
|
|
|
$id = $promote['id'];
|
|
|
|
|
$records[] = [
|
|
|
|
|
'id' => $id,
|
|
|
|
|
'account' => $promote['account'],
|
|
|
|
|
'real_name' => $promote['real_name'],
|
|
|
|
|
'level' => $promote['level'],
|
|
|
|
|
'create_role_count' => $createRoleCountList[$id],
|
|
|
|
|
'create_role_user_count' => $createRoleUserCountList[$id],
|
|
|
|
|
'new_create_role_user_count' => $newCreateRoleUserCountList[$id],
|
|
|
|
|
// 'new_create_role_device_count' => $newCreateRoleDeviceCountList[$id],
|
|
|
|
|
'new_create_role_ip_count' => $newCreateRoleIpCountList[$id],
|
|
|
|
|
'login_user_count' => $loginUserCountList[$id],
|
|
|
|
|
'recharge_count' => $rechargeCountList[$id],
|
|
|
|
|
'recharge_user_count' => $rechargeUserCountList[$id],
|
|
|
|
|
'recharge_amount' => $rechargeAmountList[$id]['ban_coin'] + $rechargeAmountList[$id]['coin'] + $rechargeAmountList[$id]['cash'],
|
|
|
|
|
'recharge_by_ban_coin' => $rechargeAmountList[$id]['ban_coin'],
|
|
|
|
|
'recharge_by_coin' => $rechargeAmountList[$id]['coin'],
|
|
|
|
|
'recharge_by_cash' => $rechargeAmountList[$id]['cash'],
|
|
|
|
|
'current_display' => '',
|
|
|
|
|
];
|
|
|
|
|
$records[] = [
|
|
|
|
|
'id' => $parent['id'],
|
|
|
|
|
'account' => $parent['account'],
|
|
|
|
|
'real_name' => $parent['real_name'],
|
|
|
|
|
'level' => $parent['level'],
|
|
|
|
|
'create_role_count' => $selfCreateRoleCountList[$promote['id']],
|
|
|
|
|
'create_role_user_count' => $selfCreateRoleUserCountList[$promote['id']],
|
|
|
|
|
'new_create_role_user_count' => $selfNewCreateRoleUserCountList[$promote['id']],
|
|
|
|
|
// 'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$promote['id']],
|
|
|
|
|
'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$promote['id']],
|
|
|
|
|
'login_user_count' => $selfLoginUserCountList[$promote['id']],
|
|
|
|
|
'recharge_count' => $selfRechargeCountList[$promote['id']],
|
|
|
|
|
'recharge_user_count' => $selfRechargeUserCountList[$promote['id']],
|
|
|
|
|
'recharge_amount' => $selfRechargeAmountList[$promote['id']]['ban_coin'] + $rechargeAmountList[$promote['id']]['coin'] + $rechargeAmountList[$promote['id']]['cash'],
|
|
|
|
|
'recharge_by_ban_coin' => $selfRechargeAmountList[$promote['id']]['ban_coin'],
|
|
|
|
|
'recharge_by_coin' => $selfRechargeAmountList[$promote['id']]['coin'],
|
|
|
|
|
'recharge_by_cash' => $selfRechargeAmountList[$promote['id']]['cash'],
|
|
|
|
|
'current_display' => $currentDisplay,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
foreach ($promotes as $promote) {
|
|
|
|
|
$id = $promote['id'];
|
|
|
|
|
$records[] = [
|
|
|
|
|
'id' => $id,
|
|
|
|
|
'account' => $promote['account'],
|
|
|
|
|
'real_name' => $promote['real_name'],
|
|
|
|
|
'level' => $promote['level'],
|
|
|
|
|
'create_role_count' => $createRoleCountList[$id],
|
|
|
|
|
'create_role_user_count' => $createRoleUserCountList[$id],
|
|
|
|
|
'new_create_role_user_count' => $newCreateRoleUserCountList[$id],
|
|
|
|
|
// 'new_create_role_device_count' => $newCreateRoleDeviceCountList[$id],
|
|
|
|
|
'new_create_role_ip_count' => $newCreateRoleIpCountList[$id],
|
|
|
|
|
'login_user_count' => $loginUserCountList[$id],
|
|
|
|
|
'recharge_count' => $rechargeCountList[$id],
|
|
|
|
|
'recharge_user_count' => $rechargeUserCountList[$id],
|
|
|
|
|
'recharge_amount' => $rechargeAmountList[$id]['ban_coin'] + $rechargeAmountList[$id]['coin'] + $rechargeAmountList[$id]['cash'],
|
|
|
|
|
'recharge_by_ban_coin' => $rechargeAmountList[$id]['ban_coin'],
|
|
|
|
|
'recharge_by_coin' => $rechargeAmountList[$id]['coin'],
|
|
|
|
|
'recharge_by_cash' => $rechargeAmountList[$id]['cash'],
|
|
|
|
|
'current_display' => '',
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$timeout = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->assign('prevParentId', $prevParentId);
|
|
|
|
@ -2117,6 +2123,7 @@ class QueryController extends BaseController
|
|
|
|
|
$this->assign('pagination', $pagination);
|
|
|
|
|
$this->assign('parentid', $parentId);
|
|
|
|
|
$this->assign('count', $count);
|
|
|
|
|
$this->assign('timeout', $timeout);
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|