From 4b4f0a6a33f4fbb5db8a01a6b8e0df0373e99ea1 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Wed, 27 May 2026 18:32:11 +0800 Subject: [PATCH] fix-avatar-frame-days-999 --- .../other/app/listener/BadgeOperateListener.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/BadgeOperateListener.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/BadgeOperateListener.java index 34e4a34a..1de9e481 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/BadgeOperateListener.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/BadgeOperateListener.java @@ -143,7 +143,7 @@ public class BadgeOperateListener implements MessageListener { } refreshUserWearBadges(userId); - giveAvatarFrameIfMapped(badgeKey, userId, days); + giveAvatarFrameIfMapped(badgeKey, userId, 999); return null; }); @@ -170,16 +170,16 @@ public class BadgeOperateListener implements MessageListener { distributedLockUtil.executeWithLock(lockKey, () -> { badgeBackpackService.deleteBadges(userId, Sets.newHashSet(badgeId)); refreshUserWearBadges(userId); - giveAvatarFrameIfMapped(badgeKey, userId, -999L); + giveAvatarFrameIfMapped(badgeKey, userId, -999); return null; }); } /** * 若徽章有对应头像框,则联动赠送/收回. - * days > 0 为赠送,-999 为收回. + * days=999 为赠送,days=-999 为收回. */ - private void giveAvatarFrameIfMapped(String badgeKey, Long userId, Long days) { + private void giveAvatarFrameIfMapped(String badgeKey, Long userId, int days) { if (badgeKey == null) { return; } @@ -194,7 +194,7 @@ public class BadgeOperateListener implements MessageListener { .setType(ConsolePropsTypeEnum.AVATAR_FRAME.getName()) .setOrigin(SendPropsOrigin.SYSTEM_OPERATION.name()) .setOriginDesc(SendPropsOrigin.SYSTEM_OPERATION.getDesc()) - .setDays(days.intValue()) + .setDays(days) .setUseProps(Boolean.FALSE) .setAllowGive(Boolean.FALSE) );