From 3793ba4a9b6be8faa6df0d4a76c06763ac03f873 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 29 十月 2025 15:06:04 +0800
Subject: [PATCH] 外购成品报检相关问题调整

---
 ruoyi-common/src/main/java/com/ruoyi/common/utils/RedisUtil.java |   51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 50 insertions(+), 1 deletions(-)

diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/RedisUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/RedisUtil.java
index 664ec0b..fd82b06 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/RedisUtil.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/RedisUtil.java
@@ -577,7 +577,7 @@
      * @param time  鏃堕棿(绉�)
      * @return true 瀛樻斁鎴愬姛 false瀛樻斁澶辫触
      */
-    public static boolean lSet(String key, List<Object> value, long time) {
+    public static boolean lSet(String key, List<?> value, long time) {
         try {
             if (time > 0) {
                 redisTemplate.opsForList().rightPushAll(key, value);
@@ -628,5 +628,54 @@
             return 0;
         }
     }
+
+    //====================================================ZSet=======================================================
+
+    /**
+     * 鑾峰彇zset鏁版嵁闀垮害
+     * @param key 閿�
+     * @return
+     */
+    public static long getZSetSize(String key){
+        try {
+            return redisTemplate.opsForZSet().size(key);
+        }catch (Exception e){
+            e.printStackTrace();
+            return 0L;
+        }
+    }
+
+    /**
+     * 鏂板涓�涓獄set
+     * @param key    閿�
+     * @param source 鍒嗘暟
+     * @param value  鍊�
+     * @return
+     */
+    public static boolean addZSet(String key,double source,Object value){
+        try {
+            return redisTemplate.opsForZSet().add(key, value, source);
+        }catch(Exception e){
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    /**
+     * 鍒犻櫎zset鍏冪礌锛屾寜鎺掑悕
+     * @param key   閿�
+     * @param start 寮�濮嬬储寮�
+     * @param end   缁撴潫绱㈠紩
+     * @return
+     */
+    public static long delZSetRange(String key,long start,long end){
+        try {
+            return redisTemplate.opsForZSet().removeRange(key,start,end);
+        }catch(Exception e){
+            e.printStackTrace();
+            return 0L;
+        }
+    }
+
 }
 

--
Gitblit v1.9.3