From f8ad7ea3ce00e35e8bd9bb17258153714f03d711 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 18 Mar 2023 10:45:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E5=B1=9E=E6=80=A7=E5=88=97=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=AD=90=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java index 05ce1b7..ebef67e 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java @@ -1257,7 +1257,8 @@ public class ExcelUtil 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 });