feat: 提供诸多简化配置,更轻松实现功能

This commit is contained in:
wangyu 2021-09-05 01:38:30 +08:00
parent 913325cfa1
commit ad8869184a

View File

@ -74,6 +74,9 @@ public class DictionaryProcessor implements InitializingBean {
if (CollectionUtils.isEmpty(dictionary.getValues())) {
dictionary.setValues(mapValues(annotation.enumType()));
}
if (StringUtils.isBlank(dictionary.getDescription())) {
dictionary.setDescription("系统自动创建的内置字典");
}
dictionary.setName(StringUtils.isNotBlank(annotation.name()) ? annotation.name() : annotation.value());
return dictionary;
}