代码生成初始化字段属性增加布尔类型

This commit is contained in:
SG
2022-01-07 15:37:23 +08:00
parent eb11337f7d
commit 0f9c32bdc6
2 changed files with 8 additions and 0 deletions

View File

@ -65,6 +65,11 @@ public class GenUtils
{
column.setJavaType(GenConstants.TYPE_BIGDECIMAL);
}
// 如果是布尔形
else if (str != null && StringUtils.equals("tinyint", dataType) && str.length == 1 && Integer.parseInt(str[0]) == 1)
{
column.setJavaType(GenConstants.TYPE_BOOLEAN);
}
// 如果是整形
else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10)
{