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

Merge pull request !146 from 厚积薄发/master
pull/146/MERGE
若依 2019-11-21 16:31:37 +08:00 committed by Gitee
commit 56a6e940c2
1 changed files with 9 additions and 1 deletions

View File

@ -224,7 +224,15 @@ public class ExcelUtil<T>
}
else
{
val = Convert.toStr(val);
String dateFormat = field.getAnnotation(Excel.class).dateFormat();
if(StringUtils.isNotEmpty(dateFormat))
{
val=DateUtils.parseDateToStr(dateFormat,(Date) val);
}
else
{
val = Convert.toStr(val);
}
}
}
else if ((Integer.TYPE == fieldType) || (Integer.class == fieldType))