1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
public enum ResultCodeEnum {
SUCCESS(200, "成功"), FAIL(1000, "失败"), FAILED(400, "请求失败"), NOT_FOUND(404, "未找到"), SERVER_ERROR(500, " 服务器内部出错 "),
PARAM_IS_INVALID(1001, "参数无效"), PARAM_IS_BLANK(1002, "参为空"), PARAM_TYPE_ERROR(1003, "参数类型错误"), PARAM_NOT_COMPLETE(1004, "参数缺失"),
USER_NOT_LOGIN_IN(2001, "用户未登录"), USER_LOGIN_ERROR(2002, "账号不存在或者密码错误"), USER_ACCOUNT_FORBIDDEN(2003, "账户被禁用"), USER_NOT_EXISTS(2004, "用户不存在"), USER_HAS_EXISTED(2005, "用户已存在");
private Integer code; private String message; private ResultCodeEnum(Integer code, String message) { this.code = code; this.message = message; } public Integer getCode() { return code; } public String getMessage() { return message; } }
|