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

master
RuoYi 5 years ago committed by Limy
parent c928e55b2c
commit 31b2e3cabc

@ -225,11 +225,11 @@ public class ExcelUtil<T>
else else
{ {
String dateFormat = field.getAnnotation(Excel.class).dateFormat(); 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); val = Convert.toStr(val);
} }

Loading…
Cancel
Save