diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/champion/ChampionGetMyAllBetHandler.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/champion/ChampionGetMyAllBetHandler.java index 640aff5d9..97246d455 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/champion/ChampionGetMyAllBetHandler.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/champion/ChampionGetMyAllBetHandler.java @@ -60,6 +60,17 @@ public class ChampionGetMyAllBetHandler extends BaseHandler { } } else { + + + Map states = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_ARENA_RECORD_THREE, "", String.class, Integer.class); + String key = String.valueOf(arenaRecord.getAttackId() * 2222 + String.valueOf(arenaRecord.getDefUid())); + Integer state = states.get(key); + if (null != state && state == 0) { + fightResult = 0; + }else { + fightResult =1; + } + if ((ChampionshipLogic.getRealTimes() + 7) == arenaRecord.getRoundTims()) { if (!(progress % 10 == 3 && fightTime == 3)) { fightResult = -1; diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/championship/ChampionshipLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/championship/ChampionshipLogic.java index 3057ce5de..d81a6660c 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/championship/ChampionshipLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/championship/ChampionshipLogic.java @@ -825,18 +825,34 @@ public class ChampionshipLogic { ArenaRecord arenaRecord = RedisUtil.getInstence().getMapValue(RedisKey.CHAMPION_ARENA_RECORD, "", selectUid, ArenaRecord.class); - int fightResult = arenaRecord.getFightResult(); - int winUid = arenaRecord.getAttackId(); -// int failUid = arenaRecord.getDefUid(); - if (fightResult == 0) { - winUid = arenaRecord.getDefUid(); -// failUid = arenaRecord.getAttackId(); +// int fightResult = arenaRecord.getFightResult(); +// int winUid = arenaRecord.getAttackId(); +//// int failUid = arenaRecord.getDefUid(); +// if (fightResult == 0) { +// winUid = arenaRecord.getDefUid(); +//// failUid = arenaRecord.getAttackId(); +// } + + int winnerUid = arenaRecord.getAttackId(); + if (schedule == 2) { + Map states = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_ARENA_RECORD_THREE, "", String.class, Integer.class); + String key = String.valueOf(arenaRecord.getAttackId() * 2222 + String.valueOf(arenaRecord.getDefUid())); + Integer state = states.get(key); + if (null != state && state == 0) { + winnerUid = arenaRecord.getDefUid(); + } + } else { + if (arenaRecord.getFightResult() == 0) { + winnerUid = arenaRecord.getDefUid(); + } } + + // Double winCoins = RedisUtil.getInstence().getZSetScore(RedisKey.CHAMPION_BET_ALL, "", selectUid + ":" +winUid); // Double failCoins = RedisUtil.getInstence().getZSetScore(RedisKey.CHAMPION_BET_ALL, "", selectUid + ":" + failUid); double winRate = STableManager.getFigureConfig(CommonStaticConfig.class).getsChampionshipSetting().getGuessRatio() / 10000d; - Map betPersonInfoMap = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_BET_DETAIL, selectUid + ":" + winUid, Integer.class, Integer.class); + Map betPersonInfoMap = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_BET_DETAIL, selectUid + ":" + winnerUid, Integer.class, Integer.class); betPersonInfoMap.forEach((betUid, coins) -> { try { User user = UserManager.getUser(betUid);