fix: 代码生成模板问题修复

This commit is contained in:
Ray.Hao
2024-04-24 18:14:00 +08:00
parent b790de2a76
commit 21ec9a55fe
13 changed files with 34 additions and 96 deletions

View File

@@ -1,11 +1,7 @@
package ${package.Parent}.model.dto;
#if(${springdoc})
import io.swagger.v3.oas.annotations.media.Schema;
#elseif(${swagger})
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
#end
#if(${entityLombokModel})
import lombok.Getter;
import lombok.Setter;
@@ -14,6 +10,7 @@ import lombok.Setter;
#end
#end
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* $!{table.comment} DTO
*
@@ -27,11 +24,7 @@ import java.io.Serializable;
@Accessors(chain = true)
#end
#end
#if(${springdoc})
@Schema(name = "${entity}", description = "$!{table.comment}")
#elseif(${swagger})
@ApiModel(value = "${entity}对象", description = "$!{table.comment}")
#end
@Schema( description = "$!{table.comment}传输层对象")
#if(${superEntityClass})
public class ${entity}DTO extends ${superEntityClass}#if(${activeRecord})<${entity}>#end {
#elseif(${activeRecord})
@@ -52,15 +45,7 @@ public class ${entity}DTO {
#set($keyPropertyName=${field.propertyName})
#end
#if("$!field.comment" != "")
#if(${springdoc})
@Schema(description = "${field.comment}")
#elseif(${swagger})
@ApiModelProperty("${field.comment}")
#else
/**
* ${field.comment}
*/
#end
#end
private ${field.propertyType} ${field.propertyName};