diff --git a/fastmybatis-core/src/main/java/com/gitee/fastmybatis/core/ext/code/generator/ColumnDefinition.java b/fastmybatis-core/src/main/java/com/gitee/fastmybatis/core/ext/code/generator/ColumnDefinition.java index fb9690dfdb46d80e86cbb5f959f04ac720c3b4c4..83d2858440f22b5840c8717cb980b25c84bddfcc 100644 --- a/fastmybatis-core/src/main/java/com/gitee/fastmybatis/core/ext/code/generator/ColumnDefinition.java +++ b/fastmybatis-core/src/main/java/com/gitee/fastmybatis/core/ext/code/generator/ColumnDefinition.java @@ -7,7 +7,7 @@ import com.gitee.fastmybatis.core.handler.Identitys; /** * 表字段信息 - * + * * @author tanghc */ public class ColumnDefinition { @@ -28,7 +28,7 @@ public class ColumnDefinition { /** 是否自增 */ private boolean isIdentity; /** 是否auto策略 */ - private boolean isAuto; + private boolean isAuto = true; /** 是否uuid策略 */ private boolean isUuid; /** 是否sequence策略(oracle) */ @@ -53,7 +53,7 @@ public class ColumnDefinition { private String comment; private String typeHandler; private FillType fillType; - + private int orderIndex = 1; public boolean getIsCustomFillUpdate() { @@ -165,20 +165,20 @@ public class ColumnDefinition { */ private String getMybatisValue(FillType fillType, String prefix) { // 如果是乐观锁字段 - if (this.isVersion) { + if (this.isVersion) { return this.columnName + "+1"; } else { StringBuilder mybatisValue = new StringBuilder(); mybatisValue.append("#{" + prefix + this.getJavaFieldName()).append(this.getTypeHandlerValue(fillType)) .append("}"); - return mybatisValue.toString(); + return mybatisValue.toString(); } } /** * 是否是乐观锁字段 - * + * * @return true是 */ public boolean getIsVersion() { @@ -191,7 +191,7 @@ public class ColumnDefinition { /** * 是否是自增主键 - * + * * @return true,是 */ public boolean getIsIdentityPk() { @@ -208,7 +208,7 @@ public class ColumnDefinition { /** * 返回java字段名,并且第一个字母大写 - * + * * @return 返回java字段名,并且第一个字母大写 */ public String getJavaFieldNameUF() { @@ -217,7 +217,7 @@ public class ColumnDefinition { /** * 返回java字段 - * + * * @return 返回java字段 */ public String getJavaFieldName() { @@ -230,7 +230,7 @@ public class ColumnDefinition { /** * 获得装箱类型,Integer,Float - * + * * @return 获得装箱类型,Integer,Float */ public String getJavaTypeBox() {