back_recharge
xuexinpeng 2021-12-31 13:49:24 +08:00
parent 16fc0ffbbb
commit 64df199aee
3 changed files with 13 additions and 5 deletions

View File

@ -1428,7 +1428,7 @@ public class RedisUtil {
RedisKey.CROSS_YUXULUNDAO_RANK.equals(type)||RedisKey.CROSS_YUXULUNDAO_ROBOT_INFO.equals(type)||
RedisKey.CROSS_YUXULUNDAO_RECORD.equals(type)|| RedisKey.CROSS_YUXULUNDAO_RANK_PERSON.equals(type)
||RedisKey.CROSS_LINGMAISECRET_INFO.equals(type)||RedisKey.CROSS_LINGMAISECRET_RECORD.equals(type)
||RedisKey.CROSS_LINGMAI_RANK_PERSON.equals(type)||RedisKey.EXPLORER_MAP_PLAYER.equals(type)
||RedisKey.CROSS_LINGMAI_RANK_PERSON.equals(type)
) {
return type + RedisKey.Delimiter_colon + key;
}

View File

@ -35,14 +35,21 @@ public class ExplorerMapPlayerHandler extends BaseHandler<PlayerInfoProto.Explor
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
RedisUtil redisUtil = RedisUtil.getInstence();
String key;
Set<String> set = null;
if (crossGroup == -1) {
key = Integer.toString(mapId);
key = RedisUtil.getInstence().getKey(RedisKey.EXPLORER_MAP_PLAYER,String.valueOf(mapId));
set = redisUtil.sGet(key);
} else {
//跨服分组
key = Integer.toString(crossGroup) + RedisKey.Delimiter_colon + mapId;
set = redisUtil.sGet(RedisKey.EXPLORER_MAP_PLAYER + RedisKey.Delimiter_colon + key);
}
//rkey = RedisUtil.getInstence().getKey(RedisKey.EXPLORER_MAP_PLAYER, key);
Set<String> set = redisUtil.sGet(RedisKey.EXPLORER_MAP_PLAYER + RedisKey.Delimiter_colon + key);
if(set == null){
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.ExplorerMapPlayerInfoResponse.getNumber(), builder.build(), true);
return;
}
for (String uidStr : set) {
CSPlayer csPlayer = CrossServiceLogic.getPlayerByRedis(Integer.parseInt(uidStr));
String serverName = CrossServiceLogic.simplifyServerName(csPlayer.getServerId());

View File

@ -74,12 +74,13 @@ public class ExplorerMapSendHandler extends BaseHandler<PlayerInfoProto.Explorer
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
String key;
if (crossGroup == -1) {
key = Integer.toString(mapId);
key = RedisUtil.getInstence().getKey(RedisKey.EXPLORER_MAP_PLAYER,String.valueOf(mapId));
redisUtil.sSet(key, String.valueOf(user.getId()));
} else {
//跨服分组
key = Integer.toString(crossGroup) + RedisKey.Delimiter_colon + mapId;
redisUtil.sSet(RedisKey.EXPLORER_MAP_PLAYER + RedisKey.Delimiter_colon + key, String.valueOf(user.getId()));
}
redisUtil.sSet(RedisKey.EXPLORER_MAP_PLAYER + RedisKey.Delimiter_colon + key, String.valueOf(user.getId()));
SExplore exploreConfig = STableManager.getConfig(SExplore.class).get(mapId);
if (exploreConfig == null) {
continue;