mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
!498 fix:代码生成器异常
* fix:代码生成模板 isNotBlank替换为hasText. entityWithBase.kotlin.tpl 添加 open
This commit is contained in:
parent
cc86d94b7f
commit
8526fcd735
@ -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
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user