| | |
| | | package com.dji.sample.component.redis; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisCallback; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | return redisTemplate.opsForZSet().score(key, value); |
| | | } |
| | | |
| | | /** |
| | | * ZINCRBY |
| | | * @param key |
| | | * @param value |
| | | * @param delta |
| | | */ |
| | | public static Double zIncrement(String key, Object value, double delta) { |
| | | return redisTemplate.opsForZSet().incrementScore(key, value, delta); |
| | | } |
| | | } |