Selaa lähdekoodia

!235 RedisService 删除Hash中的某条数据 方法返回值必为false问题修复
Merge pull request !235 from taest/N/A

若依 2 vuotta sitten
vanhempi
commit
8345eed709

+ 1 - 1
ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/service/RedisService.java

@@ -252,7 +252,7 @@ public class RedisService
      */
     public boolean deleteCacheMapValue(final String key, final String hKey)
     {
-        return Boolean.TRUE.equals(redisTemplate.opsForHash().delete(key, hKey));
+        return redisTemplate.opsForHash().delete(key, hKey) > 0;
     }
 
     /**