From 2437d613bbeccac656c4b34ed22b7cf12403b29d Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Fri, 22 Nov 2019 22:33:34 +0800 Subject: [PATCH] bug --- .../Controller/DownloadController.class.php | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 72465e89d..d9c05a31b 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1420,7 +1420,9 @@ class DownloadController extends BaseController { 'basicPromotes' => json_encode($basicPromotes,FALSE), ]; $map['promotes'] = json_encode($data,FALSE); - $map['ids'] = $ids; + $map['parentsinfo'] = json_encode($parent,FALSE);; + $map['currentDisplay'] = $currentDisplay; + $map['ids'] = $ids; if ($gameId > 0) { $params['game_id'] = $gameId; } @@ -2693,6 +2695,15 @@ class DownloadController extends BaseController { if(!empty($map['lock_status'])) { $params['lock_status'] = $map["lock_status"]; } + + if(!empty($map['parentsinfo'])) { + $parent = json_decode($map['parentsinfo'],TRUE); + unset($map['parentsinfo']); + } + if(!empty($map['currentDisplay'])) { + $currentDisplay = $map['currentDisplay']; + unset($map['currentDisplay']); + } $params['begin_time'] = $map['begin_time']; $params['end_time'] = $map['end_time']; @@ -2707,6 +2718,39 @@ class DownloadController extends BaseController { $rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params); $rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params); $records = []; + if (I('p', 1) == 1) { + $selfParams = $params; + $selfParams['isContainSubs'] = false; + $selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$parent['id']], $selfParams); + $selfCreateRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds([$parent['id']], $selfParams); + $selfNewCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds([$parent['id']], $selfParams); + // $selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$parent['id']], $selfParams); + $selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$parent['id']], $selfParams); + + $selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$parent['id']], $selfParams); + $selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$parent['id']], $selfParams); + $selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$parent['id']], $selfParams); + $selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$parent['id']], $selfParams); + $records[] = [ + 'id' => $parent['id'], + 'account' => $parent['account'], + 'real_name' => $parent['real_name'], + 'level' => $parent['level'], + 'create_role_count' => $selfCreateRoleCountList[$parent['id']], + 'create_role_user_count' => $selfCreateRoleUserCountList[$parent['id']], + 'new_create_role_user_count' => $selfNewCreateRoleUserCountList[$parent['id']], + // 'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$parent['id']], + 'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$parent['id']], + 'login_user_count' => $selfLoginUserCountList[$parent['id']], + 'recharge_count' => $selfRechargeCountList[$parent['id']], + 'recharge_user_count' => $selfRechargeUserCountList[$parent['id']], + 'recharge_amount' => $selfRechargeAmountList[$parent['id']]['ban_coin'] + $selfRechargeAmountList[$parent['id']]['coin'] + $selfRechargeAmountList[$parent['id']]['cash'], + 'recharge_by_ban_coin' => $selfRechargeAmountList[$parent['id']]['ban_coin'], + 'recharge_by_coin' => $selfRechargeAmountList[$parent['id']]['coin'], + 'recharge_by_cash' => $selfRechargeAmountList[$parent['id']]['cash'], + 'current_display' => $currentDisplay, + ]; + } foreach ($promotes as $promote) { $id = $promote['id']; $records[] = [