Browse Source

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

prod
RuoYi 3 years ago
parent
commit
4f02f3c6f7
  1. 3
      ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

3
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

@ -1440,7 +1440,8 @@ public class ExcelUtil<T>
Excel[] excels = attrs.value();
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);
fields.add(new Object[] { field, attr });

Loading…
Cancel
Save