diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/GiveGiftsListener.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/GiveGiftsListener.java index 7bb7a461..c90f2756 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/GiveGiftsListener.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/GiveGiftsListener.java @@ -906,8 +906,13 @@ public class GiveGiftsListener implements MessageListener { //接受用户id Set acceptsUserIds = event.getAccepts().stream() .map(GiveAwayGiftRoomAccepts::getAcceptUserId).collect(Collectors.toSet()); + + // 幸运礼物比例 + BigDecimal luckyGiftRatio = gameLuckyGiftCommon.getLuckyGiftTargetRatio(event.getSysOrigin().name()); + //总的心动值 - BigDecimal amountTotal = event.countSingleGiftGolds(); + BigDecimal amountTotal = event.countSingleGiftGolds().multiply(luckyGiftRatio); + //先获取房间redis值 List liveHeartbeatCaches = liveHeartbeatCacheService.listLiveHeartbeat( event.getRoomId());