From 4f1d587177c80fd994626fb3e5539e995f56a873 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 25 Dec 2025 15:31:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=B6=E6=97=8F=E7=A4=BC=E7=89=A9=E6=B6=A8?= =?UTF-8?q?=E7=BB=8F=E9=AA=8C=E5=80=BC=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../circle/other/app/listener/gift/GiveGiftsListener.java | 1 + .../app/listener/gift/strategy/GiftCountStrategy.java | 7 +++++++ .../infra/database/mongo/entity/gift/GiftAcceptUser.java | 5 +++++ .../service/gift/impl/GiftGiveRunningWaterServiceImpl.java | 1 + 4 files changed, 14 insertions(+) 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 3cef7b10..eb3a4ffd 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 @@ -554,6 +554,7 @@ public class GiveGiftsListener implements MessageListener { .setRegionEq(Objects.equals(sendRegion.getId(), acceptRegion.getId())) .setAcceptAmount(acceptAmount) .setTargetAmount(targetAmount) + .setGiftValue(giftValue.getGiftValue()) .setPercentage(acceptAssistRatio) .setSelfPercentage(Boolean.TRUE.equals(isConflicts) ? BigDecimal.ZERO : sendAssistRatio) .setCountTargetAmount(Boolean.FALSE) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java index b76dba29..2f5ebf32 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java @@ -620,6 +620,13 @@ public class GiftCountStrategy implements GiftStrategy { Long actualAmount = getActualAmount(isLuckyGift, runningWater.getGiftValue().getActualAmount(), luckyGiftRatio); familyCommon.addFamilyExpAndLevelUp(runningWater.getUserId(), runningWater.getSysOrigin(), actualAmount); + + runningWater.getAcceptUsers().forEach(acceptUser -> { + + familyCommon.addFamilyExpAndLevelUp(acceptUser.getAcceptUserId(), runningWater.getSysOrigin(), acceptUser.getGiftValue().longValue()); + + }); + } private boolean checkWeekStar(GiftValue giftValue) { diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/entity/gift/GiftAcceptUser.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/entity/gift/GiftAcceptUser.java index fea9ee6e..72f8c4ab 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/entity/gift/GiftAcceptUser.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/entity/gift/GiftAcceptUser.java @@ -47,6 +47,11 @@ public class GiftAcceptUser implements Serializable { */ private BigDecimal targetAmount; + /** + * 礼物价值(giftUnitPrice * quantity). + */ + private BigDecimal giftValue; + /** * 后面版本可以去除这个字段, 使用countBillId判断是否被统计到账单, true 已被统计,false 未统计. */ diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/gift/impl/GiftGiveRunningWaterServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/gift/impl/GiftGiveRunningWaterServiceImpl.java index f10d8fd1..1b44784a 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/gift/impl/GiftGiveRunningWaterServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/gift/impl/GiftGiveRunningWaterServiceImpl.java @@ -113,6 +113,7 @@ public class GiftGiveRunningWaterServiceImpl implements GiftGiveRunningWaterServ .receiptId(acceptUser.getLong("receiptId")) .acceptAmount(getDocBigDecimal(acceptUser, "acceptAmount")) .targetAmount(getDocBigDecimal(acceptUser, "targetAmount")) + .giftValue(getDocBigDecimal(acceptUser, "giftValue")) .countTargetAmount(acceptUser.getBoolean("countTargetAmount")) .countBillId(acceptUser.getLong("countBillId")) .percentage(getDocBigDecimal(acceptUser, "percentage"))