代码生成器时间字段处理

This commit is contained in:
zer0Black
2021-11-08 23:13:41 +08:00
parent 7705529b14
commit 8a8706ab00
2 changed files with 1 additions and 12 deletions
@@ -28,14 +28,5 @@
}
<#else>
@ApiModelProperty(value = "${po.filedComment}")
<#if po.fieldDbType=="Date">
<#if po.classType=="date">
private java.time.LocalDate ${po.fieldName};
<#else>
private java.time.LocalDateTime ${po.fieldName};
</#if>
<#else>
private ${po.fieldType} ${po.fieldName};
</#if>
private ${po.fieldType} ${po.fieldName};
</#if>
@@ -57,14 +57,12 @@ public class ${entityName} implements Serializable {
@Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd"${list_field_dictCode})
</#if>
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@JsonSerialize(using = com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer.class)
@DateTimeFormat(pattern="yyyy-MM-dd")
<#else>
<#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
@Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss"${list_field_dictCode})
</#if>
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@JsonSerialize(using = com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer.class)
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
</#if>
<#else>