代码生成器时间字段处理
This commit is contained in:
+1
-10
@@ -28,14 +28,5 @@
|
|||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
@ApiModelProperty(value = "${po.filedComment}")
|
@ApiModelProperty(value = "${po.filedComment}")
|
||||||
<#if po.fieldDbType=="Date">
|
private ${po.fieldType} ${po.fieldName};
|
||||||
<#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>
|
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
-2
@@ -57,14 +57,12 @@ public class ${entityName} implements Serializable {
|
|||||||
@Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd"${list_field_dictCode})
|
@Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd"${list_field_dictCode})
|
||||||
</#if>
|
</#if>
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
@JsonSerialize(using = com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer.class)
|
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
<#else>
|
<#else>
|
||||||
<#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
|
<#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
|
||||||
@Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss"${list_field_dictCode})
|
@Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss"${list_field_dictCode})
|
||||||
</#if>
|
</#if>
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
@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")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
|
|||||||
Reference in New Issue
Block a user