Browse Source

# 对象转换为map 时间格式转换错误bug修改

zhongwei
haungxing 10 months ago
parent
commit
3d7c231f69
  1. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/ObjectUtils.java

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/ObjectUtils.java

@ -37,7 +37,7 @@ public class ObjectUtils {
DateTimeToMap dateTimeToMap = field.getAnnotation(DateTimeToMap.class);
LocalDateTime time = (LocalDateTime) value;
if(ObjectUtil.isEmpty(dateTimeToMap)) {
result.put(field.getName(),time.format(DateUtil.TIME_FORMATTER));
result.put(field.getName(),time.format(DateUtil.DATETIME_FORMATTER));
}
else {
result.putAll(LocalDateConvertMap(time,dateTimeToMap.prefix(),dateTimeToMap.split()));

Loading…
Cancel
Save