热门游戏统计下注金额
This commit is contained in:
parent
a828e75885
commit
47e926cfec
@ -125,7 +125,7 @@ public class GameHkysRestController {
|
|||||||
gameActivityService.handleGameSpendTask(userId, cmd.getCoin());
|
gameActivityService.handleGameSpendTask(userId, cmd.getCoin());
|
||||||
gameActivityService.incKingGameDaily(userId, cmd.getCoin(), cmd.getGameId());
|
gameActivityService.incKingGameDaily(userId, cmd.getCoin(), cmd.getGameId());
|
||||||
} else {
|
} else {
|
||||||
gameEventService.onBetEvent(userId, cmd.getCoin());
|
gameEventService.onBetEvent(userId, cmd.getCoin(), gameListConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -194,7 +194,7 @@ public class GameBaishunServiceImpl implements GameBaishunService {
|
|||||||
gameActivityService.handleGameSpendTask(userId, Math.abs(request.getCurrencyDiff()));
|
gameActivityService.handleGameSpendTask(userId, Math.abs(request.getCurrencyDiff()));
|
||||||
gameActivityService.incKingGameDaily(userId, request.getCurrencyDiff(), request.getGameId());
|
gameActivityService.incKingGameDaily(userId, request.getCurrencyDiff(), request.getGameId());
|
||||||
} else {
|
} else {
|
||||||
gameEventService.onBetEvent(userId, request.getCurrencyDiff());
|
gameEventService.onBetEvent(userId, request.getCurrencyDiff(), gameListConfig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -122,7 +122,7 @@ public class HkysServiceImpl implements GameHkysService {
|
|||||||
gameActivityService.handleGameSpendTask(userId, param.getCoin());
|
gameActivityService.handleGameSpendTask(userId, param.getCoin());
|
||||||
gameActivityService.incKingGameDaily(userId, param.getCoin(), param.getGameId());
|
gameActivityService.incKingGameDaily(userId, param.getCoin(), param.getGameId());
|
||||||
} else {
|
} else {
|
||||||
gameEventService.onBetEvent(userId, param.getCoin());
|
gameEventService.onBetEvent(userId, param.getCoin(), gameConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new HkysResponse<UpdateUserCoinResponse>()
|
return new HkysResponse<UpdateUserCoinResponse>()
|
||||||
|
|||||||
@ -169,7 +169,7 @@ public class HotGameServiceImpl implements HotGameService {
|
|||||||
gameActivityService.incKingGameDaily(userId, param.getCoin(), param.getGameId());
|
gameActivityService.incKingGameDaily(userId, param.getCoin(), param.getGameId());
|
||||||
incFruitPartyRankingActivity(param);
|
incFruitPartyRankingActivity(param);
|
||||||
} else {
|
} else {
|
||||||
gameEventService.onBetEvent(userId, param.getCoin());
|
gameEventService.onBetEvent(userId, param.getCoin(), gameConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new HotGameResponse<HotGameCoin>()
|
return new HotGameResponse<HotGameCoin>()
|
||||||
|
|||||||
@ -177,7 +177,7 @@ public class YomiGameServiceImpl implements YomiGameService {
|
|||||||
gameActivityService.handleGameSpendTask(userId, cmd.getGold());
|
gameActivityService.handleGameSpendTask(userId, cmd.getGold());
|
||||||
gameActivityService.incKingGameDaily(userId, cmd.getGold(), gameIdStr);
|
gameActivityService.incKingGameDaily(userId, cmd.getGold(), gameIdStr);
|
||||||
} else {
|
} else {
|
||||||
gameEventService.onBetEvent(userId, cmd.getGold());
|
gameEventService.onBetEvent(userId, cmd.getGold(), gameConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new YomiBalanceCO(currentBalance);
|
return new YomiBalanceCO(currentBalance);
|
||||||
|
|||||||
@ -129,7 +129,6 @@ public class GameEventService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sendBroadcast(userId, gold, gameConfig);
|
sendBroadcast(userId, gold, gameConfig);
|
||||||
incGameRankingRecord(gold, gameOrigin, gameConfig);
|
|
||||||
incGameRankingActivity(userId, gold, gameConfig.getGameId(), gameConfig.getSysOrigin());
|
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(
|
gameRankingGateway.incrementPrizeAmount(
|
||||||
GameRankingIncrementCmd.builder()
|
GameRankingIncrementCmd.builder()
|
||||||
.gameOrigin(gameOrigin)
|
.gameOrigin(gameConfig.getGameOrigin())
|
||||||
.gameId(gameConfig.getGameId())
|
.gameId(gameConfig.getId().toString())
|
||||||
.gameName(gameConfig.getName())
|
.gameName(gameConfig.getName())
|
||||||
.gameCover(gameConfig.getCover())
|
.gameCover(gameConfig.getCover())
|
||||||
.gameUrl(gameConfig.getGameCode())
|
.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;
|
RoomDailyTaskCode taskType = RoomDailyTaskCode.PERSONAL_GAME_CONSUME;
|
||||||
String redisKey = "room:daily:task:progress:" + taskType.name() + ":" + userId
|
String redisKey = "room:daily:task:progress:" + taskType.name() + ":" + userId
|
||||||
+ ":" + ZonedDateTimeAsiaRiyadhUtils.now().toLocalDate();
|
+ ":" + ZonedDateTimeAsiaRiyadhUtils.now().toLocalDate();
|
||||||
@ -207,5 +206,8 @@ public class GameEventService {
|
|||||||
.setTaskCode(taskType.name())
|
.setTaskCode(taskType.name())
|
||||||
.setProgressValue(total.intValue())
|
.setProgressValue(total.intValue())
|
||||||
);
|
);
|
||||||
|
if (gameConfig != null) {
|
||||||
|
incGameRankingRecord(Math.abs(gold), gameConfig);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user