generated from root/miduo_server
优化服务器代码
parent
dfc96e76b1
commit
6f6970ee17
|
|
@ -88,7 +88,7 @@ public class GameLogicService implements IService {
|
|||
public void init() throws Exception {
|
||||
RedisUtil.getInstence().init();
|
||||
MongoUtil.getLjsdMongoTemplate().getMongoTemplate(GameApplication.serverId).getCollection(User.getCollectionName()).createIndex("playerManager.level");
|
||||
GlobleSystemLogic.getInstence().calCulRank();
|
||||
GlobleSystemLogic.getInstence().calCulRank(0);
|
||||
registerServerInfoToRedis();
|
||||
exportServerInfo2Zk();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@ public class GsGuildInfoCacheLoader {
|
|||
*
|
||||
*/
|
||||
public static void loadGuildInfoCache() {
|
||||
int now = (int) (System.currentTimeMillis() / 1000);
|
||||
int delayForMinute = 60 - (now % 60);
|
||||
int delayForMinute = 600;
|
||||
ThreadManager.getScheduledExecutor().scheduleAtFixedRate(() -> GuilidManager.guildInfoMap.forEach((guildId, guildInfo) -> {
|
||||
GuildInfoCache guildInfoCache = new GuildInfoCache();
|
||||
guildInfoCache.setGuildId(guildId);
|
||||
|
|
@ -34,6 +33,6 @@ public class GsGuildInfoCacheLoader {
|
|||
guildInfoCache.setChairmanName(chairmanName); //会长名
|
||||
guildInfoCache.setChairmanUserId(chairManId); //会长UserId
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.GLOBAL_DEATH_PATH_WORLD, RedisKey.GUILD_INFO_CACHE, String.valueOf(guildId), guildInfoCache);
|
||||
}), delayForMinute, 300, TimeUnit.SECONDS);
|
||||
}), delayForMinute, 600, TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class GlobleSystemLogic implements IEventHandler {
|
|||
* 世界等级缓存 不入库
|
||||
* 确保开服逻辑前计算完成
|
||||
*/
|
||||
private static volatile int GLOABLE_WORLD_LEVE_CACHE = 0;
|
||||
private static volatile int GLOABLE_WORLD_LEVE_CACHE = 20;
|
||||
private static volatile int GLOABLE_WORLD_LEVE_CACHE_LINE = 0; // 名次基线 看配置
|
||||
private static int crossGroup = 0;
|
||||
|
||||
|
|
@ -109,16 +109,9 @@ public class GlobleSystemLogic implements IEventHandler {
|
|||
}
|
||||
|
||||
//开服 和 命中等级计算条件
|
||||
if (event instanceof UserLevelEvent || event instanceof ServerOpenEvent) {
|
||||
if (event instanceof UserLevelEvent) {
|
||||
try {
|
||||
if (event instanceof UserLevelEvent) {
|
||||
if (((UserLevelEvent) event).getLevel() <= getGloableWorldLeveCacheLine()) {
|
||||
return;
|
||||
}
|
||||
String rankKey = RedisKey.getKey(RedisKey.WORLD_CALCUL_LEVE_RAND, "", false);
|
||||
RedisUtil.getInstence().zsetAddOne(rankKey, String.valueOf(((UserLevelEvent) event).getUid()), ((UserLevelEvent) event).getLevel());
|
||||
}
|
||||
calCulRank();
|
||||
calCulRank(((UserLevelEvent) event).getLevel());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
LOGGER.error("Exception::=>{}", e.toString());
|
||||
|
|
@ -126,100 +119,19 @@ public class GlobleSystemLogic implements IEventHandler {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 计算世界等级
|
||||
* <p>
|
||||
* 1 起服
|
||||
* <p>
|
||||
* 2 高于50名
|
||||
* 计算世界等级,直接替换最高等级玩家的等级,默认初始设置为20级
|
||||
* @param level
|
||||
*/
|
||||
// public void calCulRank() {
|
||||
//
|
||||
// //不参与跨服,不用计算世界等级
|
||||
// if(!GameApplication.serverProperties.isArenaCross()){
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// SMServerArenaSetting setting = STableManager.getConfig(SMServerArenaSetting.class).get(1);
|
||||
// int rankEndLine = setting.getWorldLevLimit();
|
||||
// double sum=0;
|
||||
// int level = 1;
|
||||
// //直接从库里查
|
||||
// Query query = new Query();
|
||||
// query.with(new Sort(Sort.Direction.DESC,"playerManager.level"));
|
||||
// query.fields().include("playerManager.level");
|
||||
// query.limit(rankEndLine);
|
||||
// List<User> users = new ArrayList<>();
|
||||
// try {
|
||||
// users = MongoUtil.getLjsdMongoTemplate().findAllByCondition(query, User.class);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// //如果达不到这些人,世界等级就为1
|
||||
// if(users.size()>=rankEndLine) {
|
||||
// for (int j = 0; j <users.size() ; j++) {
|
||||
// sum+=users.get(j).getPlayerInfoManager().getLevel();
|
||||
// }
|
||||
//
|
||||
// level = (int) Math.ceil(sum / (double) Math.min(users.size(), rankEndLine==0?99999999:rankEndLine));
|
||||
// }
|
||||
//
|
||||
// setGlobalWorldLevelCache(level);
|
||||
// LOGGER.info("总人数:{},计算了一次世界等级->{}",users.size(),level);
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// }
|
||||
public void calCulRank() {
|
||||
//need cfg
|
||||
int rankEndLine = GameApplication.serverProperties.getWorldRankCount() == 0 ? 50 :GameApplication.serverProperties.getWorldRankCount();
|
||||
Set<ZSetOperations.TypedTuple<String>> rankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.WORLD_CALCUL_LEVE_RAND, "", 0, rankEndLine - 1);
|
||||
double sum = 0;
|
||||
int i = 1;
|
||||
int level = 1;
|
||||
//缓存为null 从库里查
|
||||
if (rankInfo.size() == 0) {
|
||||
Query query = new Query();
|
||||
query.with(new Sort(Sort.Direction.DESC, "playerManager.level"));
|
||||
query.fields().include("playerManager.level");
|
||||
query.limit(rankEndLine);
|
||||
List<User> users = new ArrayList<>();
|
||||
try {
|
||||
users = MongoUtil.getLjsdMongoTemplate().findAllByCondition(query, User.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
for (int j = 0; j < users.size(); j++) {
|
||||
String rankKey = RedisKey.getKey(RedisKey.WORLD_CALCUL_LEVE_RAND, "", false);
|
||||
RedisUtil.getInstence().zsetAddOne(rankKey, String.valueOf(users.get(j).getId()), users.get(j).getPlayerInfoManager().getLevel());
|
||||
}
|
||||
rankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.WORLD_CALCUL_LEVE_RAND, "", 0, rankEndLine - 1);
|
||||
public void calCulRank(int level) {
|
||||
if(level <=0){
|
||||
return;
|
||||
}
|
||||
|
||||
for (ZSetOperations.TypedTuple<String> item : rankInfo) {
|
||||
double score = item.getScore();
|
||||
sum += score;
|
||||
if (i == rankEndLine) {
|
||||
//更新line名分数缓存
|
||||
setGloableWorldLeveCacheLine((int) score);
|
||||
}
|
||||
i++;
|
||||
level = (int) Math.ceil(sum / (double) Math.min(rankInfo.size(), rankEndLine));
|
||||
int worldLevel = this.getGloableWorldLeveCache();
|
||||
if(level > worldLevel){
|
||||
setGloableWorldLeveCache(level);
|
||||
LOGGER.info("计算了一次世界等级->{}", level);
|
||||
}
|
||||
|
||||
setGloableWorldLeveCache(level);
|
||||
LOGGER.info("总人数:{},计算了一次世界等级->{}", rankInfo.size(), level);
|
||||
// if (rankInfo.size() > rankEndLine + 100) {
|
||||
// //删除多余数据 预留一些 长度maxSize
|
||||
// String key = RedisKey.getKey(RedisKey.WORLD_CALCUL_LEVE_RAND, "", false);
|
||||
// RedisUtil.getInstence().removeZSetRangeByRank(key, 0, 500);
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static int getGlobalWorldLevelCache() {
|
||||
|
|
@ -248,7 +160,14 @@ public class GlobleSystemLogic implements IEventHandler {
|
|||
}
|
||||
|
||||
public static int getGloableWorldLeveCache() {
|
||||
return GLOABLE_WORLD_LEVE_CACHE;
|
||||
if (GLOABLE_WORLD_LEVE_CACHE != 0)
|
||||
return GLOABLE_WORLD_LEVE_CACHE;
|
||||
Integer level = RedisUtil.getInstence().getMapValue(RedisKey.SERVER_WORLDLEVE_INFO, "", String.valueOf(GameApplication.serverId), Integer.class);
|
||||
if (level != null) {
|
||||
GLOABLE_WORLD_LEVE_CACHE = level;
|
||||
return level;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int getGloableWorldLeveCacheLine() {
|
||||
|
|
|
|||
|
|
@ -428,54 +428,54 @@ public class VirtualBattleLogic {
|
|||
|
||||
|
||||
public void checkSetForReplay(User user, CommonProto.FightData fightData, int fightId, long useTime) {
|
||||
String gameLevelId = String.valueOf(fightId);
|
||||
ArenaRecord arenaRecord = new ArenaRecord();
|
||||
arenaRecord.setAttackId(user.getId());
|
||||
arenaRecord.setDefScore(0);
|
||||
arenaRecord.setAttackForce(0);
|
||||
arenaRecord.setFightData(fightData.toByteArray());
|
||||
arenaRecord.setCreateTime((int) (System.currentTimeMillis() / 1000));
|
||||
//arenaRecord.setId(KeyGenUtils.produceIdByModule(UUIDEnum.ARENARECORD,uid));
|
||||
arenaRecord.setId(gameLevelId);
|
||||
arenaRecord.setFightResult(0);
|
||||
|
||||
arenaRecord.setPlayerName(user.getPlayerInfoManager().getNickName());
|
||||
arenaRecord.setHeadId(user.getPlayerInfoManager().getHead());
|
||||
arenaRecord.setFightPower(user.getPlayerInfoManager().getMaxForce());
|
||||
|
||||
arenaRecord.setUseTime(useTime);
|
||||
|
||||
ArenaRecord arenaRecordTemp;
|
||||
|
||||
|
||||
String selfKey = getSelfKeyForRePlay(user.getId(), Integer.valueOf(gameLevelId));
|
||||
|
||||
// RedisUtil.getInstence().set(RedisKey.VirtualBattle_SELF_RECORD, selfKey, arenaRecord);
|
||||
FightUtil.addBattleRecord(RedisKey.VirtualBattle_SELF_RECORD, selfKey, arenaRecord);
|
||||
// arenaRecordTemp = RedisUtil.getInstence().get(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId, ArenaRecord.class);
|
||||
arenaRecordTemp = FightUtil.getBattleRecord(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId);
|
||||
if (arenaRecordTemp == null) {
|
||||
// RedisUtil.getInstence().set(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
FightUtil.addBattleRecord(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
} else {
|
||||
if (arenaRecord.getUseTime() < arenaRecordTemp.getUseTime()) {
|
||||
// RedisUtil.getInstence().set(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
FightUtil.addBattleRecord(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// arenaRecordTemp = RedisUtil.getInstence().get(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId, ArenaRecord.class);
|
||||
arenaRecordTemp = FightUtil.getBattleRecord(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId);
|
||||
if (arenaRecordTemp == null) {
|
||||
// RedisUtil.getInstence().set(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
FightUtil.addBattleRecord(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
} else {
|
||||
if (arenaRecord.getFightPower() < arenaRecordTemp.getFightPower()) {
|
||||
// RedisUtil.getInstence().set(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
FightUtil.addBattleRecord(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
}
|
||||
}
|
||||
// String gameLevelId = String.valueOf(fightId);
|
||||
// ArenaRecord arenaRecord = new ArenaRecord();
|
||||
// arenaRecord.setAttackId(user.getId());
|
||||
// arenaRecord.setDefScore(0);
|
||||
// arenaRecord.setAttackForce(0);
|
||||
// arenaRecord.setFightData(fightData.toByteArray());
|
||||
// arenaRecord.setCreateTime((int) (System.currentTimeMillis() / 1000));
|
||||
// //arenaRecord.setId(KeyGenUtils.produceIdByModule(UUIDEnum.ARENARECORD,uid));
|
||||
// arenaRecord.setId(gameLevelId);
|
||||
// arenaRecord.setFightResult(0);
|
||||
//
|
||||
// arenaRecord.setPlayerName(user.getPlayerInfoManager().getNickName());
|
||||
// arenaRecord.setHeadId(user.getPlayerInfoManager().getHead());
|
||||
// arenaRecord.setFightPower(user.getPlayerInfoManager().getMaxForce());
|
||||
//
|
||||
// arenaRecord.setUseTime(useTime);
|
||||
//
|
||||
// ArenaRecord arenaRecordTemp;
|
||||
//
|
||||
//
|
||||
// String selfKey = getSelfKeyForRePlay(user.getId(), Integer.valueOf(gameLevelId));
|
||||
//
|
||||
//// RedisUtil.getInstence().set(RedisKey.VirtualBattle_SELF_RECORD, selfKey, arenaRecord);
|
||||
// FightUtil.addBattleRecord(RedisKey.VirtualBattle_SELF_RECORD, selfKey, arenaRecord);
|
||||
//// arenaRecordTemp = RedisUtil.getInstence().get(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId, ArenaRecord.class);
|
||||
// arenaRecordTemp = FightUtil.getBattleRecord(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId);
|
||||
// if (arenaRecordTemp == null) {
|
||||
//// RedisUtil.getInstence().set(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
// FightUtil.addBattleRecord(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
// } else {
|
||||
// if (arenaRecord.getUseTime() < arenaRecordTemp.getUseTime()) {
|
||||
//// RedisUtil.getInstence().set(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
// FightUtil.addBattleRecord(RedisKey.VirtualBattle_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
//// arenaRecordTemp = RedisUtil.getInstence().get(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId, ArenaRecord.class);
|
||||
// arenaRecordTemp = FightUtil.getBattleRecord(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId);
|
||||
// if (arenaRecordTemp == null) {
|
||||
//// RedisUtil.getInstence().set(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
// FightUtil.addBattleRecord(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
// } else {
|
||||
// if (arenaRecord.getFightPower() < arenaRecordTemp.getFightPower()) {
|
||||
//// RedisUtil.getInstence().set(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
// FightUtil.addBattleRecord(RedisKey.VirtualBattle_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -501,54 +501,54 @@ public class VirtualEliteBattleLogic {
|
|||
|
||||
|
||||
public void checkSetForReplay(User user, CommonProto.FightData fightData, int fightId, long useTime) {
|
||||
String gameLevelId = String.valueOf(fightId);
|
||||
ArenaRecord arenaRecord = new ArenaRecord();
|
||||
arenaRecord.setAttackId(user.getId());
|
||||
arenaRecord.setDefScore(0);
|
||||
arenaRecord.setAttackForce(0);
|
||||
arenaRecord.setFightData(fightData.toByteArray());
|
||||
arenaRecord.setCreateTime((int) (System.currentTimeMillis() / 1000));
|
||||
//arenaRecord.setId(KeyGenUtils.produceIdByModule(UUIDEnum.ARENARECORD,uid));
|
||||
arenaRecord.setId(gameLevelId);
|
||||
arenaRecord.setFightResult(0);
|
||||
|
||||
arenaRecord.setPlayerName(user.getPlayerInfoManager().getNickName());
|
||||
arenaRecord.setHeadId(user.getPlayerInfoManager().getHead());
|
||||
arenaRecord.setFightPower(user.getPlayerInfoManager().getMaxForce());
|
||||
|
||||
arenaRecord.setUseTime(useTime);
|
||||
|
||||
ArenaRecord arenaRecordTemp;
|
||||
|
||||
|
||||
String selfKey = getSelfKeyForRePlay(user.getId(), Integer.valueOf(gameLevelId));
|
||||
|
||||
// RedisUtil.getInstence().set(RedisKey.VirtualBattle_ELITE_SELF_RECORD, selfKey, arenaRecord);
|
||||
FightUtil.addBattleRecord(RedisKey.VirtualBattle_ELITE_SELF_RECORD, selfKey, arenaRecord);
|
||||
// arenaRecordTemp = RedisUtil.getInstence().get(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId, ArenaRecord.class);
|
||||
arenaRecordTemp = FightUtil.getBattleRecord(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId);
|
||||
if (arenaRecordTemp == null) {
|
||||
// RedisUtil.getInstence().set(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
FightUtil.addBattleRecord(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
} else {
|
||||
if (arenaRecord.getUseTime() < arenaRecordTemp.getUseTime()) {
|
||||
// RedisUtil.getInstence().set(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
FightUtil.addBattleRecord(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// arenaRecordTemp = RedisUtil.getInstence().get(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId, ArenaRecord.class);
|
||||
arenaRecordTemp = FightUtil.getBattleRecord(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId);
|
||||
if (arenaRecordTemp == null) {
|
||||
// RedisUtil.getInstence().set(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
FightUtil.addBattleRecord(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
} else {
|
||||
if (arenaRecord.getFightPower() < arenaRecordTemp.getFightPower()) {
|
||||
// RedisUtil.getInstence().set(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
FightUtil.addBattleRecord(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
}
|
||||
}
|
||||
// String gameLevelId = String.valueOf(fightId);
|
||||
// ArenaRecord arenaRecord = new ArenaRecord();
|
||||
// arenaRecord.setAttackId(user.getId());
|
||||
// arenaRecord.setDefScore(0);
|
||||
// arenaRecord.setAttackForce(0);
|
||||
// arenaRecord.setFightData(fightData.toByteArray());
|
||||
// arenaRecord.setCreateTime((int) (System.currentTimeMillis() / 1000));
|
||||
// //arenaRecord.setId(KeyGenUtils.produceIdByModule(UUIDEnum.ARENARECORD,uid));
|
||||
// arenaRecord.setId(gameLevelId);
|
||||
// arenaRecord.setFightResult(0);
|
||||
//
|
||||
// arenaRecord.setPlayerName(user.getPlayerInfoManager().getNickName());
|
||||
// arenaRecord.setHeadId(user.getPlayerInfoManager().getHead());
|
||||
// arenaRecord.setFightPower(user.getPlayerInfoManager().getMaxForce());
|
||||
//
|
||||
// arenaRecord.setUseTime(useTime);
|
||||
//
|
||||
// ArenaRecord arenaRecordTemp;
|
||||
//
|
||||
//
|
||||
// String selfKey = getSelfKeyForRePlay(user.getId(), Integer.valueOf(gameLevelId));
|
||||
//
|
||||
//// RedisUtil.getInstence().set(RedisKey.VirtualBattle_ELITE_SELF_RECORD, selfKey, arenaRecord);
|
||||
// FightUtil.addBattleRecord(RedisKey.VirtualBattle_ELITE_SELF_RECORD, selfKey, arenaRecord);
|
||||
//// arenaRecordTemp = RedisUtil.getInstence().get(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId, ArenaRecord.class);
|
||||
// arenaRecordTemp = FightUtil.getBattleRecord(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId);
|
||||
// if (arenaRecordTemp == null) {
|
||||
//// RedisUtil.getInstence().set(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
// FightUtil.addBattleRecord(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
// } else {
|
||||
// if (arenaRecord.getUseTime() < arenaRecordTemp.getUseTime()) {
|
||||
//// RedisUtil.getInstence().set(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
// FightUtil.addBattleRecord(RedisKey.VirtualBattle_ELITE_FAST_RECORD, gameLevelId, arenaRecord);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
//// arenaRecordTemp = RedisUtil.getInstence().get(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId, ArenaRecord.class);
|
||||
// arenaRecordTemp = FightUtil.getBattleRecord(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId);
|
||||
// if (arenaRecordTemp == null) {
|
||||
//// RedisUtil.getInstence().set(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
// FightUtil.addBattleRecord(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
// } else {
|
||||
// if (arenaRecord.getFightPower() < arenaRecordTemp.getFightPower()) {
|
||||
//// RedisUtil.getInstence().set(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
// FightUtil.addBattleRecord(RedisKey.VirtualBattle_ELITE_POWER_TOP_RECORD, gameLevelId, arenaRecord);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class CallCulRankJobHandler {
|
|||
@XxlJob("callCulRankJob")
|
||||
public void callCulRankJob() throws Exception {
|
||||
XxlJobHelper.log("callCulRank start....");
|
||||
GlobleSystemLogic.getInstence().calCulRank();
|
||||
GlobleSystemLogic.getInstence().calCulRank(0);
|
||||
XxlJobHelper.log("callCulRank end....");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue