From 22f7ccc11d414222d36fea121bf2e9b9a884f53f Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 5 Mar 2022 08:39:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=85=A5Excel?= =?UTF-8?q?=E6=97=B6=E5=AD=97=E5=85=B8=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=BALong=E8=BD=AC=E4=B9=89=E4=B8=BA=E7=A9=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7c4510a5..0d06c4b8 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 @@ -328,7 +328,7 @@ public class ExcelUtil { val = Convert.toInt(val); } - else if (Long.TYPE == fieldType || Long.class == fieldType) + else if ((Long.TYPE == fieldType || Long.class == fieldType) && StringUtils.isNumeric(Convert.toStr(val))) { val = Convert.toLong(val); }