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

pull/149/head
RuoYi 2019-11-21 16:33:34 +08:00
parent 56a6e940c2
commit 28b8f3e36f
1 changed files with 3 additions and 3 deletions

View File

@ -225,11 +225,11 @@ 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
else
{
val = Convert.toStr(val);
}