提交 | 用户 | 时间
|
1ac2bc
|
1 |
package cn.stylefeng.guns.base.auth.exception.enums; |
懒 |
2 |
|
|
3 |
import cn.stylefeng.roses.kernel.model.exception.AbstractBaseExceptionEnum; |
|
4 |
import lombok.Getter; |
|
5 |
|
|
6 |
/** |
|
7 |
* 认证失败的异常枚举 |
|
8 |
* |
|
9 |
* @author fengshuonan |
|
10 |
* @Date 2019/7/18 22:22 |
|
11 |
*/ |
|
12 |
@Getter |
|
13 |
public enum AuthExceptionEnum implements AbstractBaseExceptionEnum { |
|
14 |
|
|
15 |
NOT_LOGIN_ERROR(1401, "用户未登录"), |
|
16 |
|
|
17 |
USERNAME_PWD_ERROR(1402, "账号密码错误"), |
|
18 |
|
|
19 |
LOGIN_EXPPIRED(1403, "登录已过期,请重新登录"), |
|
20 |
|
|
21 |
ACCOUNT_FREEZE_ERROR(1404, "账号被冻结"), |
|
22 |
|
|
23 |
NO_ROLE_ERROR(1405, "用户没有分配角色,获取菜单失败"), |
|
24 |
|
|
25 |
VALID_CODE_ERROR(1406, "验证码错误"), |
|
26 |
|
|
27 |
//用在PermissonException |
|
28 |
NO_PERMISSION(1500, "登录已过期,请重新登录"), |
|
29 |
|
|
30 |
NO_PAGE_ERROR(1502, "请求接口不存在或用户未登录"), |
|
31 |
|
|
32 |
LOGIN_TIMEOUT(409, "登录超时,请重新登录!"); |
|
33 |
|
|
34 |
AuthExceptionEnum(int code, String message) { |
|
35 |
this.code = code; |
|
36 |
this.message = message; |
|
37 |
} |
|
38 |
|
|
39 |
private Integer code; |
|
40 |
|
|
41 |
private String message; |
|
42 |
|
|
43 |
} |