mirror of https://gitee.com/y_project/RuoYi.git
Excel注解dateFormat属性为字符串时间时格式处理
parent
56a6e940c2
commit
28b8f3e36f
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue