!498 fix:代码生成器异常

* fix:代码生成模板 isNotBlank替换为hasText. entityWithBase.kotlin.tpl 添加 open
This commit is contained in:
落羽er 2024-10-31 22:45:45 +00:00 committed by Michael Yang
parent cc86d94b7f
commit 8526fcd735
3 changed files with 7 additions and 7 deletions

View File

@ -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
}

View File

@ -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)

View File

@ -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)()