作者 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 });
@@ -106,7 +106,7 @@ public class DataScopeAspect @@ -106,7 +106,7 @@ public class DataScopeAspect
106 continue; 106 continue;
107 } 107 }
108 if (DATA_SCOPE_ALL.equals(dataScope)) 108 if (DATA_SCOPE_ALL.equals(dataScope))
109 - { 109 + {
110 sqlString = new StringBuilder(); 110 sqlString = new StringBuilder();
111 conditions.add(dataScope); 111 conditions.add(dataScope);
112 break; 112 break;