diff --git a/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/game/party3rd/GameHkysRestController.java b/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/game/party3rd/GameHkysRestController.java index 16f19f39..8082c038 100644 --- a/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/game/party3rd/GameHkysRestController.java +++ b/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/game/party3rd/GameHkysRestController.java @@ -125,7 +125,7 @@ public class GameHkysRestController { gameActivityService.handleGameSpendTask(userId, cmd.getCoin()); gameActivityService.incKingGameDaily(userId, cmd.getCoin(), cmd.getGameId()); } else { - gameEventService.onBetEvent(userId, cmd.getCoin()); + gameEventService.onBetEvent(userId, cmd.getCoin(), gameListConfig); } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameBaishunServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameBaishunServiceImpl.java index 01e048ba..2625840f 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameBaishunServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameBaishunServiceImpl.java @@ -194,7 +194,7 @@ public class GameBaishunServiceImpl implements GameBaishunService { gameActivityService.handleGameSpendTask(userId, Math.abs(request.getCurrencyDiff())); gameActivityService.incKingGameDaily(userId, request.getCurrencyDiff(), request.getGameId()); } else { - gameEventService.onBetEvent(userId, request.getCurrencyDiff()); + gameEventService.onBetEvent(userId, request.getCurrencyDiff(), gameListConfig); } } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HkysServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HkysServiceImpl.java index 65f3a4c5..ce88b204 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HkysServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HkysServiceImpl.java @@ -122,7 +122,7 @@ public class HkysServiceImpl implements GameHkysService { gameActivityService.handleGameSpendTask(userId, param.getCoin()); gameActivityService.incKingGameDaily(userId, param.getCoin(), param.getGameId()); } else { - gameEventService.onBetEvent(userId, param.getCoin()); + gameEventService.onBetEvent(userId, param.getCoin(), gameConfig); } return new HkysResponse() 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 efd48bf7..1249aece 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 @@ -169,7 +169,7 @@ public class HotGameServiceImpl implements HotGameService { gameActivityService.incKingGameDaily(userId, param.getCoin(), param.getGameId()); incFruitPartyRankingActivity(param); } else { - gameEventService.onBetEvent(userId, param.getCoin()); + gameEventService.onBetEvent(userId, param.getCoin(), gameConfig); } return new HotGameResponse() diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java index f0dd1e19..79582aad 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java @@ -177,7 +177,7 @@ public class YomiGameServiceImpl implements YomiGameService { gameActivityService.handleGameSpendTask(userId, cmd.getGold()); gameActivityService.incKingGameDaily(userId, cmd.getGold(), gameIdStr); } else { - gameEventService.onBetEvent(userId, cmd.getGold()); + gameEventService.onBetEvent(userId, cmd.getGold(), gameConfig); } return new YomiBalanceCO(currentBalance); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/common/GameEventService.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/common/GameEventService.java index 78f9616b..d3f84480 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/common/GameEventService.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/common/GameEventService.java @@ -129,7 +129,6 @@ public class GameEventService { return; } sendBroadcast(userId, gold, gameConfig); - incGameRankingRecord(gold, gameOrigin, gameConfig); incGameRankingActivity(userId, gold, gameConfig.getGameId(), gameConfig.getSysOrigin()); } @@ -157,11 +156,11 @@ public class GameEventService { ); } - private void incGameRankingRecord(Long gold, String gameOrigin, GameListConfig gameConfig) { + private void incGameRankingRecord(Long gold, GameListConfig gameConfig) { gameRankingGateway.incrementPrizeAmount( GameRankingIncrementCmd.builder() - .gameOrigin(gameOrigin) - .gameId(gameConfig.getGameId()) + .gameOrigin(gameConfig.getGameOrigin()) + .gameId(gameConfig.getId().toString()) .gameName(gameConfig.getName()) .gameCover(gameConfig.getCover()) .gameUrl(gameConfig.getGameCode()) @@ -193,9 +192,9 @@ public class GameEventService { // ------------------------------------------------------------------ // /** - * 投注后的业务增强:房间日任务 + * 投注后的业务增强:房间日任务 + 游戏排行榜累计下注金额 */ - public void onBetEvent(Long userId, Long gold) { + public void onBetEvent(Long userId, Long gold, GameListConfig gameConfig) { RoomDailyTaskCode taskType = RoomDailyTaskCode.PERSONAL_GAME_CONSUME; String redisKey = "room:daily:task:progress:" + taskType.name() + ":" + userId + ":" + ZonedDateTimeAsiaRiyadhUtils.now().toLocalDate(); @@ -207,5 +206,8 @@ public class GameEventService { .setTaskCode(taskType.name()) .setProgressValue(total.intValue()) ); + if (gameConfig != null) { + incGameRankingRecord(Math.abs(gold), gameConfig); + } } }