package com.fdkankan.utils.constant; public enum ServerCode { SUCCESS(0, "操作成功"), SYSTEM_ERROR(-1, "服务器异常"), PARAM_ERROR(-2, "解析请求参数出错"), PARAM_REQUIRED(-3, "缺少必要参数"), AUTH_FAIL(3000, "鉴权失败!"), NON_TOKEN(3001, "无token,请重新登录"), TOKEN_ILLEGAL(3002, "token不合法"), TOKEN_NOT_FOUND(3003, "用户未登录"), APP_ID_ILLEGAL(3100 , "非法的APP ID") ; private Integer code; private String message; private ServerCode(Integer code, String message) { this.code = code; this.message = message; } public Integer code() { return code; } public String message() { return message; } }