盲盒转盘优化-重构-调试
This commit is contained in:
@@ -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()
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user