diff --git a/shkj-common/src/main/java/com/shkj/common/utils/MessageUtils.java b/shkj-common/src/main/java/com/shkj/common/utils/MessageUtils.java index ac66701..168bb5d 100644 --- a/shkj-common/src/main/java/com/shkj/common/utils/MessageUtils.java +++ b/shkj-common/src/main/java/com/shkj/common/utils/MessageUtils.java @@ -31,7 +31,7 @@ public class MessageUtils { return messageSource.getMessage(code, args, LocaleContextHolder.getLocale()); } catch (Exception e) { // e.printStackTrace(); - log.error("国际化出错了 = {}", e.getMessage()); + // log.error("国际化出错了 = {}", e.getMessage()); } return code; } diff --git a/shkj-system/src/main/java/com/shkj/system/service/impl/SysDictTypeServiceImpl.java b/shkj-system/src/main/java/com/shkj/system/service/impl/SysDictTypeServiceImpl.java index fd3fd14..67058b0 100644 --- a/shkj-system/src/main/java/com/shkj/system/service/impl/SysDictTypeServiceImpl.java +++ b/shkj-system/src/main/java/com/shkj/system/service/impl/SysDictTypeServiceImpl.java @@ -78,10 +78,11 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService { public List selectDictDataByType(String dictType) { List dictDatas = DictUtils.getDictCache(dictType); - for (SysDictData dictData : dictDatas) { - dictData.setDictLabel(MessageUtils.message(dictData.getDictLabel())); - } + if (StringUtils.isNotEmpty(dictDatas)) { + for (SysDictData dictData : dictDatas) { + dictData.setDictLabel(MessageUtils.message(dictData.getDictLabel())); + } return dictDatas; } dictDatas = dictDataMapper.selectDictDataByType(dictType, SecurityUtils.getCurrentBranchId());