ErrorCode.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // <author></author>
  2. // <date></date>
  3. // <description></description>
  4. namespace ERP.Framework.Exceptions
  5. {
  6. /// <summary>
  7. /// 错误编码 6位
  8. /// </summary>
  9. public class ErrorCode
  10. {
  11. /// <summary>
  12. /// 响应成功
  13. /// </summary>
  14. public const int SUCCESS = 200;
  15. /// <summary>
  16. /// 响应失败
  17. /// </summary>
  18. public const int ERROR = 500;
  19. #region Framework
  20. /// <summary>
  21. /// 无法获取当前请求IP
  22. /// </summary>
  23. public const int NO_IP = 000001;
  24. /// <summary>
  25. /// Token校验失败
  26. /// </summary>
  27. public const int TOKEN_VALIDATE = 000002;
  28. /// <summary>
  29. /// 长时间未操作
  30. /// </summary>
  31. public const int IDLE_TIME_OUT = 000003;
  32. /// <summary>
  33. /// 被踢下线
  34. /// </summary>
  35. public const int KICKED_OUT = 000004;
  36. /// <summary>
  37. /// 被顶下线
  38. /// </summary>
  39. public const int CONCURRENT_LOGIN = 000004;
  40. /// <summary>
  41. /// 无法获得当前用户
  42. /// </summary>
  43. public const int NO_USER = 000005;
  44. #endregion Framework
  45. #region Core
  46. /// <summary>
  47. /// 用户不存在
  48. /// </summary>
  49. public const int USER_NOT_EXIST = 100000;
  50. /// <summary>
  51. /// 用户禁用
  52. /// </summary>
  53. public const int USER_BLOCK = 100001;
  54. /// <summary>
  55. /// 密码重试超出次数限制
  56. /// </summary>
  57. public const int USER_PASSWORD_RETRYLIMITEXCEED = 100002;
  58. /// <summary>
  59. /// 密码输入错误
  60. /// </summary>
  61. public const int PASSWORD_ERROR = 100003;
  62. #endregion Core
  63. }
  64. }