From 2dedf2e835ab4cdab1c104527f9be2bb9a630559 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 12 Feb 2026 15:11:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E8=8E=B7=E8=83=9C=E5=8F=91?= =?UTF-8?q?=E5=88=B8=E5=BC=82=E5=B8=B8=E6=8D=95=E8=8E=B7=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity/ActivityRechargeTicketService.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/activity/ActivityRechargeTicketService.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/activity/ActivityRechargeTicketService.java index 5d5eacea..626244df 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/activity/ActivityRechargeTicketService.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/activity/ActivityRechargeTicketService.java @@ -47,10 +47,18 @@ public class ActivityRechargeTicketService { ); String lockKey = String.format("lucky:draw:lock:%s:%s", userId, FIXED_ACTIVITY_ID); - distributedLockUtil.executeWithLock(lockKey, () -> { - // 在锁内执行抽奖券发放逻辑 - processTicketDistribution(userId); - }); + try { + distributedLockUtil.executeWithLock(lockKey, () -> { + // 在锁内执行抽奖券发放逻辑 + try { + processTicketDistribution(userId); + } catch (Exception e) { + log.error("执行抽奖券发放失败:{}", e.getMessage()); + } + }); + } catch (Exception ignored) { + } + } /**