user_merchant_api_check.go 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. package apis
  2. type ManagementCheckApiReq struct {
  3. Header map[string]string `json:"header" description:"header 非加密"`
  4. Method string `json:"method" description:"请求方法 POST PUT ..."`
  5. Router string `json:"router"`
  6. RequestParam []byte `json:"request_param" description:"query参数"`
  7. }
  8. type CheckMerchantApiResult struct {
  9. MerchantId int64 `json:"merchant_id" description:"商户id"`
  10. MerchantChildApiId int64 `json:"merchant_child_api_id" description:"商户基础api id"`
  11. BaseApiId int64 `json:"base_api_id" description:"基础api id"`
  12. ComboType int `json:"combo_type" description:"套餐类型 1 总次数, 2 按天"`
  13. CountType int `json:"count_type" description:"计数类型,即查 即得"`
  14. CountCode string `json:"count_code" description:"如果即查,返回码为该字段中的一种时需扣次数"`
  15. IsForceUpdate bool `json:"is_force_update" description:"是否强更"`
  16. RequstParamConf []ManagementBaseApiParam `json:"request_param_conf" description:"请求参数"`
  17. ResponseParamConf []ManagementBaseApiParam `json:"response_param_conf" description:"响应参数"`
  18. DecryptParam []byte `json:"descrypt_query_param" description:"解密后的参数"`
  19. AppSecret string `json:"app_secret"`
  20. IsCrypto bool `json:"is_encrypt"`
  21. AccessCountId int64 `json:"access_count_id"`
  22. }
  23. type ManagementCheckCountCodeReq struct {
  24. AccessCountId int64 `json:"access_count_id"`
  25. CountCode string `json:"count_code"`
  26. Code string `json:"code"`
  27. CountType int `json:"count_type" description:"0 即查 1查得"`
  28. }
  29. type ManagementCheckCountCodeReply struct {
  30. }
  31. type ManagementCheckApiReply struct {
  32. MerchantApiInfo CheckMerchantApiResult `json:"api_info" description:"校验成功后商户api相关信息"`
  33. ErrCode int `json:"err_code"`
  34. ErrMsg string `json:"err_msg"`
  35. }
  36. type MerchantProviderLimitInfo struct {
  37. ProviderApiId int64 `json:"provider_api_id"`
  38. ProviderId int64 `json:"provider_id"`
  39. Enable bool `json:"enable" description:"商户数据源是否启用"`
  40. State bool `json:"state" description:"数据源是否启用"`
  41. DayCount int64 `json:"day_count" description:"每天限制访问次数"`
  42. ProviderApiCode string `json:"provider_api_code" description:"三方api 代码"`
  43. ThirdpartHost string `json:"thirdpart_host" description:"三方api域名"`
  44. ThirdpartApiName string `json:"thirdpart_api_name" description:"三方api名"`
  45. ThirdpartApiRouter string `json:"thirdpart_api_router" description:"三方api路由"`
  46. ThirdpartApiMethod string `json:"thirdpart_api_method" description:"三方api方法"`
  47. Count int64 `json:"count" description:"当天访问次数"`
  48. }
  49. type ManagementCheckProviderApiReq struct {
  50. MerchantChildApiId int64 `json:"merchant_child_api_id"`
  51. BaseApiId int64 `json:"base_api_id"`
  52. }
  53. type ManagementCheckProviderApiReply struct {
  54. MerchantProviderLimitInfoList []MerchantProviderLimitInfo `json:"merchant_provider_limit_info"`
  55. }
  56. type ManagementThirdpartCount struct {
  57. Id int64 `json:"id"`
  58. FailCount int64 `json:"fail_count"`
  59. Count int64 `json:"count"`
  60. MerchantChildApiId int64 `json:"merchant_child_api_id"`
  61. ProviderApiId int64 `json:"provider_api_id"`
  62. CreateTime string `json:"create_time"`
  63. }
  64. func (o *ManagementThirdpartCount) TableName() string {
  65. return "t_gd_thirdpart_access_count"
  66. }
  67. type ManagementThirdpartCountIncreaseReq struct {
  68. State bool `json:"state" description:"访问三方状态,false失败,true成功"`
  69. MerchantChildApiId int64 `json:"merchant_child_api_id"`
  70. ProviderApiId int64 `json:"provider_api_id"`
  71. }
  72. type ManagementThirdpartCountIncreaseReply struct {
  73. }