diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Query.java.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/java/Query.java.ftl index 57d53a55683fdbb7379893f84e7425b5e71012cb..bdb205b934da299af5be74f3a398129d90651ccd 100644 --- a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Query.java.ftl +++ b/maku-boot-module/maku-module-generator/src/main/resources/template/java/Query.java.ftl @@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import ${package}.framework.common.query.Query; +import org.springframework.format.annotation.DateTimeFormat; <#list importList as i> import ${i!}; @@ -23,6 +24,9 @@ public class ${ClassName}Query extends Query { <#if field.fieldComment!?length gt 0> @Schema(description = "${field.fieldComment}") + <#if field.attrType == 'Date'> + @DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN) + private ${field.attrType} ${field.attrName};