redis key

back_recharge
wangyuan 2019-04-28 17:29:04 +08:00
parent 9968986c49
commit ac596f4612
1 changed files with 3 additions and 3 deletions

View File

@ -1343,7 +1343,7 @@ public class MapLogic {
}
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapManager.getCurMapId());
if (sChallengeMapConfig.getIfRank() == 1 && useTime > 0 && useTime < beforTime) {
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapManager.getCurMapId()), true);
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapManager.getCurMapId()), false);
RedisUtil.getInstence().zsetAddOne(key, mapManager.getRootId(), useTime);
}
mapManager.updateCrossInfoMap(mapManager.getCurMapId(), crossInfo);
@ -1360,7 +1360,7 @@ public class MapLogic {
* @param messageType
*/
public void getMapRank(ISession session, int mapId, MessageTypeProto.MessageType messageType) throws Exception {
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapId), true);
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapId), false);
Set<String> zset = RedisUtil.getInstence().getZset(key, 0, 10);
List<MapInfoProto.MapRankInfo> mapRankInfos = new ArrayList<>(10);
int rank = 1;
@ -1848,7 +1848,7 @@ public class MapLogic {
public void minuteCheckAndRemoveMapRank(){
Map<Integer, Map<Integer, SCMap>> sCMap = SCMap.sCMap;
for(Integer mapId : sCMap.keySet()){
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapId), true);
String key = RedisKey.getKey(RedisKey.MAP_RANK, Integer.toString(mapId), false);
int size = RedisUtil.getInstence().getZsetSize(key);
if(size>15){
RedisUtil.getInstence().removeZSetRangeByRank(key, 15,size);