RedisUtils修复getY方法

This commit is contained in:
hupeng
2020-09-18 13:45:05 +08:00
parent 41196a246a
commit 9baa175ce6

View File

@ -168,7 +168,7 @@ public class RedisUtils {
}
public String getY(String key){
return key == null ? "" : redisTemplate.opsForValue().get(key).toString();
return key == null || !redisTemplate.hasKey(key) ? "" : redisTemplate.opsForValue().get(key).toString();
}
/**