作者 RuoYi

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

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