巅峰赛竞猜bug

back_recharge
zhangshanxue 2020-11-14 11:17:04 +08:00
parent 0c67fac433
commit e49bce75c2
2 changed files with 34 additions and 7 deletions

View File

@ -60,6 +60,17 @@ public class ChampionGetMyAllBetHandler extends BaseHandler {
}
} else {
Map<String, Integer> 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;

View File

@ -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<String, Integer> 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<Integer, Integer> betPersonInfoMap = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_BET_DETAIL, selectUid + ":" + winUid, Integer.class, Integer.class);
Map<Integer, Integer> betPersonInfoMap = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_BET_DETAIL, selectUid + ":" + winnerUid, Integer.class, Integer.class);
betPersonInfoMap.forEach((betUid, coins) -> {
try {
User user = UserManager.getUser(betUid);