Commit 56a6e940 by 若依 Committed by Gitee

!146 浏览代码时间字符串处理

Merge pull request !146 from 厚积薄发/master
parents b05a5399 868edbc8
...@@ -224,9 +224,17 @@ public class ExcelUtil<T> ...@@ -224,9 +224,17 @@ public class ExcelUtil<T>
} }
else else
{ {
String dateFormat = field.getAnnotation(Excel.class).dateFormat();
if(StringUtils.isNotEmpty(dateFormat))
{
val=DateUtils.parseDateToStr(dateFormat,(Date) val);
}
else
{
val = Convert.toStr(val); val = Convert.toStr(val);
} }
} }
}
else if ((Integer.TYPE == fieldType) || (Integer.class == fieldType)) else if ((Integer.TYPE == fieldType) || (Integer.class == fieldType))
{ {
val = Convert.toInt(val); val = Convert.toInt(val);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment