支持自定义隐藏属性列过滤子对象

zmy
RuoYi 2023-03-18 10:45:29 +08:00
parent feff419641
commit f8ad7ea3ce
1 changed files with 2 additions and 1 deletions

View File

@ -1257,7 +1257,8 @@ public class ExcelUtil<T>
Excel[] excels = attrs.value(); Excel[] excels = attrs.value();
for (Excel attr : excels) for (Excel attr : excels)
{ {
if (attr != null && (attr.type() == Type.ALL || attr.type() == type)) if (!ArrayUtils.contains(this.excludeFields, field.getName() + "." + attr.targetAttr())
&& (attr != null && (attr.type() == Type.ALL || attr.type() == type)))
{ {
field.setAccessible(true); field.setAccessible(true);
fields.add(new Object[] { field, attr }); fields.add(new Object[] { field, attr });