清除7天以上玩家排行榜
parent
91df74da9c
commit
5729561082
|
|
@ -569,6 +569,7 @@ public class ArenaLogic {
|
|||
}else{
|
||||
title = SErrorCodeEerverConfig.getI18NMessage("arena_season_reward_title");
|
||||
}
|
||||
String seasonKey = RedisUtil.getInstence().getKey(RedisKey.ARENA_RANK, Integer.toString(curSeason));
|
||||
Set<ZSetOperations.TypedTuple<String>> arenaRankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.ARENA_RANK,Integer.toString(curSeason), 0, -1);
|
||||
if(type == GlobalsDef.ARENA_SEASON_REWARD){
|
||||
curSeason=0;
|
||||
|
|
@ -579,11 +580,11 @@ public class ArenaLogic {
|
|||
String value = item.getValue();
|
||||
int uid = Integer.parseInt(value);
|
||||
User user = UserManager.getUserNotCache(uid);
|
||||
if (null == user) {
|
||||
continue;
|
||||
}
|
||||
// 超7天未登录玩家,不再发奖励
|
||||
if (start - user.getPlayerInfoManager().getLoginTime() > GlobalsDef.REDIS_OVER_TIME_DAY * 7 * 1000L) {
|
||||
if (null == user || start - user.getPlayerInfoManager().getLoginTime() > GlobalsDef.REDIS_OVER_TIME_DAY * 7 * 1000L) {
|
||||
String recordKey = RedisUtil.getInstence().getKey(RedisKey.ARENA_RRECORD, Integer.toString(uid));
|
||||
RedisUtil.getInstence().del(recordKey);
|
||||
RedisUtil.getInstence().zsetRemoveOne(seasonKey, Integer.toString(user.getId()));
|
||||
continue;
|
||||
}
|
||||
if(type == GlobalsDef.ARENA_DAILY_REWARD){
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
|||
import com.ljsd.jieling.logic.activity.event.NewWelfareEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.NewWelfareTypeEnum;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.championship.ChampionshipLogic;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
|
|
@ -44,7 +45,7 @@ public class UserManager {
|
|||
private static Map<Integer,Long> userMapPutTime = new ConcurrentHashMap<>(); //离线读入
|
||||
private static AtomicInteger login_f_num = new AtomicInteger(0);//登陆计数
|
||||
private static final int LOGIN_F_LIMIT = 100;//报警界限
|
||||
private static final long LIVE_TIME = 2 * 60 * 60 * 1000L;
|
||||
private static final long LIVE_TIME = 60 * 60 * 1000L;
|
||||
|
||||
public static void addUser(User user) {
|
||||
userMap.put(user.getId(), user);
|
||||
|
|
@ -63,7 +64,10 @@ public class UserManager {
|
|||
public static void checkOffline(){
|
||||
try {
|
||||
Set<User> collect = userMap.entrySet().stream().filter(integerUserEntry -> !OnlineUserManager.checkUidOnline(integerUserEntry.getKey())).map(Map.Entry::getValue).collect(Collectors.toSet());
|
||||
if (collect.isEmpty()) {
|
||||
if (OnlineUserManager.sessionMap.entrySet().isEmpty() && ChampionshipLogic.getProgress() == -1) {
|
||||
userMap.clear();
|
||||
userMapPutTime.clear();
|
||||
LOGGER.info("checkOffline no online clear all {}", userMap.keySet().size());
|
||||
return;
|
||||
}
|
||||
long now = System.currentTimeMillis();
|
||||
|
|
|
|||
Loading…
Reference in New Issue