修改bug

master
ljl 1 year ago
parent 87f18ba0be
commit 6c3c47898e

@ -481,13 +481,12 @@ class RebateService extends Service
$roleGiftGroupMap = $this->getDayAccumulativeRoleGiftGropMap($baseGame, $gifts, $roles); $roleGiftGroupMap = $this->getDayAccumulativeRoleGiftGropMap($baseGame, $gifts, $roles);
$records = []; $records = [];
foreach ($items as $roleId => $amount) { foreach ($items as $roleId => $amount) {
$gifts = $gifts->where('group', $roleGiftGroupMap[$roleId] ?? 0); $groupGifts = $gifts->where('group', $roleGiftGroupMap[$roleId] ?? 0);
if ($roleId == '66036') { if ($roleId == '66036') {
var_dump($roleGiftGroupMap[$roleId]); var_dump($groupGifts->toArray());
var_dump($gifts->toArray());
} }
$maxGift = null; $maxGift = null;
foreach ($gifts as $gift) { foreach ($groupGifts as $gift) {
if ($amount >= $gift->amount) { if ($amount >= $gift->amount) {
if ($mode == 'max') { if ($mode == 'max') {
$maxGift = $gift; $maxGift = $gift;

Loading…
Cancel
Save