diff --git a/mybatis-flex-codegen/src/main/resources/templates/enjoy/entity.kotlin.tpl b/mybatis-flex-codegen/src/main/resources/templates/enjoy/entity.kotlin.tpl index 15fa5686..c617e1ab 100644 --- a/mybatis-flex-codegen/src/main/resources/templates/enjoy/entity.kotlin.tpl +++ b/mybatis-flex-codegen/src/main/resources/templates/enjoy/entity.kotlin.tpl @@ -30,13 +30,13 @@ import io.swagger.v3.oas.annotations.media.Schema open class #(entityClassName) #if(withActiveRecord) : Model<#(entityClassName)>()#else#(table.buildKtExtends(isBase))#end { #for(column : table.columns) #set(comment = javadocConfig.formatColumnComment(column.comment)) - #if(isNotBlank(comment)) + #if(hasText(comment)) /** * #(comment) */ #end #set(annotations = column.buildAnnotations()) - #if(isNotBlank(annotations)) + #if(hasText(annotations)) #(annotations) #end #if(withSwagger && swaggerVersion.getName() == "FOX") @@ -45,7 +45,7 @@ open class #(entityClassName) #if(withActiveRecord) : Model<#(entityClassName)>( #if(withSwagger && swaggerVersion.getName() == "DOC") @Schema(description = "#(column.comment)") #end - open var #(column.property): #(column.propertySimpleType)? = #if(isNotBlank(column.propertyDefaultValue)) = #(column.propertyDefaultValue)#else null#end + open var #(column.property): #(column.propertySimpleType)? = #if(hasText(column.propertyDefaultValue)) = #(column.propertyDefaultValue)#else null#end #end } diff --git a/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityOrBase.tpl b/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityOrBase.tpl index 30e327d2..63563079 100644 --- a/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityOrBase.tpl +++ b/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityOrBase.tpl @@ -77,13 +77,13 @@ public class #(entityClassName)#if(withActiveRecord) extends Model<#(entityClass #for(column : table.columns) #set(comment = javadocConfig.formatColumnComment(column.comment)) - #if(isNotBlank(comment)) + #if(hasText(comment)) /** * #(comment) */ #end #set(annotations = column.buildAnnotations()) - #if(isNotBlank(annotations)) + #if(hasText(annotations)) #(annotations) #end #if(withSwagger && swaggerVersion.getName() == "FOX") @@ -92,7 +92,7 @@ public class #(entityClassName)#if(withActiveRecord) extends Model<#(entityClass #if(withSwagger && swaggerVersion.getName() == "DOC") @Schema(description = "#(column.comment)") #end - private #(column.propertySimpleType) #(column.property)#if(isNotBlank(column.propertyDefaultValue)) = #(column.propertyDefaultValue)#end; + private #(column.propertySimpleType) #(column.property)#if(hasText(column.propertyDefaultValue)) = #(column.propertyDefaultValue)#end; #end #if(!withLombok) diff --git a/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityWithBase.kotlin.tpl b/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityWithBase.kotlin.tpl index da39d76e..572b64a4 100644 --- a/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityWithBase.kotlin.tpl +++ b/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityWithBase.kotlin.tpl @@ -32,4 +32,4 @@ import io.swagger.v3.oas.annotations.media.Schema @Schema(description = "#(table.getComment())") #end #if(!isBase)#(table.buildTableAnnotation())#end -class #(entityClassName) : #(baseClassName)() +open class #(entityClassName) : #(baseClassName)()