From 3b5a37c270e5b6649b9a168ee753c2b3353a257a Mon Sep 17 00:00:00 2001
From: zouyaoji <370681295@qq.com>
Date: 星期六, 06 八月 2022 11:27:02 +0800
Subject: [PATCH] 前端显示媒体服务器配置时报错修复
---
src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 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 dd5614f..8ab0672 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
*/
@@ -660,6 +661,24 @@
}
/**
+ * 鍦ㄩ敭涓� key 鐨� list涓Щ闄ょ涓�涓厓绱�
+ * @param key 閿�
+ * @return
+ */
+ public Object lLeftPop(String key) {
+ return redisTemplate.opsForList().leftPop(key);
+ }
+
+ /**
+ * 鍦ㄩ敭涓� key 鐨� list涓Щ闄ゃ�佹渶鍚庝竴涓厓绱�
+ * @param key 閿�
+ * @return
+ */
+ public Object lrightPop(String key) {
+ return redisTemplate.opsForList().rightPop(key);
+ }
+
+ /**
* 妯$硦鏌ヨ
* @param key 閿�
* @return true / false
@@ -729,4 +748,11 @@
return new ArrayList<>(keys);
}
+ // ============================== 娑堟伅鍙戦�佷笌璁㈤槄 ==============================
+ public void convertAndSend(String channel, JSONObject msg) {
+// redisTemplate.convertAndSend(channel, msg);
+ redisTemplate.convertAndSend(channel, msg);
+
+ }
+
}
--
Gitblit v1.8.0