From ac1a4a027a7bd88efb32e9da666bdba4b5fa166f Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 14 一月 2022 17:04:26 +0800 Subject: [PATCH] 支持国标级联的目录订阅功能 --- src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java b/src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java index 5db3c7f..da09851 100644 --- a/src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java +++ b/src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java @@ -3,13 +3,14 @@ import java.util.*; import java.util.concurrent.TimeUnit; +import com.alibaba.fastjson.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.*; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; /** - * @Description:Redis宸ュ叿绫� + * @description:Redis宸ュ叿绫� * @author: swwheihei * @date: 2020骞�5鏈�6鏃� 涓嬪崍8:27:29 */ @@ -415,10 +416,10 @@ * * @param key * @param value - * @param score + * @param delta -1 琛ㄧず鍑� 1 琛ㄧず鍔�1 */ - public Double zIncrScore(Object key, Object value, double score) { - return redisTemplate.opsForZSet().incrementScore(key, value, score); + public Double zIncrScore(Object key, Object value, double delta) { + return redisTemplate.opsForZSet().incrementScore(key, value, delta); } /** @@ -729,4 +730,11 @@ return new ArrayList<>(keys); } + // ============================== 娑堟伅鍙戦�佷笌璁㈤槄 ============================== + public void convertAndSend(String channel, JSONObject msg) { +// redisTemplate.convertAndSend(channel, msg); + redisTemplate.convertAndSend(channel, msg); + + } + } -- Gitblit v1.8.0