模板String get返回增加 trim 方法
This commit is contained in:
parent
2f6387288a
commit
da3477d87d
@ -44,7 +44,7 @@ public class ${firstUpperTableName}DTO {
|
|||||||
</#list>
|
</#list>
|
||||||
|
|
||||||
public String get${firstUpperTableName}Id() {
|
public String get${firstUpperTableName}Id() {
|
||||||
return ${firstLowerTableName}Id == null ? "" : ${firstLowerTableName}Id;
|
return ${firstLowerTableName}Id == null ? "" : ${firstLowerTableName}Id.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set${firstUpperTableName}Id(String ${firstLowerTableName}Id) {
|
public void set${firstUpperTableName}Id(String ${firstLowerTableName}Id) {
|
||||||
@ -72,7 +72,7 @@ public class ${firstUpperTableName}DTO {
|
|||||||
|
|
||||||
<#elseif field.fieldType == "radio" || field.fieldType == "checkbox" || field.fieldType == "select">
|
<#elseif field.fieldType == "radio" || field.fieldType == "checkbox" || field.fieldType == "select">
|
||||||
public String get${field.firstUpperFieldName}() {
|
public String get${field.firstUpperFieldName}() {
|
||||||
return ${field.fieldName} == null ? "" : ${field.fieldName};
|
return ${field.fieldName} == null ? "" : ${field.fieldName}.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
||||||
@ -80,7 +80,7 @@ public class ${firstUpperTableName}DTO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String get${field.firstUpperFieldName}DictionaryName() {
|
public String get${field.firstUpperFieldName}DictionaryName() {
|
||||||
return ${field.fieldName}DictionaryName == null ? "" : ${field.fieldName}DictionaryName;
|
return ${field.fieldName}DictionaryName == null ? "" : ${field.fieldName}DictionaryName.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set${field.firstUpperFieldName}DictionaryName(String ${field.fieldName}DictionaryName) {
|
public void set${field.firstUpperFieldName}DictionaryName(String ${field.fieldName}DictionaryName) {
|
||||||
@ -88,7 +88,7 @@ public class ${firstUpperTableName}DTO {
|
|||||||
}
|
}
|
||||||
<#elseif field.fieldType == "innerJoin" || field.fieldType == "leftJoin" || field.fieldType == "rightJoin">
|
<#elseif field.fieldType == "innerJoin" || field.fieldType == "leftJoin" || field.fieldType == "rightJoin">
|
||||||
public String get${field.firstUpperFieldName}() {
|
public String get${field.firstUpperFieldName}() {
|
||||||
return ${field.fieldName} == null ? "" : ${field.fieldName};
|
return ${field.fieldName} == null ? "" : ${field.fieldName}.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
||||||
@ -98,7 +98,7 @@ public class ${firstUpperTableName}DTO {
|
|||||||
<#list field.listJoinTableField! as joinTableField>
|
<#list field.listJoinTableField! as joinTableField>
|
||||||
<#if joinTableField.listShow == 1>
|
<#if joinTableField.listShow == 1>
|
||||||
public String get${field.firstUpperJoinTable}${joinTableField.firstUpperFieldName}() {
|
public String get${field.firstUpperJoinTable}${joinTableField.firstUpperFieldName}() {
|
||||||
return ${field.joinTable}${joinTableField.firstUpperFieldName} == null ? "" : ${field.joinTable}${joinTableField.firstUpperFieldName};
|
return ${field.joinTable}${joinTableField.firstUpperFieldName} == null ? "" : ${field.joinTable}${joinTableField.firstUpperFieldName}.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set${field.firstUpperJoinTable}${joinTableField.firstUpperFieldName}(String ${field.joinTable}${joinTableField.firstUpperFieldName}) {
|
public void set${field.firstUpperJoinTable}${joinTableField.firstUpperFieldName}(String ${field.joinTable}${joinTableField.firstUpperFieldName}) {
|
||||||
@ -109,7 +109,7 @@ public class ${firstUpperTableName}DTO {
|
|||||||
</#list>
|
</#list>
|
||||||
<#else>
|
<#else>
|
||||||
public String get${field.firstUpperFieldName}() {
|
public String get${field.firstUpperFieldName}() {
|
||||||
return ${field.fieldName} == null ? "" : ${field.fieldName};
|
return ${field.fieldName} == null ? "" : ${field.fieldName}.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
||||||
|
@ -62,7 +62,7 @@ public class ${firstUpperTableName}VO {
|
|||||||
<#list fieldList! as field>
|
<#list fieldList! as field>
|
||||||
<#if field.fieldType == "join">
|
<#if field.fieldType == "join">
|
||||||
public String get${field.firstUpperFieldName}() {
|
public String get${field.firstUpperFieldName}() {
|
||||||
return ${field.fieldName} == null ? "" : ${field.fieldName};
|
return ${field.fieldName} == null ? "" : ${field.fieldName}.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
||||||
@ -89,7 +89,7 @@ public class ${firstUpperTableName}VO {
|
|||||||
|
|
||||||
<#elseif field.fieldType == "date" || field.fieldType == "datetime">
|
<#elseif field.fieldType == "date" || field.fieldType == "datetime">
|
||||||
public String get${field.firstUpperFieldName}() {
|
public String get${field.firstUpperFieldName}() {
|
||||||
return ${field.fieldName} == null ? "" : ${field.fieldName};
|
return ${field.fieldName} == null ? "" : ${field.fieldName}.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
||||||
@ -98,7 +98,7 @@ public class ${firstUpperTableName}VO {
|
|||||||
|
|
||||||
<#else>
|
<#else>
|
||||||
public String get${field.firstUpperFieldName}() {
|
public String get${field.firstUpperFieldName}() {
|
||||||
return ${field.fieldName} == null ? "" : ${field.fieldName};
|
return ${field.fieldName} == null ? "" : ${field.fieldName}.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user