Browse Source

修复导入Excel时字典字段类型为Long转义为空问题

tags/v3.5.0
RuoYi 3 years ago
parent
commit
82535c82d3
  1. 2
      ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java

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

@ -296,7 +296,7 @@ public class ExcelUtil<T> @@ -296,7 +296,7 @@ public class ExcelUtil<T>
{
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);
}

Loading…
Cancel
Save