RuoYi
2022-05-20 64e3ed28616f4793b9ea9b8791a4f917d1d13010
src/main/java/com/ruoyi/common/utils/DictUtils.java
@@ -41,8 +41,7 @@
        Object cacheObj = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key));
        if (StringUtils.isNotNull(cacheObj))
        {
            List<SysDictData> dictDatas = StringUtils.cast(cacheObj);
            return dictDatas;
            return StringUtils.cast(cacheObj);
        }
        return null;
    }
@@ -92,7 +91,7 @@
                {
                    if (value.equals(dict.getDictValue()))
                    {
                        propertyString.append(dict.getDictLabel() + separator);
                        propertyString.append(dict.getDictLabel()).append(separator);
                        break;
                    }
                }
@@ -132,7 +131,7 @@
                {
                    if (label.equals(dict.getDictLabel()))
                    {
                        propertyString.append(dict.getDictValue() + separator);
                        propertyString.append(dict.getDictValue()).append(separator);
                        break;
                    }
                }
@@ -152,6 +151,16 @@
    }
    /**
     * 删除指定字典缓存
     *
     * @param key 字典键
     */
    public static void removeDictCache(String key)
    {
        SpringUtils.getBean(RedisCache.class).deleteObject(getCacheKey(key));
    }
    /**
     * 清空字典缓存
     */
    public static void clearDictCache()