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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
| package com.xkcoding.scaffold.common.status;
import com.xkcoding.scaffold.common.BaseEnum; import lombok.Getter;
@Getter public enum Status implements BaseEnum {
SUCCESS(200, "成功"),
BAD_REQUEST(400, "请求错误"),
UNAUTHORIZED(401, "尚未登录"),
FORBIDDEN(403, "权限不够"),
REQUEST_NOT_FOUND(404, "请求不存在"),
INTERNAL_SERVER_ERROR(500, "服务器内部错误"),
USERNAME_OR_PASSWORD_ERROR(50000, "用户名或密码错误"),
USER_NOT_EXIST(50001, "账号不存在"),
USER_DISABLE(50002, "账号已被禁用"),
USER_DELETED(50003, "账号已删除"),
VERIFY_CODE_ERROR(50004, "验证码错误"),
LOGIN_SUCCESS(50005, "登录成功"),
LOGOUT_SUCCESS(50006, "退出成功"),
CODE_ERROR(50007, "验证码异常"),
CODE_GET_ERROR(50008, "获取验证码的值失败"),
CODE_VALUE_NOT_NULL(50009, "验证码的值不能为空"),
CODE_NOT_FOUND(50010, "验证码不存在"),
CODE_IS_EXPIRED(50011, "验证码已过期"),
CODE_NOT_MATCH(50012, "验证码不匹配"),
CODE_SEND_ERROR(50012, "验证码发送异常");
private Integer code; private String msg;
Status(Integer code, String msg) { this.code = code; this.msg = msg; } }
|