diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/RankingRewardGrantCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/RankingRewardGrantCmdExe.java index 044d2861..7528148a 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/RankingRewardGrantCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/RankingRewardGrantCmdExe.java @@ -110,7 +110,7 @@ public class RankingRewardGrantCmdExe { for (RankingRewardSnapshot.RewardItem reward : rewards) { try { if ("PROPS".equals(reward.getType())) { - grantProps(userId, reward); +// grantProps(userId, reward); } else if ("BADGE".equals(reward.getType())) { grantBadge(userId, reward); } @@ -180,7 +180,7 @@ public class RankingRewardGrantCmdExe { BadgeOperateEvent event = new BadgeOperateEvent() .setUserId(userId) .setBadgeId(Long.valueOf(reward.getContent())) - .setDays(1L) + .setDays(7L) .setOperationType(BadgeOperateEvent.OperationType.WEAR.name()); userMqMessageService.sendBadgeOperateEvent(event); @@ -219,7 +219,7 @@ public class RankingRewardGrantCmdExe { } List rewards = new ArrayList<>(); - + int index = rank - 1; if (CollectionUtils.isNotEmpty(badgeList) && index < badgeList.size()) { 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 7fa44dba..91e16cd9 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 @@ -12,6 +12,8 @@ import com.red.circle.mq.rocket.business.streams.BadgeOperateSink; import com.red.circle.other.app.util.DistributedLockUtil; import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.domain.model.user.UserProfile; +import com.red.circle.other.infra.common.props.UserBadgeCommon; +import com.red.circle.other.infra.database.mongo.service.user.profile.UserRunProfileService; import com.red.circle.other.infra.database.rds.entity.badge.BadgeBackpack; import com.red.circle.other.infra.database.rds.entity.badge.BadgeConfig; import com.red.circle.other.infra.database.rds.service.badge.BadgeBackpackService; @@ -40,6 +42,8 @@ public class BadgeOperateListener implements MessageListener { private final BadgeConfigService badgeConfigService; private final BadgeBackpackService badgeBackpackService; private final MessageEventProcess messageEventProcess; + private final UserRunProfileService userRunProfileService; + private final UserBadgeCommon userBadgeCommon; private final UserProfileGateway userProfileGateway; private final DistributedLockUtil distributedLockUtil; @@ -139,7 +143,9 @@ public class BadgeOperateListener implements MessageListener { } Set saveWear = wearBadge.stream().map(UserUseBadgeDTO::getId) .filter(id -> !badgeId.equals(id)).collect(Collectors.toSet()); - userProfileGateway.updateUserWearBadge(userId, userProfile.getOriginSys(), saveWear); + userRunProfileService.updateUserWearBadgesOverlay(userId, + userBadgeCommon.listUseBadge(userId, userProfile.getSysOriginChild(), saveWear) + ); } private BadgeBackpack buildSaveUserBadgeBackpack(Long badgeId, Long userId, Long days) {