Browse Source

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

pull/360/MERGE
RuoYi 3 years ago
parent
commit
6e06a6a9e8
  1. 2
      ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

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

@ -328,7 +328,7 @@ public class ExcelUtil<T>
{ {
val = Convert.toInt(val); 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); val = Convert.toLong(val);
} }

Loading…
Cancel
Save