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) );