errors.go 5.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Copyright 2019 getensh.cc. All rights reserved.
  2. // Use of this source code is governed by getensh.cc.
  3. // package error code define
  4. package errors
  5. import "adm-ads/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. // 业务错误 --平台错误(有效)
  33. DataBaseError = jsonrpc2.NewJsonError(20005, "数据库操作失败")
  34. ProviderApiNotFound = jsonrpc2.NewJsonError(20006, "未找到数据源")
  35. ProviderUnavailable = jsonrpc2.NewJsonError(20007, "数据源不可用")
  36. VinPlateError = jsonrpc2.NewJsonError(20008, "车架号和车牌号码不匹配")
  37. OrderNotExist = jsonrpc2.NewJsonError(20009, "订单不存在")
  38. OrderCreateFailed = jsonrpc2.NewJsonError(20010, "订单创建失败")
  39. OrderExistError = jsonrpc2.NewJsonError(20011, "不能重复创建订单")
  40. OrderStateCanNotBeChange = jsonrpc2.NewJsonError(20012, "该订单状态不能被修改")
  41. OrderStatusNotSupported = jsonrpc2.NewJsonError(20013, "不支持的订单状态")
  42. NotSupportArea = jsonrpc2.NewJsonError(20014, "该地区不支持查询")
  43. DriverLicenseAndNameNotMatch = jsonrpc2.NewJsonError(20015, "驾驶证和驾驶人不匹配")
  44. OrderParseTimeFailed = jsonrpc2.NewJsonError(20016, "时间格式解析错误,正确时间格式为 2006-01-02 15:04:05")
  45. OrderWrongTime = jsonrpc2.NewJsonError(20017, "不能预约该时段,预约时间为未来7天 9:00至18:00,节假日和周日不办理")
  46. ServiceNotSupport = jsonrpc2.NewJsonError(20018, "不支持的服务类型")
  47. VehicleNotBeUncheckInspectionTypeFailed = jsonrpc2.NewJsonError(20019, "无法免检年审,车辆性质或类型不匹配")
  48. VehicleNotBeUncheckInspectionSeatFailed = jsonrpc2.NewJsonError(20020, "无法免检年审,车座数不能大于7")
  49. RegDateParseFailed = jsonrpc2.NewJsonError(20021, "初登日期解析失败")
  50. VehicleNotBeUncheckInspectionRegDateFailed = jsonrpc2.NewJsonError(20022, "无法免检年审,初登日期不能在2010年9月1日之前")
  51. CityIdNotExist = jsonrpc2.NewJsonError(20023, "未找到城市ID")
  52. OrderNoGernerateFailed = jsonrpc2.NewJsonError(20024, "订单号生产失败")
  53. TimeCalcFailed = jsonrpc2.NewJsonError(20025, "时间计算错误")
  54. VehicleNoPlateNo = jsonrpc2.NewJsonError(20026, "暂未上牌")
  55. DataError = jsonrpc2.NewJsonError(20027, "数据异常")
  56. AnnualInspectionUnsupportVehicle = jsonrpc2.NewJsonError(20028, "该车辆种类不支持年检时间查询")
  57. TemporarilyDissupport = jsonrpc2.NewJsonError(20029, "暂不支持查询")
  58. NoRecordMustSelect = jsonrpc2.NewJsonError(20030, "查无记录,必选项为空")
  59. NoRecordProviderLimit = jsonrpc2.NewJsonError(20031, "查无记录,数据源达到上限")
  60. NoRecordProviderError = jsonrpc2.NewJsonError(20032, "查无记录,数据源最后一步异常")
  61. NoRecordDataError = jsonrpc2.NewJsonError(20033, "查无记录,数据异常")
  62. // 业务错误-02 vehicle
  63. NoAuthQuery = jsonrpc2.NewJsonError(20201, "无权查询非川牌车辆")
  64. PlateNoError = jsonrpc2.NewJsonError(20202, "号牌号码错误")
  65. ProvinceError = jsonrpc2.NewJsonError(20203, "省份错误")
  66. PlateTypeNotExist = jsonrpc2.NewJsonError(20204, "不存在的号牌种类")
  67. PlateOrVehicleTypeError = jsonrpc2.NewJsonError(20205, "车牌号码与车牌种类不匹配")
  68. QueryError = jsonrpc2.NewJsonError(20344, "查询错误")
  69. VehicleInfoQuery = jsonrpc2.NewJsonError(20206, "车辆数据查询中,请稍后获取结果")
  70. MoreStyle = jsonrpc2.NewJsonError(20207, "无法唯一定型")
  71. )