!4 解决生成的Boolean值变量名,可能引起序列错误的问题

Merge pull request !4 from lyd123qw2008/master
This commit is contained in:
makejava 2019-11-01 16:38:46 +08:00 committed by Gitee
commit 1aae2a0e29
1 changed files with 6 additions and 1 deletions

View File

@ -3,7 +3,12 @@
##去掉表的t_前缀
$!tableInfo.setName($tool.getClassName($tableInfo.obj.name.replaceFirst("book_","")))
##参考阿里巴巴开发手册POJO 类中布尔类型的变量,都不要加 is 前缀,否则部分框架解析会引起序列化错误
#foreach($column in $tableInfo.fullColumn)
#if($column.name.startsWith("is") && $column.type.equals("java.lang.Boolean"))
$!column.setName($tool.firstLowerCase($column.name.substring(2)))
#end
#end
##实现动态排除列
#set($temp = $tool.newHashSet("testCreateTime", "otherColumn"))