|
|
|
@ -414,11 +414,14 @@ public class CoreBaseService<T> {
|
|
|
|
|
String display = "";
|
|
|
|
|
Method methodByName = ReflectUtil.getMethodByName(field.getType(), "get" + StrUtil.upperFirst(dict.value()));
|
|
|
|
|
Assert.notNull(methodByName, field.getName() + " 缺少getter方法");
|
|
|
|
|
Object enumValue = ReflectUtil.invoke(field.get(ext), methodByName);
|
|
|
|
|
if (ObjectUtil.isNotEmpty(enumValue)) {
|
|
|
|
|
display = String.valueOf(enumValue);
|
|
|
|
|
Object o = field.get(ext);
|
|
|
|
|
if(null != o) {
|
|
|
|
|
Object enumValue = ReflectUtil.invoke(o, methodByName);
|
|
|
|
|
if (ObjectUtil.isNotEmpty(enumValue)) {
|
|
|
|
|
display = String.valueOf(enumValue);
|
|
|
|
|
}
|
|
|
|
|
ext.set(field.getName() + dict.suffix(), display);
|
|
|
|
|
}
|
|
|
|
|
ext.set(field.getName() + dict.suffix(), display);
|
|
|
|
|
} catch (IllegalArgumentException | IllegalAccessException e) {
|
|
|
|
|
log.error("@DictEnum 注解解析异常: {}", e.getMessage());
|
|
|
|
|
} finally {
|
|
|
|
|