fix Integer equals null-safe check for game type comparison

This commit is contained in:
tianfeng 2026-05-26 19:25:56 +08:00
parent b450ced3cf
commit cbf955fe14
2 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ public class HkysServiceImpl implements GameHkysService {
GameListConfig gameConfig = gameListConfigService.getByGameId(
param.getGameId(), GameOriginEnum.HKYS.name(), sysOrigin);
if (param.getType() == 2 && param.getCoin() > 0) {
if (Integer.valueOf(2).equals(param.getType()) && param.getCoin() > 0) {
gameEventService.onWinEvent(userId, param.getCoin(), GameOriginEnum.HKYS.name(), gameConfig);
gameActivityService.handleGameSpendTask(userId, param.getCoin());
gameActivityService.incKingGameDaily(userId, param.getCoin(), param.getGameId());

View File

@ -163,7 +163,7 @@ public class HotGameServiceImpl implements HotGameService {
() -> gameListConfigService.getByGameId(param.getGameId(), GameOriginEnum.HOTGAME.name(), sysOrigin)
);
if (param.getType() == 2 && param.getCoin() > 0) {
if (Integer.valueOf(2).equals(param.getType()) && param.getCoin() > 0) {
gameEventService.onWinEvent(userId, param.getCoin(), GameOriginEnum.HOTGAME.name(), gameConfig);
gameActivityService.handleGameSpendTask(userId, param.getCoin());
gameActivityService.incKingGameDaily(userId, param.getCoin(), param.getGameId());