From b9e29e5dc8305af043a3fddcad84e1ddcf0abca2 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 4 Jun 2026 19:03:11 +0800 Subject: [PATCH] =?UTF-8?q?cp=E7=A4=BC=E7=89=A9=E6=8C=89=E7=85=A7=E6=99=AE?= =?UTF-8?q?=E9=80=9A=E7=A4=BC=E7=89=A9=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/listener/gift/GiveGiftsListener.java | 27 ++++++++++++------- .../gift/strategy/GiftCountStrategy.java | 4 +-- .../gift/strategy/GiftRocketListener.java | 4 +-- .../gift/strategy/RankCountStrategy.java | 4 +-- 4 files changed, 24 insertions(+), 15 deletions(-) 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 87d99e5a..54f41331 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 @@ -517,13 +517,22 @@ public class GiveGiftsListener implements MessageListener { targetAmount = giftValue.getGiftValue().multiply(luckyGiftRatio).setScale(0, RoundingMode.DOWN); acceptAmount = targetAmount; - } else if (event.checkCpGift()){ - // CP礼物 - acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId()); - targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10")).min(new BigDecimal("1"))).setScale(0, RoundingMode.DOWN); - acceptAmount = giftValue.getGiftValue().multiply(acceptAssistRatio).setScale(0, RoundingMode.DOWN); + } - } else if (event.checkActivityGift()){ + /** + * + * cp礼物按照普通礼物处理 + * else if (event.checkCpGift()){ + * // CP礼物 + * acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId()); + * targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10")).min(new BigDecimal("1"))).setScale(0, RoundingMode.DOWN); + * acceptAmount = giftValue.getGiftValue().multiply(acceptAssistRatio).setScale(0, RoundingMode.DOWN); + * + * } + * + */ + + else if (event.checkActivityGift()){ // CP礼物 acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId()); targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10")).min(new BigDecimal("0.9"))).setScale(0, RoundingMode.DOWN); @@ -815,9 +824,9 @@ public class GiveGiftsListener implements MessageListener { // 幸运礼物比例 return gameLuckyGiftCommon.getLuckyGiftTargetRatio(event.getSysOrigin().name()); } - if (event.checkCpGift()) { - return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10")).min(new BigDecimal("0.7")); - } + /*if (event.checkCpGift()) { + return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10")).min(new BigDecimal("1")); + }*/ if (event.checkActivityGift()) { return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10")).min(new BigDecimal("0.9")); } 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 7be13045..c1bb9bc7 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 @@ -716,10 +716,10 @@ public class GiftCountStrategy implements GiftStrategy { return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue(); } - if (isCpGift(giftValue)) { + /*if (isCpGift(giftValue)) { BigDecimal ratio = new BigDecimal("1"); return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue(); - } + }*/ if (isActivityGift(giftValue)) { BigDecimal ratio = new BigDecimal("0.9"); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftRocketListener.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftRocketListener.java index 47e0d69e..271ab7e0 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftRocketListener.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftRocketListener.java @@ -117,9 +117,9 @@ public class GiftRocketListener implements GiftStrategy { return new BigDecimal("0.1"); } - if (isCpGift(giftValue)) { + /*if (isCpGift(giftValue)) { return new BigDecimal("1"); - } + }*/ if (isActivityGift(giftValue)) { return new BigDecimal("0.9"); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/RankCountStrategy.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/RankCountStrategy.java index 150fa143..90d88818 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/RankCountStrategy.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/RankCountStrategy.java @@ -169,9 +169,9 @@ public class RankCountStrategy implements GiftStrategy { return new BigDecimal("0.1"); } - if (isCpGift(giftValue)) { + /* if (isCpGift(giftValue)) { return new BigDecimal("1"); - } + }*/ if (isActivityGift(giftValue)) { return new BigDecimal("0.9");