generated from root/miduo_server
增加预注册处理
parent
74b49b1fc5
commit
aeb0aba0de
|
|
@ -66,7 +66,7 @@ public class RedisUserKey {
|
|||
|
||||
public static final String LOGIC_SERVER_INFO = "LOGIC_SERVER_INFO";
|
||||
public static final String PLAYER_INFO_CACHE = "PLAYER_INFO_CACHE";
|
||||
|
||||
public static final String F5_PRE_REWARD = "F5_PRE_REWARD";//F5预热奖励
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.jmfy.util;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.jmfy.redisProperties.RedisProperties;
|
||||
import com.jmfy.redisProperties.RedisUserKey;
|
||||
import org.slf4j.Logger;
|
||||
|
|
@ -11,6 +12,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
|
|||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
import redis.clients.jedis.JedisPoolConfig;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
|
@ -334,4 +336,15 @@ public class RedisUtil {
|
|||
LOGGER.error("sleep->msg=null", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String,Integer> getMapValues(String key){
|
||||
Map<String,Integer> result = new HashMap<String,Integer>();
|
||||
Map<Object, Object> entries = redisObjectTemplate.opsForHash().entries(key);
|
||||
for(Map.Entry<Object,Object> item : entries.entrySet()){
|
||||
Object key1 = item.getKey();
|
||||
Object value = item.getValue();
|
||||
result.put(gson.fromJson(gson.toJson(key1),String.class),gson.fromJson(value.toString(),Integer.class));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue