防止db字段名为一个字母导致出现生成异常
This commit is contained in:
parent
f754a18676
commit
a5dce6cccc
@ -43,7 +43,7 @@ public class ${ClassName} extends ${Entity}
|
|||||||
#end
|
#end
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if(!$table.isSuperColumn($column.javaField))
|
#if(!$table.isSuperColumn($column.javaField))
|
||||||
#if($column.javaField.substring(1,2).matches("[A-Z]"))
|
#if($column.javaField > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
|
||||||
#set($AttrName=$column.javaField)
|
#set($AttrName=$column.javaField)
|
||||||
#else
|
#else
|
||||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||||
@ -64,7 +64,7 @@ public class ${ClassName} extends ${Entity}
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if($column.javaField.substring(1,2).matches("[A-Z]"))
|
#if($column.javaField > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
|
||||||
#set($AttrName=$column.javaField)
|
#set($AttrName=$column.javaField)
|
||||||
#else
|
#else
|
||||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||||
|
Loading…
Reference in New Issue
Block a user