徽章切换问题处理
This commit is contained in:
parent
d3fe3c28ef
commit
6345ff3f7b
@ -44,11 +44,11 @@ public class UserToggleBadgeCmdExe {
|
||||
|
||||
|
||||
// 查询当前已佩戴的徽章
|
||||
List<BadgeBackpack> currentWearBadges = badgeBackpackService.listUseNotExpireTimeByUserIds(new HashSet<>(Collections.singletonList(userId)));
|
||||
List<BadgeBackpack> currentWearBadges = badgeBackpackService.listNotExpireTimeByUserIds(new HashSet<>(Collections.singletonList(userId)));
|
||||
|
||||
// 检查目标徽章是否已佩戴
|
||||
boolean isWearing = currentWearBadges.stream()
|
||||
.anyMatch(badge -> badge.getBadgeId().equals(badgeId));
|
||||
.anyMatch(badge -> badge.getBadgeId().equals(badgeId) && Boolean.TRUE.equals(badge.getUseProps()));
|
||||
|
||||
List<Long> newBadgeIds;
|
||||
if (isWearing) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user