From 2308ea8b64a76bdbd5c728791047b254968b00bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Thu, 16 Oct 2025 10:23:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=A2=E5=8C=85=20=E6=8A=A2=E5=AE=8C?= =?UTF-8?q?=E9=94=80=E6=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/service/RedpacketService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/common/service/RedpacketService.php b/application/common/service/RedpacketService.php index b05ef77..44bc17e 100644 --- a/application/common/service/RedpacketService.php +++ b/application/common/service/RedpacketService.php @@ -114,8 +114,8 @@ class RedpacketService //给前端推送销毁这个红包 // redis 记录该红包是否已经推送过了 只推送一次 $redisKey = "redpacket:{$redpacketId}:is_finished"; - if (!$redis->get($redisKey)) { - $redis->set($redisKey, 1); + if (!Cache::get($redisKey)) { + Cache::set($redisKey, 1, $redpacket['countdown']+get_system_config_value('red_packet_time')+60); $text = [ 'redpacket_id' => $redpacketId, 'text' => '抢完了,请销毁该红包'