From 8526fcd7352c94697ec017299dcbc6af6c588843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=BD=E7=BE=BDer?= Date: Thu, 31 Oct 2024 22:45:45 +0000 Subject: [PATCH] =?UTF-8?q?!498=20fix:=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=99=A8=E5=BC=82=E5=B8=B8=20*=20fix:=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=A8=A1=E6=9D=BF=20isNotBlank=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E4=B8=BAhasText.=20entityWithBase.kotlin.tpl=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20open?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/templates/enjoy/entity.kotlin.tpl | 6 +++--- .../src/main/resources/templates/enjoy/entityOrBase.tpl | 6 +++--- .../resources/templates/enjoy/entityWithBase.kotlin.tpl | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) 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)()