diff --git a/rc-common-business/common-business-mq/business-mq-model/src/main/java/com/red/circle/mq/business/model/event/gift/GiveAwayGiftBatchEvent.java b/rc-common-business/common-business-mq/business-mq-model/src/main/java/com/red/circle/mq/business/model/event/gift/GiveAwayGiftBatchEvent.java index b0a8dfc3..d45a9371 100644 --- a/rc-common-business/common-business-mq/business-mq-model/src/main/java/com/red/circle/mq/business/model/event/gift/GiveAwayGiftBatchEvent.java +++ b/rc-common-business/common-business-mq/business-mq-model/src/main/java/com/red/circle/mq/business/model/event/gift/GiveAwayGiftBatchEvent.java @@ -251,6 +251,14 @@ public class GiveAwayGiftBatchEvent implements Serializable { return Objects.nonNull(giftConfig) && Objects.equals(giftConfig.getGiftTab(), "CHRISTMAS"); } + /** + * 是否是活动礼物. + */ + public boolean checkActivityGift() { + return Objects.nonNull(giftConfig) && Objects.equals(giftConfig.getGiftTab(), "ACTIVITY"); + } + + /** * 是否是专属礼物. 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 ed293586..2d1c5a4e 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 @@ -524,10 +524,10 @@ public class GiveGiftsListener implements MessageListener { targetAmount = giftValue.getGiftValue().multiply(luckyGiftRatio).setScale(0, RoundingMode.DOWN); acceptAmount = targetAmount; - } else if (event.checkCpGift() || event.checkChristmasGift()){ + } else if (event.checkCpGift()){ // CP礼物 acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId()); - targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10").max(new BigDecimal("0.7")))).setScale(0, RoundingMode.DOWN); + targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10").min(new BigDecimal("0.7")))).setScale(0, RoundingMode.DOWN); acceptAmount = giftValue.getGiftValue().multiply(acceptAssistRatio).setScale(0, RoundingMode.DOWN); } else { @@ -811,8 +811,8 @@ public class GiveGiftsListener implements MessageListener { // 幸运礼物比例 return gameLuckyGiftCommon.getLuckyGiftTargetRatio(event.getSysOrigin().name()); } - if (event.checkCpGift()) { - return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10").max(new BigDecimal("0.7"))); + if (event.checkCpGift() || event.checkActivityGift()) { + return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10").min(new BigDecimal("0.7"))); } return BigDecimal.valueOf(1L);