From 54bfa627f0fd37550f9b828f630e98e78aea536d Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 20 Sep 2021 19:04:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2Excel=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=8F=AF=E8=83=BD=E5=87=BA=E7=8E=B0=E7=9A=84?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index 54157f3..0ab074e 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -340,8 +340,11 @@ public class ExcelUtil { val = ""; } - byte[] data = image.getData(); - val = FileUtils.writeImportBytes(data); + else + { + byte[] data = image.getData(); + val = FileUtils.writeImportBytes(data); + } } ReflectUtils.invokeSetter(entity, propertyName, val); }