From e44e3cfbff810c215fc58f14951e0e3495494d57 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Mon, 22 Sep 2025 20:15:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E7=8E=8B=E7=9A=87=E5=90=8E=E7=A4=BC?= =?UTF-8?q?=E7=89=A9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/event/gift/GiveAwayGiftBatchEvent.java | 8 ++++++++ .../other/inner/enums/material/GiftSpecialEnum.java | 5 +++++ .../other/app/listener/gift/GiveGiftsListener.java | 5 ++--- .../listener/gift/strategy/GiftCountStrategy.java | 12 ------------ .../listener/gift/strategy/RankCountStrategy.java | 8 +++++++- 5 files changed, 22 insertions(+), 16 deletions(-) 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 ae2deb6d..2812d4ce 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 @@ -222,6 +222,14 @@ public class GiveAwayGiftBatchEvent implements Serializable { "STAR"); } + /** + * 是否是周星礼物. + */ + public boolean checkWeekKingQueen() { + return StringUtils.isNotBlank(giftConfig.getSpecial()) && giftConfig.getSpecial().contains( + "KING_QUEEN"); + } + /** * 是否是幸运礼物. */ diff --git a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/enums/material/GiftSpecialEnum.java b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/enums/material/GiftSpecialEnum.java index d5d3c93e..ee9166d9 100644 --- a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/enums/material/GiftSpecialEnum.java +++ b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/enums/material/GiftSpecialEnum.java @@ -27,6 +27,11 @@ public enum GiftSpecialEnum { */ STAR, + /** + * 国王皇后. + */ + KING_QUEEN, + /** * svip礼物. */ 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 a7d4e429..b5a2849b 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 @@ -857,9 +857,8 @@ public class GiveGiftsListener implements MessageListener { return new GiftValue() .setCurrencyType(giftConfig.getType()) - .setGiftType(event.checkWeekStar() - ? GiftSpecialEnum.STAR.name() - : giftConfig.getGiftTab()) + .setGiftType(event.checkWeekStar() ? GiftSpecialEnum.STAR.name() : event.checkWeekKingQueen() + ? GiftSpecialEnum.KING_QUEEN.name() : giftConfig.getGiftTab()) .setUnitPrice(giftConfig.getGiftCandy()) .setQuantity(event.getQuantity()) .setUserSize(event.acceptUserSize()) 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 82afc994..11af6746 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 @@ -186,18 +186,6 @@ public class GiftCountStrategy implements GiftStrategy { } // 20230406 财富和魅力积分双倍 List ids = new ArrayList<>(); - /*ids.add(1772929668714803202L); - ids.add(1772929262757945346L); - ids.add(1772928725046734850L); - ids.add(1772928394474102785L); - ids.add(1772927999046266881L); - ids.add(1779713184067002370L); - ids.add(1779713147019141122L); - ids.add(1779713096439603201L); - ids.add(1779712965271560194L); - ids.add(1779712864764469250L); - ids.add(1782947206856622082L); - ids.add(1792817888939679745L);*/ List activityDoubleGiftIds = activityConfigService.listProcessingGiftIds(ids); boolean isDoubleLevelExpActivity = activityDoubleGiftIds.contains(runningWater.getGiftId()); 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 878451d5..b0a1f4fc 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 @@ -126,7 +126,9 @@ public class RankCountStrategy implements GiftStrategy { giftValue.getActualAmount().longValue()); } - if (!isWeekStar) { + boolean isWeekKingQueen = isWeekKingQueen(giftValue); + + if (isWeekKingQueen) { // king & queen weekKingQueenCountService.incrThisWeekQuantity(runningWater.getSysOrigin(), @@ -352,6 +354,10 @@ public class RankCountStrategy implements GiftStrategy { return giftValue.getGiftType().contains(GiftSpecialEnum.STAR.name()); } + private boolean isWeekKingQueen(GiftValue giftValue) { + return giftValue.getGiftType().contains(GiftSpecialEnum.KING_QUEEN.name()); + } + private boolean isExclusive(GiftValue giftValue) { return giftValue.getGiftType().contains(GiftTabEnum.EXCLUSIVE.name()); }