用户徽章处理优化,不再清除缓存
This commit is contained in:
parent
43c79934f5
commit
a6502cc90d
@ -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<UserUseBadgeDTO> wearBadge = userProfile.getWearBadge();
|
||||
List<UserUseBadgeDTO> honorBadge = userProfile.getWearHonor();
|
||||
wearBadge.addAll(honorBadge);
|
||||
Set<Long> badgeIdSet = wearBadge.stream().map(UserUseBadgeDTO::getId).collect(Collectors.toSet());
|
||||
|
||||
//新增得勋章
|
||||
badgeIdSet.add(badgeId);
|
||||
|
||||
userRunProfileService.updateUserWearBadgesOverlay(userId,
|
||||
userBadgeCommon.listUseBadge(userId, userProfile.getSysOriginChild(), badgeIdSet)
|
||||
);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user