allen преди 3 месеца
родител
ревизия
58a140ce69
променени са 1 файла, в които са добавени 3 реда и са изтрити 4 реда
  1. 3 4
      fdapfe-common/src/main/java/com/cn/fdapfe/common/utils/DictUtils.java

+ 3 - 4
fdapfe-common/src/main/java/com/cn/fdapfe/common/utils/DictUtils.java

@@ -39,10 +39,9 @@ public class DictUtils
      */
     public static List<SysDictData> getDictCache(String key)
     {
-        JSONArray arrayCache = JSONArray.of(SpringUtils.getBean(CaffeineCache.class).getCache(getCacheKey(key)));
-        if (StringUtils.isNotNull(arrayCache))
-        {
-            return arrayCache.toList(SysDictData.class);
+        Object cache = SpringUtils.getBean(CaffeineCache.class).getCache(getCacheKey(key));
+        if(cache instanceof List){
+            return (List<SysDictData>) cache;
         }
         return null;
     }