提交 0a36190c 编写于 作者: zhouweidong's avatar zhouweidong

补充swagger注解,用于实体及属性逻辑名称

上级 93690ea5
......@@ -28,6 +28,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import ${pub.getPKGCodeName()}.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
<#comment>SQL存储-Mybatis</#comment>
<#if de.getStorageMode()==1>
......@@ -46,6 +48,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "${item.getTableName()}", resultMap = "${item.codeName}ResultMap")
@ApiModel("${item.getLogicName()}")
public class ${item.getCodeName()} extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -175,6 +178,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
@JSONField(name = "${jsonfield}")
</#if>
@JsonProperty("${jsonfield}")
@ApiModelProperty("${defield.getLogicName()}")
private ${srfr7javatype(defield.getStdDataType())} ${prvateCodeName};
</#if>
</#list>
......@@ -413,6 +417,7 @@ import ${pub.getPKGCodeName()}.util.domain.EntityMongo;
*/
@Data
@Document(collection = "${item.getCodeName()?lower_case}")
@ApiModel("${item.getLogicName()}")
public class ${item.getCodeName()} extends EntityMongo implements Serializable {
<#if de.getPSDEFields()??>
......@@ -484,6 +489,7 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
<#if defield.isKeyDEField()==false>
@Field(name = "${columnname}")
</#if>
@ApiModelProperty("${defield.getLogicName()}")
private ${srfr7javatype(defield.getStdDataType())} ${prvateCodeName};
</#if>
......@@ -583,6 +589,7 @@ import ${pub.getPKGCodeName()}.util.domain.EntityClient;
* ServiceApi [${item.getLogicName()}] 对象
*/
@Data
@ApiModel("${item.getLogicName()}")
public class ${item.getCodeName()} extends EntityClient implements Serializable {
<#if de.getPSDEFields()??>
......@@ -649,6 +656,7 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
@JSONField(name = "${jsonfield}")
</#if>
@JsonProperty("${jsonfield}")
@ApiModelProperty("${defield.getLogicName()}")
private ${srfr7javatype(defield.getStdDataType())} ${prvateCodeName};
</#if>
......@@ -791,6 +799,7 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("${item.getLogicName()}")
public class ${item.getCodeName()} extends EntityBase implements Serializable {
<#if de.getPSDEFields()??>
......@@ -857,6 +866,7 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
@JSONField(name = "${jsonfield}")
</#if>
@JsonProperty("${jsonfield}")
@ApiModelProperty("${defield.getLogicName()}")
private ${srfr7javatype(defield.getStdDataType())} ${prvateCodeName};
</#if>
......
......@@ -48,12 +48,15 @@ import lombok.Data;
<#if hasValueRuleGroup>
import ${pub.getPKGCodeName()}.util.annotation.ValueRuleCheck;
</#if>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 服务DTO对象[${item.getCodeName()}DTO]
*/
@Data
<@valueRuleGroup/>
@ApiModel("${item.getLogicName()}")
public class ${item.getCodeName()}DTO extends ${dtoBase} implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -90,6 +93,7 @@ public class ${item.getCodeName()}DTO extends ${dtoBase} implements Serializable
@JsonSerialize(using = ToStringSerializer.class)
</#if>
<@valueRule defield />
@ApiModelProperty("${apifield.getLogicName()}")
private ${srfr7javatype(apifield.getStdDataType())} ${prvateCodeName};
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册