errors.go 6.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. // package error code define
  4. package errors
  5. import "gadm-ods/common.in/jsonrpc2"
  6. var (
  7. // 通用错误
  8. SystemError = jsonrpc2.NewJsonError(10001, "系统错误")
  9. ServiceError = jsonrpc2.NewJsonError(10002, "内部服务错误")
  10. NoAuthAccess = jsonrpc2.NewJsonError(10003, "无访问权限")
  11. IpNoAuthAccess = jsonrpc2.NewJsonError(10004, "IP无访问权限")
  12. CheckApiNotExist = jsonrpc2.NewJsonError(10005, "该API不存在")
  13. CheckMerchantNotExist = jsonrpc2.NewJsonError(10006, "AppKey错误")
  14. CheckApiInfoNotExist = jsonrpc2.NewJsonError(10007, "商户未购买该API")
  15. CheckSignFailed = jsonrpc2.NewJsonError(10008, "签名验证失败")
  16. CheckDecryptFailed = jsonrpc2.NewJsonError(10009, "解密参数失败")
  17. CheckApiNotEnable = jsonrpc2.NewJsonError(10010, "API未启用")
  18. CheckApiDayCountLimit = jsonrpc2.NewJsonError(10011, "API 达到当日上限")
  19. CheckApiDaysLimit = jsonrpc2.NewJsonError(10012, "API 已过有效期")
  20. CheckApiTotalCountLimit = jsonrpc2.NewJsonError(10013, "API 达到总次数上限")
  21. CheckApiParamConfParseFailed = jsonrpc2.NewJsonError(10014, "参数配置解析失败")
  22. CheckApiProviderConfParseFailed = jsonrpc2.NewJsonError(10015, "数据源配置解析失败")
  23. CheckParamShouldDecrypt = jsonrpc2.NewJsonError(10016, "参数不应加密")
  24. CheckParamShouldEncrypt = jsonrpc2.NewJsonError(10017, "参数应加密")
  25. ApiTimeOut = jsonrpc2.NewJsonError(10020, "接口响应超时")
  26. // 业务错误 -00 通用
  27. NoRecord = jsonrpc2.NewJsonError(20001, "查无记录")
  28. VendorError = jsonrpc2.NewJsonError(20002, "第三方发生错误")
  29. // 业务错误 --平台错误(无效)
  30. BadParaFormat = jsonrpc2.NewJsonError(20003, "请求参数格式不对")
  31. ArgsError = jsonrpc2.NewJsonError(20004, "参数错误")
  32. SenMqError = jsonrpc2.NewJsonError(10001, "发送消息失败")
  33. UpdateTaskError = jsonrpc2.NewJsonError(10002, "更新任务状态失败")
  34. // 业务错误 --平台错误(有效)
  35. DataBaseError = jsonrpc2.NewJsonError(20005, "数据库操作失败")
  36. ProviderApiNotFound = jsonrpc2.NewJsonError(20006, "未找到数据源")
  37. ProviderUnavailable = jsonrpc2.NewJsonError(20007, "数据源不可用")
  38. VinPlateError = jsonrpc2.NewJsonError(20008, "车架号和车牌号码不匹配")
  39. OrderNotExist = jsonrpc2.NewJsonError(20009, "订单不存在")
  40. OrderCreateFailed = jsonrpc2.NewJsonError(20010, "订单创建失败")
  41. OrderExistError = jsonrpc2.NewJsonError(20011, "不能重复创建订单")
  42. OrderStateCanNotBeChange = jsonrpc2.NewJsonError(20012, "该订单状态不能被修改")
  43. OrderStatusNotSupported = jsonrpc2.NewJsonError(20013, "不支持的订单状态")
  44. NotSupportArea = jsonrpc2.NewJsonError(20014, "该地区不支持查询")
  45. DriverLicenseAndNameNotMatch = jsonrpc2.NewJsonError(20015, "驾驶证和驾驶人不匹配")
  46. OrderParseTimeFailed = jsonrpc2.NewJsonError(20016, "时间格式解析错误,正确时间格式为 2006-01-02 15:04:05")
  47. OrderWrongTime = jsonrpc2.NewJsonError(20017, "不能预约该时段,预约时间为未来7天 9:00至18:00,节假日和周日不办理")
  48. ServiceNotSupport = jsonrpc2.NewJsonError(20018, "不支持的服务类型")
  49. VehicleNotBeUncheckInspectionTypeFailed = jsonrpc2.NewJsonError(20019, "无法免检年审,车辆性质或类型不匹配")
  50. VehicleNotBeUncheckInspectionSeatFailed = jsonrpc2.NewJsonError(20020, "无法免检年审,车座数不能大于7")
  51. RegDateParseFailed = jsonrpc2.NewJsonError(20021, "初登日期解析失败")
  52. VehicleNotBeUncheckInspectionRegDateFailed = jsonrpc2.NewJsonError(20022, "无法免检年审,初登日期不能在2010年9月1日之前")
  53. CityIdNotExist = jsonrpc2.NewJsonError(20023, "未找到城市ID")
  54. OrderNoGernerateFailed = jsonrpc2.NewJsonError(20024, "订单号生产失败")
  55. TimeCalcFailed = jsonrpc2.NewJsonError(20025, "时间计算错误")
  56. VehicleNoPlateNo = jsonrpc2.NewJsonError(20026, "暂未上牌")
  57. DataError = jsonrpc2.NewJsonError(20027, "数据异常")
  58. AnnualInspectionUnsupportVehicle = jsonrpc2.NewJsonError(20028, "该车辆种类不支持年检时间查询")
  59. TemporarilyDissupport = jsonrpc2.NewJsonError(20029, "暂不支持查询")
  60. NoRecordMustSelect = jsonrpc2.NewJsonError(20030, "查无记录,必选项为空")
  61. NoRecordProviderLimit = jsonrpc2.NewJsonError(20031, "查无记录,数据源达到上限")
  62. NoRecordProviderError = jsonrpc2.NewJsonError(20032, "查无记录,数据源最后一步异常")
  63. NoRecordDataError = jsonrpc2.NewJsonError(20033, "查无记录,数据异常")
  64. // 业务错误-02 vehicle
  65. NoAuthQuery = jsonrpc2.NewJsonError(20201, "无权查询非川牌车辆")
  66. PlateNoError = jsonrpc2.NewJsonError(20202, "号牌号码错误")
  67. ProvinceError = jsonrpc2.NewJsonError(20203, "省份错误")
  68. PlateTypeNotExist = jsonrpc2.NewJsonError(20204, "不存在的号牌种类")
  69. PlateOrVehicleTypeError = jsonrpc2.NewJsonError(20205, "车牌号码与车牌种类不匹配")
  70. QueryError = jsonrpc2.NewJsonError(20344, "查询错误")
  71. VehicleInfoQuery = jsonrpc2.NewJsonError(20206, "车辆数据查询中,请稍后获取结果")
  72. MoreStyle = jsonrpc2.NewJsonError(20207, "无法唯一定型")
  73. )