发放勋章处理
This commit is contained in:
parent
1f03ec5558
commit
b75aad4c9c
@ -296,20 +296,6 @@ public class PropsSendCommon {
|
||||
|
||||
private void sendUserBadge(Long userId, PrizeDescribe prize) {
|
||||
|
||||
//获得正在佩戴中的徽章
|
||||
List<BadgeBackpack> useBadges = badgeBackpackService.listUseBadgeByUserId(userId);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(useBadges) && useBadges.size() >= 5) {
|
||||
//卸下部分佩戴中的徽章
|
||||
Set<Long> ids = Sets.newHashSet();
|
||||
for (int i = 0; i < useBadges.size(); i++) {
|
||||
if (i > 3) {
|
||||
ids.add(useBadges.get(i).getId());
|
||||
}
|
||||
}
|
||||
badgeBackpackService.updateOffByIds(ids);
|
||||
}
|
||||
|
||||
if (Objects.equals(prize.getQuantity(), NumConstant.ZERO)) {
|
||||
badgeBackpackService
|
||||
.activationPermanentAndUse(userId,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user