🐳 swagger api. add R discription
This commit is contained in:
1 parent
ec084d9f34
commit
9be33944cd
2 files changed
+11
No files matched your search
@@ -70,5 +70,10 @@
|
||||
<artifactId>transmittable-thread-local</artifactId>
|
||||
<version>${ttl.version}</version>
|
||||
</dependency>
|
||||
<!--swagger 依赖-->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -20,6 +20,8 @@
|
||||
package com.pig4cloud.pigx.common.core.util;
|
||||
|
||||
import com.pig4cloud.pigx.common.core.constant.CommonConstants;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -34,21 +36,25 @@ import java.io.Serializable;
|
||||
@Builder
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(description = "响应信息主体")
|
||||
@AllArgsConstructor
|
||||
public class R<T> implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ApiModelProperty(value = "返回标记:成功标记=0,失败标记=0")
|
||||
private int code = CommonConstants.SUCCESS;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ApiModelProperty(value = "返回信息")
|
||||
private String msg = "success";
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ApiModelProperty(value = "数据")
|
||||
private T data;
|
||||
|
||||
public R() {
|
||||
|
||||
Reference in new issue
Block a user