diff --git a/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php b/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php index 93d8ec6..73c579e 100644 --- a/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php +++ b/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php @@ -1172,6 +1172,7 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model // 批量插入礼包发放记录 $gift_records = []; $periods = $this->getCachedXlhPeriods('get') ?? 0; + $giftInfoMap =cache::get("pan_gift_info_map".$gift_bag_id); foreach ($drawn_gifts as $gift_id => $count) { $gift_records[] = [ 'user_id' => $user_id, @@ -1181,7 +1182,7 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model 'periods' => $periods, 'room_id' => $room_id, 'num' => $count, - 'gift_price' => cache::get("pan_gift_info_map".$gift_bag_id)[$gift_id], //预加载礼物信息, + 'gift_price' => $giftInfoMap[$gift_id]['gift_price'], //预加载礼物信息, 'bag_price' => $ext['xlh_box_price'], 'createtime' => time() ];