mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 11:51:55 +08:00
Pre Merge pull request !372 from 伤枫落月/master
This commit is contained in:
@@ -1290,16 +1290,21 @@ public class ExcelUtil<T>
|
|||||||
Excel attr = field.getAnnotation(Excel.class);
|
Excel attr = field.getAnnotation(Excel.class);
|
||||||
if (attr != null && (attr.type() == Type.ALL || attr.type() == type))
|
if (attr != null && (attr.type() == Type.ALL || attr.type() == type))
|
||||||
{
|
{
|
||||||
field.setAccessible(true);
|
if (Collection.class.isAssignableFrom(field.getType()))
|
||||||
fields.add(new Object[] { field, attr });
|
{
|
||||||
}
|
subMethod = getSubMethod(field.getName(), clazz);
|
||||||
if (Collection.class.isAssignableFrom(field.getType()))
|
ParameterizedType pt = (ParameterizedType) field.getGenericType();
|
||||||
{
|
Class<?> subClass = (Class<?>) pt.getActualTypeArguments()[0];
|
||||||
subMethod = getSubMethod(field.getName(), clazz);
|
this.subFields = FieldUtils.getFieldsListWithAnnotation(subClass, Excel.class);
|
||||||
ParameterizedType pt = (ParameterizedType) field.getGenericType();
|
}
|
||||||
Class<?> subClass = (Class<?>) pt.getActualTypeArguments()[0];
|
else
|
||||||
this.subFields = FieldUtils.getFieldsListWithAnnotation(subClass, Excel.class);
|
{
|
||||||
|
field.setAccessible(true);
|
||||||
|
fields.add(new Object[] { field, attr });
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多注解
|
// 多注解
|
||||||
|
|||||||
Reference in New Issue
Block a user