| | |
| | |
|
| | | import java.util.Collection;
|
| | | import java.util.List;
|
| | | import com.alibaba.fastjson2.JSONArray;
|
| | | import com.ruoyi.common.core.constant.Constants;
|
| | | import com.ruoyi.common.core.utils.SpringUtils;
|
| | | import com.ruoyi.common.core.utils.StringUtils;
|
| | |
| | | */
|
| | | public static List<SysDictData> getDictCache(String key)
|
| | | {
|
| | | Object cacheObj = SpringUtils.getBean(RedisService.class).getCacheObject(getCacheKey(key));
|
| | | if (StringUtils.isNotNull(cacheObj))
|
| | | JSONArray arrayCache = SpringUtils.getBean(RedisService.class).getCacheObject(getCacheKey(key));
|
| | | if (StringUtils.isNotNull(arrayCache))
|
| | | {
|
| | | List<SysDictData> dictDatas = StringUtils.cast(cacheObj);
|
| | | return dictDatas;
|
| | | return arrayCache.toList(SysDictData.class);
|
| | | }
|
| | | return null;
|
| | | }
|