Pre Merge pull request !372 from 伤枫落月/master

This commit is contained in:
伤枫落月
2024-06-29 14:47:45 +00:00
committed by Gitee

View File

@@ -1290,9 +1290,6 @@ public class ExcelUtil<T>
Excel attr = field.getAnnotation(Excel.class);
if (attr != null && (attr.type() == Type.ALL || attr.type() == type))
{
field.setAccessible(true);
fields.add(new Object[] { field, attr });
}
if (Collection.class.isAssignableFrom(field.getType()))
{
subMethod = getSubMethod(field.getName(), clazz);
@@ -1300,6 +1297,14 @@ public class ExcelUtil<T>
Class<?> subClass = (Class<?>) pt.getActualTypeArguments()[0];
this.subFields = FieldUtils.getFieldsListWithAnnotation(subClass, Excel.class);
}
else
{
field.setAccessible(true);
fields.add(new Object[] { field, attr });
}
}
}
// 多注解