From a184773aaf9549bd8ce1ac47a4d290de8c6239fb Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Fri, 19 Dec 2025 16:53:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EFruitParty=E6=89=93=E6=A6=9C?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/service/game/HotGameServiceImpl.java | 24 +++++++++++++++++++ .../domain/ranking/RankingActivityType.java | 2 ++ 2 files changed, 26 insertions(+) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HotGameServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HotGameServiceImpl.java index 8f935138..eeb6a9cf 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HotGameServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HotGameServiceImpl.java @@ -3,6 +3,7 @@ package com.red.circle.other.app.service.game; import com.alibaba.fastjson.JSON; import com.google.common.base.Throwables; import com.red.circle.common.business.core.enums.SysOriginPlatformEnum; +import com.red.circle.component.game.baishun.request.BaishunChangeCurrencyRequest; import com.red.circle.component.game.hotgame.request.HotGameUserCoinUpdate; import com.red.circle.component.game.hotgame.request.HotGameUserProfileQuery; import com.red.circle.component.game.hotgame.response.HotGameCoin; @@ -62,6 +63,7 @@ import java.util.concurrent.TimeUnit; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; /** @@ -85,6 +87,8 @@ public class HotGameServiceImpl implements HotGameService { private final GameRankingGateway gameRankingGateway; private final GameListCacheService gameListCacheService; private final RankingActivityService rankingActivityService; + @Value("${red-circle.game-rank.gameid}") + private String gameId; @Override public HotGameResponse getUserProfile(HotGameUserProfileQuery query) { @@ -219,6 +223,10 @@ public class HotGameServiceImpl implements HotGameService { incGameRankingRecord(param, gameListConfig); //游戏参与打榜活动 incGameRankingActivity(param); + + //FruitParty + incGameRankingTmpActivity(param); + return new HotGameResponse() .setData(new HotGameCoin() .setBalanceCoin(res.getBalance().getDollarAmount().longValue()) @@ -239,6 +247,22 @@ public class HotGameServiceImpl implements HotGameService { .setErrorCode(HotGameErrorEnum.SERVER_ERROR.getErrorCode()); } + private void incGameRankingTmpActivity(HotGameUserCoinUpdate request) { + if (gameId != null && gameId.equals(request.getGameId()) && request.getType() == 2 && request.getCoin() > 0) { + RankingDataUpdateCmd receiverCmd = new RankingDataUpdateCmd(); + receiverCmd.setUserId(DataTypeUtils.toLong(request.getUid())); + receiverCmd.setUserSex(1); + receiverCmd.setActivityType(RankingActivityType.FRUIT_PARTY.getCode()); + receiverCmd.setCycleType(RankingCycleType.WEEKLY.getCode()); + receiverCmd.setCycleKey(ZonedDateTimeAsiaRiyadhUtils.nowWeekMondayToInt().toString()); + receiverCmd.setDimension(RankingDimension.GAME_WIN.getCode()); + receiverCmd.setIncrementQuantity(request.getCoin()); + receiverCmd.setBizNo(request.getGameId()); + receiverCmd.setReqSysOrigin(ReqSysOrigin.of("LIKEI")); + rankingActivityService.accumulateRankingData(receiverCmd); + } + } + private void incGameRankingRecord(HotGameUserCoinUpdate request, GameListConfig gameListConfig) { if (request.getType() != 2 || gameListConfig == null || request.getCoin() <= 0) { return; diff --git a/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/ranking/RankingActivityType.java b/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/ranking/RankingActivityType.java index 6292def5..e83720e6 100644 --- a/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/ranking/RankingActivityType.java +++ b/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/ranking/RankingActivityType.java @@ -46,6 +46,8 @@ public enum RankingActivityType { LUCK_GIFT(9999, "LuckGift", "统计送幸运礼物排行"), KING_GAMES(10, "游戏王活动", "统计游戏数据排行"), + + FRUIT_PARTY(11, "FruitParty", "统计游戏数据排行"), ; /**