修复代码生成date类型请求参数时,类型转换报错问题。
This commit is contained in:
parent
a3cfc3593b
commit
adbebc144c
|
@ -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>
|
||||
<#if field.attrType == 'Date'>
|
||||
@DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
</#if>
|
||||
private ${field.attrType} ${field.attrName};
|
||||
|
||||
</#list>
|
||||
|
|
Loading…
Reference in New Issue
Block a user