ServerCode.java 682 B

12345678910111213141516171819202122232425262728293031323334
  1. package com.fdkankan.utils.constant;
  2. public enum ServerCode {
  3. SUCCESS(0, "操作成功"),
  4. SYSTEM_ERROR(-1, "服务器异常"),
  5. PARAM_ERROR(-2, "解析请求参数出错"),
  6. PARAM_REQUIRED(-3, "缺少必要参数"),
  7. AUTH_FAIL(3000, "鉴权失败!"),
  8. NON_TOKEN(3001, "无token,请重新登录"),
  9. TOKEN_ILLEGAL(3002, "token不合法"),
  10. TOKEN_NOT_FOUND(3003, "用户未登录"),
  11. APP_ID_ILLEGAL(3100 , "非法的APP ID")
  12. ;
  13. private Integer code;
  14. private String message;
  15. private ServerCode(Integer code, String message) {
  16. this.code = code;
  17. this.message = message;
  18. }
  19. public Integer code() {
  20. return code;
  21. }
  22. public String message() {
  23. return message;
  24. }
  25. }