fix():返回状态
parent
82fedad946
commit
1d0b928bee
|
@ -2,6 +2,8 @@ package com.muyu.common.core.domain;
|
|||
|
||||
import com.muyu.common.core.constant.Constants;
|
||||
import com.muyu.common.core.constant.HttpStatus;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
@ -18,6 +20,7 @@ import java.io.Serializable;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Tag(name = "公共返回值",description = "系统公共返回值,统一返回格式内容")
|
||||
public class Result<T> implements Serializable {
|
||||
/**
|
||||
* 成功
|
||||
|
@ -33,10 +36,13 @@ public class Result<T> implements Serializable {
|
|||
public static final int WARN = HttpStatus.WARN;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Schema(description = "返回状态码200表示成功 其余表示异常 详细请查看每个接口")
|
||||
private int code;
|
||||
|
||||
@Schema(description = "返回状态码的描述")
|
||||
private String msg;
|
||||
|
||||
@Schema(description = "返回数据")
|
||||
private T data;
|
||||
|
||||
public static <T> Result<T> success () {
|
||||
|
|
Loading…
Reference in New Issue