diff --git a/app/Service/RebateService.php b/app/Service/RebateService.php index 03a5215..483830d 100644 --- a/app/Service/RebateService.php +++ b/app/Service/RebateService.php @@ -481,13 +481,12 @@ class RebateService extends Service $roleGiftGroupMap = $this->getDayAccumulativeRoleGiftGropMap($baseGame, $gifts, $roles); $records = []; foreach ($items as $roleId => $amount) { - $gifts = $gifts->where('group', $roleGiftGroupMap[$roleId] ?? 0); + $groupGifts = $gifts->where('group', $roleGiftGroupMap[$roleId] ?? 0); if ($roleId == '66036') { - var_dump($roleGiftGroupMap[$roleId]); - var_dump($gifts->toArray()); + var_dump($groupGifts->toArray()); } $maxGift = null; - foreach ($gifts as $gift) { + foreach ($groupGifts as $gift) { if ($amount >= $gift->amount) { if ($mode == 'max') { $maxGift = $gift;