diff --git a/cloud-common-plugin-dynamic/src/main/resources/templates/codetemplate/default/pojo/dto.ftl b/cloud-common-plugin-dynamic/src/main/resources/templates/codetemplate/default/pojo/dto.ftl index f28b017..d7d5245 100644 --- a/cloud-common-plugin-dynamic/src/main/resources/templates/codetemplate/default/pojo/dto.ftl +++ b/cloud-common-plugin-dynamic/src/main/resources/templates/codetemplate/default/pojo/dto.ftl @@ -50,6 +50,7 @@ public class ${firstUpperTableName}DTO { public void set${firstUpperTableName}Id(String ${firstLowerTableName}Id) { this.${firstLowerTableName}Id = ${firstLowerTableName}Id; } + <#list fieldList! as field> <#if field.fieldType == "number"> public Integer get${field.firstUpperFieldName}() { diff --git a/cloud-common-plugin-dynamic/src/main/resources/templates/codetemplate/default/pojo/vo.ftl b/cloud-common-plugin-dynamic/src/main/resources/templates/codetemplate/default/pojo/vo.ftl index 58d99fa..b7cda5c 100644 --- a/cloud-common-plugin-dynamic/src/main/resources/templates/codetemplate/default/pojo/vo.ftl +++ b/cloud-common-plugin-dynamic/src/main/resources/templates/codetemplate/default/pojo/vo.ftl @@ -27,8 +27,11 @@ public class ${firstUpperTableName}VO { <#elseif field.fieldType == "double"> @CheckNumberAnnotation(name = "${field.fieldExplain}") private Double ${field.fieldName}; - <#elseif field.fieldType == "date" || field.fieldType == "datetime"> + <#elseif field.fieldType == "date"> @CheckEmptyAnnotation(name = "${field.fieldExplain}", verifyType = "date") + private String ${field.fieldName}; + <#elseif field.fieldType == "datetime"> + @CheckEmptyAnnotation(name = "${field.fieldExplain}", verifyType = "datetime") private String ${field.fieldName}; <#else> <#if field.fieldType == "string">