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