|
|
@ -482,6 +482,9 @@ class RebateService extends Service
|
|
|
|
$records = [];
|
|
|
|
$records = [];
|
|
|
|
foreach ($items as $roleId => $amount) {
|
|
|
|
foreach ($items as $roleId => $amount) {
|
|
|
|
$gifts = $gifts->where('group', $roleGiftGroupMap[$roleId] ?? 0);
|
|
|
|
$gifts = $gifts->where('group', $roleGiftGroupMap[$roleId] ?? 0);
|
|
|
|
|
|
|
|
if ($roleId == '66036') {
|
|
|
|
|
|
|
|
var_dump($gifts->toArray());
|
|
|
|
|
|
|
|
}
|
|
|
|
$maxGift = null;
|
|
|
|
$maxGift = null;
|
|
|
|
foreach ($gifts as $gift) {
|
|
|
|
foreach ($gifts as $gift) {
|
|
|
|
if ($amount >= $gift->amount) {
|
|
|
|
if ($amount >= $gift->amount) {
|
|
|
|