|
|
|
@ -10,12 +10,13 @@ package com.epmet.commons.tools.redis; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import org.apache.poi.ss.formula.functions.T; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; |
|
|
|
import org.springframework.data.redis.core.*; |
|
|
|
import org.springframework.data.redis.core.HashOperations; |
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate; |
|
|
|
import org.springframework.data.redis.core.ZSetOperations; |
|
|
|
import org.springframework.data.redis.support.atomic.RedisAtomicLong; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
@ -363,6 +364,17 @@ public class RedisUtils { |
|
|
|
return redisTemplate.opsForZSet().incrementScore(key, value, delta); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 获取某个Zset的score |
|
|
|
* @Param key |
|
|
|
* @Param o |
|
|
|
* @author zxc |
|
|
|
* @date 2020/12/9 下午3:07 |
|
|
|
*/ |
|
|
|
public Double getScore(String key, Object o){ |
|
|
|
return redisTemplate.opsForZSet().score(key,o); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 判断key是否存在 |
|
|
|
* @param key |
|
|
|
|