Skip to content

Commit

Permalink
解决“在只填加了字典类型,没有添加字典数据时,会出现缓存了空集合,即使后边添加了字典数据也没用,只能清空redis缓存。”的问题,小问题就…
Browse files Browse the repository at this point in the history
…是判断稍稍改了下,若依大大让我pr当个贡献者,很荣幸很欣慰。感谢!
  • Loading branch information
csg0328 committed Sep 2, 2020
1 parent 4f86b6d commit 3fd9147
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ public List<SysDictType> selectDictTypeAll()
public List<SysDictData> selectDictDataByType(String dictType)
{
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
if (StringUtils.isNotNull(dictDatas))
if (null!=dictDatas&&!dictDatas.isEmpty())
{
return dictDatas;
}
dictDatas = dictDataMapper.selectDictDataByType(dictType);
if (StringUtils.isNotNull(dictDatas))
if (null!=dictDatas&&!dictDatas.isEmpty())
{
DictUtils.setDictCache(dictType, dictDatas);
return dictDatas;
Expand Down

0 comments on commit 3fd9147

Please sign in to comment.