代码生成器时间字段处理
This commit is contained in:
+1
-10
@@ -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>
|
||||
-2
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user