Преглед на файлове

update ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java.
增加删除Hash中的数据

雪丛 преди 3 години
родител
ревизия
790aa0d24b
променени са 1 файла, в които са добавени 12 реда и са изтрити 0 реда
  1. 12 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java

+ 12 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java

@@ -209,6 +209,18 @@ public class RedisCache
         return opsForHash.get(key, hKey);
     }
 
+    /**
+     * 删除Hash中的数据
+     * 
+     * @param key
+     * @param mapkey
+     */
+    public void delCacheMapValue(final String key, final String hkey)
+    {
+        HashOperations hashOperations = redisTemplate.opsForHash();
+        hashOperations.delete(key, hkey);
+    }
+
     /**
      * 获取多个Hash中的数据
      *