puzhibing
2023-02-15 2811bab657aab4145b65a45a824fb63e93b58e30
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
package com.stylefeng.guns.rest.common.exception;
 
import com.stylefeng.guns.core.exception.ServiceExceptionEnum;
 
/**
 * 所有业务异常的枚举
 *
 * @author fengshuonan
 * @date 2016年11月12日 下午5:04:51
 */
public enum BizExceptionEnum implements ServiceExceptionEnum {
 
    /**
     * token异常
     */
    TOKEN_EXPIRED(700, "token过期"),
    TOKEN_ERROR(700, "token验证失败"),
 
    /**
     * 签名异常
     */
    SIGN_ERROR(700, "签名验证失败"),
 
    /**
     * 其他
     */
    AUTH_REQUEST_ERROR(400, "账号密码错误");
 
    BizExceptionEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
 
    private Integer code;
 
    private String message;
 
    @Override
    public Integer getCode() {
        return code;
    }
 
    public void setCode(Integer code) {
        this.code = code;
    }
 
    @Override
    public String getMessage() {
        return message;
    }
 
    public void setMessage(String message) {
        this.message = message;
    }
}