From 85a3776ab0e9e6141bb5ab1242e77c0ef27246e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Sun, 28 Dec 2025 21:51:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E4=BC=9A=E6=B5=81=E6=B0=B4=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/BlindBoxTurntableGiftDrawWorldNew.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php b/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php index 8cb98cce..8ebbbc16 100644 --- a/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php +++ b/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php @@ -400,8 +400,10 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model Db::name("vs_gift_bag_detail") ->where(['gift_bag_id' => $gift_bag_id]) ->update(['remaining_number' => Db::raw('quantity')]); - + //更新期数 + db::name("vs_gift_bag")->where('id',$gift_bag_id)->setInc('periods'); // 清除缓存 + Cache::rm("pan_gift_bag".$gift_bag_id); Cache::rm("pan_gift_bag_detail".$gift_bag_id); // 重新获取可用礼物 @@ -1509,7 +1511,7 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model if ($pool_status['code'] !== 1) { throw new \Exception($pool_status['msg']); } - + $bag_data = $this->getCachedGiftBag($gift_bag_id);//防止重置奖池后数据有跟新-期数 $available_gifts = $pool_status['data']['available_gifts']; $remaining_available_gifts = $pool_status['data']['remaining_gifts'] ?? []; $periods = $bag_data['periods'];