防止Excel导入图片可能出现的异常

This commit is contained in:
RuoYi 2021-09-20 19:04:57 +08:00
parent 36c058188a
commit 54bfa627f0
1 changed files with 5 additions and 2 deletions

View File

@ -340,8 +340,11 @@ public class ExcelUtil<T>
{ {
val = ""; val = "";
} }
byte[] data = image.getData(); else
val = FileUtils.writeImportBytes(data); {
byte[] data = image.getData();
val = FileUtils.writeImportBytes(data);
}
} }
ReflectUtils.invokeSetter(entity, propertyName, val); ReflectUtils.invokeSetter(entity, propertyName, val);
} }