From dfb27bc7f714ad995becb6dc544ba1f3bb4b59a4 Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Mon, 20 Apr 2020 23:23:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=97=B6=E9=97=B4=E6=88=B3?= =?UTF-8?q?=E6=AD=A3=E5=88=99=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/codetemplate/default/pojo/dto.ftl | 1 + .../resources/templates/codetemplate/default/pojo/vo.ftl | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) 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">