/healthy接口新增
This commit is contained in:
@@ -1,26 +1,58 @@
|
|||||||
package com.aida.gateway.common.response;
|
package com.aida.gateway.common.response;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName ResultEnum
|
* @ClassName ResultEnum
|
||||||
* @Description 响应状态码枚举
|
* @Description 响应结果枚举
|
||||||
* @Author dwjian
|
* @Author dwjian
|
||||||
* @Date 2019/9/8 21:48
|
* @Date 2019/9/8 21:58
|
||||||
*/
|
*/
|
||||||
@Data
|
public enum ResultEnum {
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum ResultEnum implements Serializable {
|
|
||||||
|
|
||||||
SUCCESS(0, "操作成功"),
|
SUCCESS(true, 0, "SUCCESS"),
|
||||||
FAIL(-1, "操作失败"),
|
FAIL(false, -1, "FAIL"),
|
||||||
ERROR(500, "系统异常");
|
ERROR(false, -1, "system error!"),
|
||||||
|
PARAMETER_ERROR(false, -2, "parameter error!"),
|
||||||
|
|
||||||
|
NO_LOGIN(false, -100, "User not logged in"),
|
||||||
|
NO_PERMISSION(false, -200, "No access"),
|
||||||
|
ACCOUNT_LOCK(false, -300, "Account frozen"),
|
||||||
|
|
||||||
|
PROMPT(false, 1, "Prompt"),
|
||||||
|
WARNING(false, 2, "Warning"),
|
||||||
|
|
||||||
|
;
|
||||||
private int code;
|
private int code;
|
||||||
private String msg;
|
private String msg;
|
||||||
|
private boolean isOK;
|
||||||
|
|
||||||
|
|
||||||
|
ResultEnum(boolean isOK, int code, String msg) {
|
||||||
|
this.isOK = isOK;
|
||||||
|
this.code = code;
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(int code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsg(String msg) {
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOK() {
|
||||||
|
return isOK;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOK(boolean OK) {
|
||||||
|
isOK = OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user