Browse Source

Excel注解dateFormat属性为字符串时间时格式处理

pull/149/head
RuoYi 5 years ago
parent
commit
28b8f3e36f
  1. 4
      ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

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

@ -225,9 +225,9 @@ public class ExcelUtil<T>
else
{
String dateFormat = field.getAnnotation(Excel.class).dateFormat();
if(StringUtils.isNotEmpty(dateFormat))
if (StringUtils.isNotEmpty(dateFormat))
{
val=DateUtils.parseDateToStr(dateFormat,(Date) val);
val = DateUtils.parseDateToStr(dateFormat, (Date) val);
}
else
{

Loading…
Cancel
Save