13 changed files with 59 additions and 90 deletions
@ -1,51 +0,0 @@ |
|||||
package com.epmet.common.token.enums; |
|
||||
|
|
||||
|
|
||||
import com.epmet.common.token.error.IErrorCode; |
|
||||
|
|
||||
/** |
|
||||
* client token错误码 |
|
||||
* |
|
||||
* @author rongchao |
|
||||
* @Date 18-11-24 |
|
||||
*/ |
|
||||
public enum ErrorCode implements IErrorCode { |
|
||||
|
|
||||
SUCCESS(0, "请求成功"), |
|
||||
|
|
||||
ERR10001(10001, "token解析失败"), |
|
||||
ERR10002(10002, "token失效"), |
|
||||
ERR10003(10003, "token生成失败,请重试。"), |
|
||||
ERR10004(10004, "返回的Object类型不是EsuaResponse,无法添加token!"), |
|
||||
ERR10005(10005, "token不能为空"), |
|
||||
ERR10006(10006, "登录超时,请重新登录"), |
|
||||
ERR10007(10007, "当前帐号已在别处登录"), |
|
||||
|
|
||||
ERR500(500, "Internal Server Error"), |
|
||||
ERR501(501, "参数绑定异常"), |
|
||||
ERR401(401, "未授权"), |
|
||||
|
|
||||
|
|
||||
ERR(ErrorCode.COMMON_ERR_CODE, "其他异常"); |
|
||||
|
|
||||
private int code; |
|
||||
|
|
||||
private String msg; |
|
||||
|
|
||||
ErrorCode(final int code, final String msg) { |
|
||||
this.code = code; |
|
||||
this.msg = msg; |
|
||||
} |
|
||||
|
|
||||
public static final int COMMON_ERR_CODE = -1; |
|
||||
|
|
||||
@Override |
|
||||
public int getCode() { |
|
||||
return code; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public String getMsg() { |
|
||||
return msg; |
|
||||
} |
|
||||
} |
|
@ -1,11 +0,0 @@ |
|||||
package com.epmet.common.token.error; |
|
||||
|
|
||||
/** |
|
||||
* @author rongchao |
|
||||
* @Date 18-11-20 |
|
||||
*/ |
|
||||
public interface IErrorCode { |
|
||||
int getCode(); |
|
||||
|
|
||||
String getMsg(); |
|
||||
} |
|
Loading…
Reference in new issue