ErrorCode.cs 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. using Furion.FriendlyException;
  2. namespace YBEE.EQM.Core;
  3. /// <summary>
  4. /// 系统错误码
  5. /// </summary>
  6. [ErrorCodeType]
  7. public enum ErrorCode
  8. {
  9. /// <summary>
  10. /// 用户名或密码不正确
  11. /// </summary>
  12. [ErrorCodeItemMetadata("用户名或密码不正确")]
  13. E1001,
  14. /// <summary>
  15. /// 获取账户信息失败,请重新登录
  16. /// </summary>
  17. [ErrorCodeItemMetadata("获取账户信息失败,请重新登录")]
  18. E1002,
  19. /// <summary>
  20. /// 账号已冻结
  21. /// </summary>
  22. [ErrorCodeItemMetadata("账户已冻结")]
  23. E1003,
  24. /// <summary>
  25. /// 无权限
  26. /// </summary>
  27. [ErrorCodeItemMetadata("无权限")]
  28. E1004,
  29. /// <summary>
  30. /// 旧密码验证失败
  31. /// </summary>
  32. [ErrorCodeItemMetadata("旧密码验证失败")]
  33. E1005,
  34. /// <summary>
  35. /// 密码长度应为在6至32位之间
  36. /// </summary>
  37. [ErrorCodeItemMetadata("密码长度应为在6至32位之间")]
  38. E1006,
  39. /// <summary>
  40. /// 未初始化
  41. /// </summary>
  42. [ErrorCodeItemMetadata("{0}未初始化", "")]
  43. E1007,
  44. /// <summary>
  45. /// 账户未激活
  46. /// </summary>
  47. [ErrorCodeItemMetadata("账户未激活")]
  48. E1008,
  49. /// <summary>
  50. /// 新密码不能与初始密码相同
  51. /// </summary>
  52. [ErrorCodeItemMetadata("新密码不能与初始密码相同")]
  53. E1009,
  54. /// <summary>
  55. /// 文件必须为.xls或.xlsx格式
  56. /// </summary>
  57. [ErrorCodeItemMetadata("文件必须为.xls或.xlsx格式")]
  58. E1010,
  59. /// <summary>
  60. /// 文件不存在
  61. /// </summary>
  62. [ErrorCodeItemMetadata("文件不存在")]
  63. E1011,
  64. /// <summary>
  65. /// 缺少佐证材料
  66. /// </summary>
  67. [ErrorCodeItemMetadata("{0}缺少佐证材料")]
  68. E1012,
  69. /// <summary>
  70. /// {0}不存在 默认参数:0-"记录"
  71. /// </summary>
  72. [ErrorCodeItemMetadata("{0}不存在", "记录")]
  73. E2001,
  74. /// <summary>
  75. /// {0}已存在 默认参数:0-"记录"
  76. /// </summary>
  77. [ErrorCodeItemMetadata("{0}已存在", "记录")]
  78. E2002,
  79. /// <summary>
  80. /// {0}已存相同{1} 默认参数:0-"",1-"名称"
  81. /// </summary>
  82. [ErrorCodeItemMetadata("{0}中已存相同{1}", "", "名称")]
  83. E2003,
  84. /// <summary>
  85. /// 已存相同{0}{1} 默认参数:0-"名称",1-""
  86. /// </summary>
  87. [ErrorCodeItemMetadata("已存相同{0}{1}", "名称", "")]
  88. E2004,
  89. /// <summary>
  90. /// 已存相同名称或代码
  91. /// </summary>
  92. [ErrorCodeItemMetadata("已存相同名称或代码")]
  93. E2005,
  94. /// <summary>
  95. /// 当前状态不能操作
  96. /// </summary>
  97. [ErrorCodeItemMetadata("{0}当前状态不能操作", "")]
  98. E2006,
  99. /// <summary>
  100. /// {0}未设置 默认参数:0-""
  101. /// </summary>
  102. [ErrorCodeItemMetadata("{0}未设置", "")]
  103. E2007,
  104. /// <summary>
  105. /// 已截止,不能上报
  106. /// </summary>
  107. [ErrorCodeItemMetadata("已截止,不能上报")]
  108. E2008,
  109. /// <summary>
  110. /// 非法操作!禁止删除{0} 默认参数:0-""
  111. /// </summary>
  112. [ErrorCodeItemMetadata("非法操作,禁止删除{0}", "")]
  113. E3001,
  114. /// <summary>
  115. /// 菜单已存在
  116. /// </summary>
  117. [ErrorCodeItemMetadata("菜单已存在")]
  118. E8101,
  119. /// <summary>
  120. /// 路由地址为空
  121. /// </summary>
  122. [ErrorCodeItemMetadata("路由地址为空")]
  123. E8102,
  124. /// <summary>
  125. /// 打开方式为空
  126. /// </summary>
  127. [ErrorCodeItemMetadata("打开方式为空")]
  128. E8103,
  129. /// <summary>
  130. /// 权限标识格式为空
  131. /// </summary>
  132. [ErrorCodeItemMetadata("权限标识格式为空")]
  133. E8104,
  134. /// <summary>
  135. /// 权限标识格式错误
  136. /// </summary>
  137. [ErrorCodeItemMetadata("权限标识格式错误")]
  138. E8105,
  139. /// <summary>
  140. /// 权限不存在
  141. /// </summary>
  142. [ErrorCodeItemMetadata("权限不存在")]
  143. E8106,
  144. /// <summary>
  145. /// 父级菜单不能为当前节点,请重新选择父级菜单
  146. /// </summary>
  147. [ErrorCodeItemMetadata("父级菜单不能为当前节点,请重新选择父级菜单")]
  148. E8107,
  149. /// <summary>
  150. /// 禁止删除固定角色
  151. /// </summary>
  152. [ErrorCodeItemMetadata("禁止删除固定角色")]
  153. E8201,
  154. /// <summary>
  155. /// 禁止修改固定角色
  156. /// </summary>
  157. [ErrorCodeItemMetadata("禁止修改固定角色")]
  158. E8202,
  159. /// <summary>
  160. /// 该类型不是枚举类型
  161. /// </summary>
  162. [ErrorCodeItemMetadata("该类型不是枚举类型")]
  163. E9001,
  164. }