ResultCode.java 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package com.fdkankan.ucenter.common.constants;
  2. import com.fdkankan.common.constant.CameraConstant;
  3. public enum ResultCode {
  4. UPLOAD_ERROR2(500001, "上传失败。文件格式不对"),
  5. UPLOAD_ERROR(500002, "上传失败。"),
  6. UPLOAD_ERROR3(500003, "文件不存在!"),
  7. CAMERA_NOT_EXIT(500004, "相机不存在或未绑定"),
  8. DIS_COO_ERROR(500005, "解除失败,相机没协作用户"),
  9. NOT_PER(500006, "权限不足"),
  10. COO_ERROR(500007, "协作失败,请先解除协作"),
  11. COO_LIMIT_ERROR(500007, "协作失败,协作数量超过限制"),
  12. COO_LIMIT_ERROR2(500008, "协作失败,重复协作"),
  13. USER_NOT_LOGIN(3004, "用户未登录"),
  14. PARAM_MISS(3001, "参数缺失"),
  15. SIGN_ERROR(99991, "签名错误"),
  16. ;
  17. private Integer code;
  18. private String message;
  19. private ResultCode(Integer code, String message) {
  20. this.code = code;
  21. this.message = message;
  22. }
  23. public Integer code() {
  24. return this.code;
  25. }
  26. public String message() {
  27. return this.message;
  28. }
  29. public String formatMessage(Object... args) {
  30. return String.format(this.message, args);
  31. }
  32. }