From 790aa0d24bee0036d9a697a18c130d531649213b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=AA=E4=B8=9B?= <8461269+ouwei2020@user.noreply.gitee.com> Date: Tue, 26 Oct 2021 01:42:12 +0000 Subject: [PATCH] =?UTF-8?q?update=20ruoyi-common/src/main/java/com/ruoyi/c?= =?UTF-8?q?ommon/core/redis/RedisCache.java.=20=E5=A2=9E=E5=8A=A0=E5=88=A0?= =?UTF-8?q?=E9=99=A4Hash=E4=B8=AD=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/core/redis/RedisCache.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java index 23875335..3246b773 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java +++ b/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中的数据 *