From aa9bf9232ee3f97d4071cfd0cd4f6c9bcf84155e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Thu, 16 Oct 2025 21:27:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E9=9C=80=E6=B1=82-=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E9=9C=80=E6=B1=82-=E7=9B=B2=E7=9B=92=E8=BD=AC=E7=9B=98?= =?UTF-8?q?=E8=B0=83=E9=80=9A=E7=9B=98-=E5=B7=A1=E4=B9=90=E4=BC=9A-?= =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/BlindBoxTurntableGiftDrawWorld.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/application/api/model/BlindBoxTurntableGiftDrawWorld.php b/application/api/model/BlindBoxTurntableGiftDrawWorld.php index addd5f0..0c0555f 100644 --- a/application/api/model/BlindBoxTurntableGiftDrawWorld.php +++ b/application/api/model/BlindBoxTurntableGiftDrawWorld.php @@ -320,14 +320,14 @@ class BlindBoxTurntableGiftDrawWorld extends Model $selectedGift = $this->selectGiftWithAliasMethod($aliasTableForRemaining); if ($selectedGift) { $gift = $giftInfoMap[$selectedGift['foreign_id']]; - if (empty($gift)) { - Log::record('数据报错:'.json_encode($selectedGift),"info"); - $selectedGift = $this->selectGiftWithAliasMethod($aliasTableForRemaining); - $gift = $giftInfoMap[$selectedGift['foreign_id']]; - } - if(!$gift){ - throw new \Exception('礼物信息不存在'); - } +// if (empty($gift)) { +// Log::record('数据报错:'.json_encode($selectedGift),"info"); +// $selectedGift = $this->selectGiftWithAliasMethod($aliasTableForRemaining); +// $gift = $giftInfoMap[$selectedGift['foreign_id']]; +// } +// if(!$gift){ +// throw new \Exception('礼物信息不存在'); +// } $precomputedResults[] = [ 'gift_user_id' => $giftUserId, 'gift_bag_detail' => $selectedGift, @@ -596,6 +596,9 @@ class BlindBoxTurntableGiftDrawWorld extends Model $batchInsertData = []; foreach ($precomputedResults as $result) { + if(!isset($result['gift']['gift_price'])){ + Log::record('数据报错:'.json_encode($result),"info"); + } $batchInsertData[] = [ 'user_id' => $user_id, 'gift_user_id' => $result['gift_user_id'],