From a6502cc90d9b4a5436fcddf6fe7afb929b6c0497 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Fri, 16 Jan 2026 18:38:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=BE=BD=E7=AB=A0=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=BC=98=E5=8C=96=EF=BC=8C=E4=B8=8D=E5=86=8D=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/app/listener/BadgeOperateListener.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 ec614050..e7c8c249 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 @@ -123,7 +123,20 @@ public class BadgeOperateListener implements MessageListener { BadgeBackpack badgeBackpack = badgeBackpackService.getByUserIdByBadgeId(userId, badgeId); if (Objects.isNull(badgeBackpack)) { badgeBackpackService.save(buildSaveUserBadgeBackpack(badgeId, userId, days)); - userProfileGateway.removeCacheAll(userId); + + // 我的勋章 + UserProfile userProfile = userProfileGateway.getByUserId(userId); + List wearBadge = userProfile.getWearBadge(); + List honorBadge = userProfile.getWearHonor(); + wearBadge.addAll(honorBadge); + Set badgeIdSet = wearBadge.stream().map(UserUseBadgeDTO::getId).collect(Collectors.toSet()); + + //新增得勋章 + badgeIdSet.add(badgeId); + + userRunProfileService.updateUserWearBadgesOverlay(userId, + userBadgeCommon.listUseBadge(userId, userProfile.getSysOriginChild(), badgeIdSet) + ); } return null; });