You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lvyuou/ResponeCode.java

29 lines
573 B

package com.gk.study.common;
/**
* @功能描述: 响应报文,统一封装类
*/
public enum ResponeCode {
SUCCESS(200, "成功"),
FAIL(400, "失败"),
UNAUTHORIZED(401, "未认证"),
NOT_FOUND(404, "接口不存在"),
INTERNAL_SERVER_ERROR(500, "服务器内部错误");
private int code;
private String msg;
private ResponeCode(int code, String msg) {
this.code = code;
this.msg = msg;
}
public int getCode() {
return this.code;
}
public String getMsg() {
return this.msg;
}
}