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
| package com.mindskip.xzs.base;
|
| /**
| * @version 2.2.0
| * @description: 返回编码
| * Copyright (C), 2020-2021, 武汉思维跳跃科技有限公司
| * @date 2021 /9/7 9:45
| */
| public enum SystemCode {
| /**
| * OK
| */
| OK(1, "成功"),
| /**
| * AccessTokenError
| */
| AccessTokenError(400, "用户登录令牌失效"),
| /**
| * UNAUTHORIZED
| */
| UNAUTHORIZED(401, "用户未登录"),
| /**
| * UNAUTHORIZED
| */
| AuthError(402, "用户名或密码错误"),
| /**
| * InnerError
| */
| InnerError(500, "系统内部错误"),
| /**
| * ParameterValidError
| */
| ParameterValidError(501, "参数验证错误"),
|
| /**
| * AccessDenied
| */
| AccessDenied(502, "用户没有权限访问");
|
| /**
| * The Code.
| */
| int code;
| /**
| * The Message.
| */
| String message;
|
| SystemCode(int code, String message) {
| this.code = code;
| this.message = message;
| }
|
| /**
| * Gets code.
| *
| * @return the code
| */
| public int getCode() {
| return code;
| }
|
| /**
| * Gets message.
| *
| * @return the message
| */
| public String getMessage() {
| return message;
| }
| }
|
|