Commit f6acd499 by 丁伟峰

LocalDateTime转换处理

1 parent 4ae7289e
package com.dituhui.pea.order.dto; package com.dituhui.pea.order.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -38,6 +43,10 @@ public class BusinessSkillListDTO { ...@@ -38,6 +43,10 @@ public class BusinessSkillListDTO {
@Accessors(chain = true) @Accessors(chain = true)
public static class Content { public static class Content {
private String brand; private String brand;
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
@JsonSerialize(using = LocalDateTimeSerializer.class)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime; private LocalDateTime createTime;
private Boolean gasCert; private Boolean gasCert;
private String layerId; private String layerId;
...@@ -54,6 +63,10 @@ public class BusinessSkillListDTO { ...@@ -54,6 +63,10 @@ public class BusinessSkillListDTO {
private Integer takeTime; private Integer takeTime;
private String type; private String type;
private String typeCategory; private String typeCategory;
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
@JsonSerialize(using = LocalDateTimeSerializer.class)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime; private LocalDateTime updateTime;
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!