123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502 |
- package apis
- type TGdMerchantDataApi struct {
- Id int64 `json:"id" description:""`
- MerchantId int64 `json:"merchant_id" description:""`
- QueryTypeId int64 `json:"data_api_id" description:""`
- Count int `json:"count" description:""`
- CountPerDay int `json:"count_per_day" description:""`
- StartTime int64 `json:"start_time" description:""`
- EndTime int64 `json:"end_time" description:""`
- ComboType int `json:"combo_type"`
- State int `json:"state"`
- CountAfterIncrease int `json:"count_after_increase"`
- UsedBeforeIncrease int `json:"used_before_increase"`
- CountThresholds string `json:"count_thresholds"`
- DayThresholds string `json:"day_thresholds"`
- CreateTime string `json:"create_time" description:""`
- UpdateTime string `json:"update_time" description:""`
- DayTotalCount int `json:"day_total_count" description:"日即查量上限"`
- IpWhitelist string `json:"ip_whitelist"`
- IpWhitelistEnable bool `json:"ip_whitelist_enable"`
- CountThresholdsEnable bool `json:"count_thresholds_enable"`
- UnitPrice float64 `json:"unit_price"`
- }
- /*
- type MerchantChildApiProvider struct {
- Id int64 `json:"id" description:""`
- DayCount int `json:"day_count" description:""`
- Count int `json:"count" description:""`
- Enable bool `json:"enable" description:""`
- }
- */
- type MerchantApiProviderRelation struct {
- Id int64 `json:"-"`
- MerchantChildApiId int64 `json:"-"`
- ProviderApiId int64 `json:"provider_api_id"`
- Enable bool `json:"enable"`
- DayCount int64 `json:"day_count"`
- GroupNo int `json:"group_no"`
- GroupName string `json:"group_name"`
- Inventory int `json:"inventory"`
- }
- func (o *MerchantApiProviderRelation) TableName() string {
- return "t_gd_merchant_api_provider_api_relation"
- }
- type TGdMerchantChildDataApi struct {
- Id int64 `json:"id" description:""`
- MerchantDataApiId int64 `json:"merchant_data_api_id" description:""`
- SaleName string `json:"sale_name"`
- ApiId int64 `json:"api_id" description:""`
- RequestParam string `json:"request_param" description:""`
- ResponseParam string `json:"response_param" description:""`
- CountType int `json:"count_type" description:""`
- CountCode string `json:"count_code" description:""`
- ForceUpdate bool `json:"force_update" description:""`
- IsCrypto bool `json:"is_crypto" description:""`
- IsEnable bool `json:"is_enable" description:""`
- CreateTime string `json:"create_time" description:""`
- UpdateTime string `json:"updated_time" description:""`
- Priority int `json:"priority" orm:"-" description:""`
- ReuseTime int `json:"reuse_time"`
- Timeout int `json:"timeout"`
- IpWhitelist string `json:"ip_whitelist"`
- Filter string `json:"filter"`
- MinimalTimeConsuming int `json:"minimal_time_consuming"`
- RandomPercentage int `json:"random_percentage"`
- IsRawErrorCode int `json:"is_raw_error_code"`
- RateLimit int `json:"rate_limit" description:"并发限制"`
- }
- func (o *TGdMerchantChildDataApi) TableName() string {
- return "t_gd_merchant_child_data_api"
- }
- //商户数据api列表
- type ManagementGetMerchantDataApiListReq struct {
- MerchantId int64 `json:"merchant_id" description:""`
- PageNumber int `json:"page_number" description:""`
- PageSize int `json:"page_size"`
- IsAll bool `json:"is_all"`
- }
- type MerchantDataApiItem struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id" description:""`
- Name string `json:"name" description:""`
- QueryType string `json:"query_type" description:""`
- ComboType int `json:"combo_type" description:"套餐类型1 按总次数,2 按天"`
- TotalCount int `json:"total_count" description:""`
- RemainCount int `json:"remain_count" description:""`
- DayCount int `json:"day_count" description:""`
- DayRemainCount int `json:"day_remain_count" description:""`
- DayNumberCount int `json:"day_number_count" description:"天数上限"`
- DayNumberRemain int `json:"day_number_remain" description:"有效天数"`
- Status string `json:"status" description:""`
- UseTime string `json:"use_time" description:""`
- }
- type ManagementGetMerchantDataApiListReply struct {
- Total int `json:"total" description:""`
- PageSize int `json:"page_size" description:""`
- PageNumber int `json:"page_number" description:""`
- MerchantDataApiItems []MerchantDataApiItem `json:"merchant_data_api_items"`
- }
- type MerchantDataApiDayItem struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id" description:""`
- DataApiName string `json:"data_api_name" description:""`
- QueryTypeName string `json:"query_type_name" description:""`
- DayCount int64 `json:"day_count" description:"每天次数上限"`
- DayUsedCount int64 `json:"day_used_count" description:"当天调用次数"`
- DayRemainCount int64 `json:"day_remain_count" description:"当天剩余次数"`
- TotalDay int64 `json:"total_day" description:"总天数"`
- EffectiveDay int64 `json:"effective_day" description:"剩余有效天数"`
- Status string `json:"status" description:""`
- UseTime string `json:"use_time" description:""`
- QueryTypeId int64 `json:"-"`
- TotalConsume int `json:"-"`
- CountThresholds string `json:"count_thresholds"`
- DayThresholds string `json:"day_thresholds"`
- TotalComboId int64 `json:"total_combo_id" description:"按次套餐的id"`
- TotalComboCount int64 `json:"total_combo_count" description:"按次套餐总次数"`
- DayComboId int64 `json:"day_combo_id" description:"按天套餐的id"`
- DayComboCount int64 `json:"day_combo_count" description:"按天套餐总单天次数"`
- DayComboDays int `json:"day_combo_days" description:"按天套餐总天数"`
- DayTotalCount int `json:"day_total_count" description:"日即查量上限"`
- RemainDayTotalCount int `json:"remain_day_total_count" description:"日即查量余量"`
- IpWhitelist string `json:"ip_whitelist"`
- IpWhitelistEnable bool `json:"ip_whitelist_enable"`
- CountThresholdsEnable bool `json:"count_thresholds_enable"`
- StatusCode int `json:"status_code"`
- Modifiable MerchantDataApiModifiable `json:"modifiable"`
- Alias string `json:"alias"`
- }
- type MerchantDataApiModifiableTotal struct {
- CountThresholds string `json:"count_thresholds"`
- TotalComboId int64 `json:"total_combo_id" description:"按次套餐的id"`
- TotalComboCount int64 `json:"total_combo_count" description:"按次套餐总次数"`
- DayTotalCount int `json:"day_total_count" description:"日即查量上限"`
- RemainDayTotalCount int `json:"remain_day_total_count" description:"日即查量余量"`
- IpWhitelist string `json:"ip_whitelist"`
- IpWhitelistEnable bool `json:"ip_whitelist_enable"`
- CountThresholdsEnable bool `json:"count_thresholds_enable"`
- TotalComboDayCount int `json:"total_combo_day_count"`
- }
- type MerchantDataApiModifiableDay struct {
- CountThresholds string `json:"count_thresholds"`
- DayComboId int64 `json:"day_combo_id" description:"按天套餐的id"`
- DayComboCount int64 `json:"day_combo_count" description:"按天套餐总单天次数"`
- DayComboDays int `json:"day_combo_days" description:"按天套餐总天数"`
- DayThresholds string `json:"day_thresholds"`
- CountThresholdsEnable bool `json:"count_thresholds_enable"`
- DayTotalCount int `json:"day_total_count" description:"日即查量上限"`
- RemainDayTotalCount int `json:"remain_day_total_count" description:"日即查量余量"`
- EffectiveDay int64 `json:"effective_day" description:"剩余有效天数"`
- IpWhitelist string `json:"ip_whitelist"`
- IpWhitelistEnable bool `json:"ip_whitelist_enable"`
- }
- type MerchantDataApiModifiable struct {
- DayInfo MerchantDataApiModifiableDay `json:"day_info"`
- TotalInfo MerchantDataApiModifiableTotal `json:"total_info"`
- }
- type MerchantDataApiTotalItem struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id" description:""`
- DataApiName string `json:"data_api_name" description:""`
- QueryTypeName string `json:"query_type_name" description:""`
- TotalCount int64 `json:"total_count" description:"总次数"`
- UsedCount int64 `json:"used_count" description:"调用次数"`
- RemainCount int64 `json:"remain_count" description:"剩余次数"`
- Status string `json:"status" description:""`
- UseTime string `json:"use_time" description:""`
- QueryTypeId int64 `json:"-"`
- DayCount int64 `json:"day_count"`
- StatusCode int `json:"status_code"`
- IsFree bool `json:"is_free"`
- Modifiable MerchantDataApiModifiable `json:"modifiable"`
- TotalConsume int `json:"-"`
- CountThresholds string `json:"count_thresholds"`
- TotalComboId int64 `json:"total_combo_id" description:"按次套餐的id"`
- TotalComboCount int64 `json:"total_combo_count" description:"按次套餐总次数"`
- DayComboId int64 `json:"day_combo_id" description:"按天套餐的id"`
- DayComboCount int64 `json:"day_combo_count" description:"按天套餐总单天次数"`
- DayComboDays int `json:"day_combo_days" description:"按天套餐总天数"`
- DayTotalCount int `json:"day_total_count" description:"日即查量上限"`
- RemainDayTotalCount int `json:"remain_day_total_count" description:"日即查量余量"`
- IpWhitelist string `json:"ip_whitelist"`
- IpWhitelistEnable bool `json:"ip_whitelist_enable"`
- CountThresholdsEnable bool `json:"count_thresholds_enable"`
- Alias string `json:"alias"`
- }
- type DayCount struct {
- Total int `json:"total" description:""`
- PageSize int `json:"page_size" description:""`
- PageNumber int `json:"page_number" description:""`
- MerchantDataApiDayItem []MerchantDataApiDayItem `json:"merchant_data_api_day_item"`
- }
- type TotalCount struct {
- Total int `json:"total" description:""`
- PageSize int `json:"page_size" description:""`
- PageNumber int `json:"page_number" description:""`
- MerchantDataApiTotalItem []MerchantDataApiTotalItem `json:"merchant_data_api_total_item"`
- }
- type ManagementGetMerchantDataApiListByDayReq struct {
- MerchantId int64 `json:"merchant_id" description:""`
- PageNumber int `json:"page_number" description:""`
- DataApiName string `json:"data_api_name"`
- PageSize int `json:"page_size"`
- IsAll bool `json:"is_all"`
- }
- type ManagementGetMerchantDataApiListByDayReply struct {
- DayCount
- }
- type ManagementGetMerchantDataApiListByTotalReq struct {
- MerchantId int64 `json:"merchant_id" description:""`
- PageNumber int `json:"page_number" description:""`
- DataApiName string `json:"data_api_name"`
- PageSize int `json:"page_size"`
- IsAll bool `json:"is_all"`
- }
- type ManagementGetMerchantDataApiListByTotalReply struct {
- TotalCount
- }
- //商户基础api操作
- /*type MerchantBaseApiParam struct {
- Name string `json:"name" description:""`
- Mean string `json:"mean" description:"参数含义"`
- Required bool `json:"required" description:"是否必选"`
- Type string `json:"type" description:""`
- In string `json:"in" description:"body 或query"`
- }
- */
- type MerchantProviderApi struct {
- ProviderApiId int64 `json:"provider_api_id"`
- Priority int `json:"priority" description:"优先级"`
- ThirdpartApiName string `json:"thirdpart_api_name" description:"数据源接口名称"`
- PlatformName string `json:"platform_name" description:"数据源平台名称"`
- Enable bool `json:"enable"`
- DayCount int64 `json:"day_count"`
- }
- /*type MerchantBaseApiItem struct {
- MerchantChildApiId int64 `json:"merchant_child_api_id" description:"商户的某数据api的某子api的id"`
- IsCrypto bool `json:"is_crypto" description:""`
- CountType int `json:"count_type" description:""`
- ForceUpdate bool `json:"force_update" description:"是否开启强更,若开启每次都调数据源"`
- MerchantProviderApiList []MerchantProviderApi `json:"merchant_provider_api_list"`
- ApiName string `json:"api_name" description:""`
- ApiId int64 `json:"api_id" description:""`
- RequestParam []MerchantBaseApiParam `json:"request_param" description:""`
- ResponseParam []MerchantBaseApiParam `json:"response_param" description:""`
- }
- */
- type ManagementMerchantBaseApiItem struct {
- MerchantChildApiId int64 `json:"merchant_child_api_id" description:"商户的某数据api的某子api的id"`
- MerchantChildApiName string `json:"merchant_child_api_name" description""`
- Router string `json:"router"`
- }
- //获取商户数据api对应的基础api列表
- type ManagementGetMerchantBaseApiListReq struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id" description:""`
- }
- type ManagementGetMerchantBaseApiListReply struct {
- ManagementMerchantBaseApiList []ManagementMerchantBaseApiItem `json:"merchant_base_api_list"`
- }
- type ManagementGetMerchantBaseApiInfoReq struct {
- MerchantChildApiId int64 `json:"merchant_child_api_id" description:"商户的某数据api的某子api的id"`
- }
- type MerchantProviderGroup struct {
- GroupNo int `json:"group_no"`
- GroupName string `json:"group_name"`
- MerchantProviderApiList []MerchantProviderApi `json:"merchant_provider_api_list"`
- }
- type ManagementGetMerchantBaseApiInfoReply struct {
- MerchantChildApiId int64 `json:"merchant_child_api_id" description:"商户的某数据api的某子api的id"`
- IsCrypto bool `json:"is_crypto" description:""`
- CountType int `json:"count_type" description:""`
- ForceUpdate bool `json:"force_update" description:"是否开启强更,若开启每次都调数据源"`
- MerchantProviderGroupList []MerchantProviderGroup `json:"merchant_provider_group_list"`
- ApiName string `json:"api_name" description:""`
- ApiRouter string `json:"api_router"`
- RequestParam []ManagementBaseApiParam `json:"request_param" description:""`
- ResponseParam []ManagementBaseApiParam `json:"response_param" description:""`
- CountCode string `json:"count_code" description:"当计数类型为查得时,错误码"`
- ReuseTime int `json:"reuse_time"`
- Timeout int `json:"timeout"`
- IpWhitelist string `json:"ip_whitelist"`
- Filters []BaseApiParamFilter `json:"filters"`
- MinimalTimeConsuming int `json:"minimal_time_consuming" description:"最小耗时"`
- RandomPercentage int `json:"random_percentage" description:"随机百分比"`
- IsRawErrorCode int `json:"is_raw_error_code" description:"是否原始错误码"`
- RateLimit int `json:"rate_limit" description:"并发限制"`
- }
- //在商户数据api中添加基础api
- type ManagementAddMerchantBaseApiReq struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id" description:""`
- BaseApiIds []int64 `json:"base_api_ids" description:""`
- }
- type ManagementAddMerchantBaseApiReply struct {
- //MerchantChildApiId int64 `json:"merchant_child_api_id" description:""`
- }
- //在商户数据api中删除基础api
- type ManagementDelMerchantBaseApiReq struct {
- MerchantChildApiId int64 `json:"merchant_child_api_id" description:""`
- }
- type ManagementDelMerchantBaseApiReply struct {
- }
- //更新商户数据api中某基础api信息
- type ManagementUpdateMerchantBaseApiReq struct {
- MerchantChildApiId int64 `json:"merchant_child_api_id" description:"商户的某数据api的某子api的id"`
- IsCrypto bool `json:"is_crypto" description:""`
- CountType int `json:"count_type" description:""`
- ForceUpdate bool `json:"force_update" description:"是否开启强更,若开启每次都调数据源"`
- ReuseTime int `json:"reuse_time" description:"复用时效"`
- //ProviderApiLimit []MerchantApiProviderRelation `json:"provider_api_limit"`
- MerchantProviderGroupList []MerchantProviderGroup `json:"merchant_provider_group_list"`
- RequestParam []ManagementBaseApiParam `json:"request_param" description:""`
- ResponseParam []ManagementBaseApiParam `json:"response_param" description:""`
- CountCode string `json:"count_code" description:"当计数类型为查得时,错误码"`
- Timeout int `json:"timeout"`
- IpWhitelist string `json:"ip_whitelist"`
- Filters []BaseApiParamFilter `json:"filters"`
- MinimalTimeConsuming int `json:"minimal_time_consuming" description:"最小耗时"`
- RandomPercentage int `json:"random_percentage" description:"随机百分比"`
- IsRawErrorCode int `json:"is_raw_error_code"`
- RateLimit int `json:"rate_limit" description:"并发限制"`
- }
- type ManagementUpdateMerchantBaseApiReply struct {
- }
- //设置商户数据api中基础api优先级
- type ManagementSetMerchantBaseApiPriorityReq struct {
- MerchantChildApiIds []int64 `json:"merchant_child_api_ids" description:"按优先级排好序的id"`
- }
- type ManagementSetMerchantBaseApiPriorityReply struct {
- }
- //修改商户数据api配额
- type ManagementSetMerchantDataApiQuotaReq struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id" description:""`
- DayCount int `json:"day_count" description:"日调用量上限"`
- Count int `json:"count" description:"总调用上限"`
- DayNumber int `json:"day_number" description:"剩余有效天数"`
- }
- type ManagementSetMerchantDataApiQuotaReply struct {
- }
- type ManagementGetMerchantDataApiQuotaReq struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id" description:""`
- }
- type ManagementGetMerchantDataApiQuotaReply struct {
- DayCount int `json:"day_count" description:"日调用量上限"`
- Count int `json:"count" description:"总调用上限"`
- DayNumber int `json:"day_number" description:"剩余有效天数"`
- Type int `json:"type" description:"1 按总次数, 2按天"`
- }
- type ManagementAddMerchantDataApiReq struct {
- MerchantId int64 `json:"merchant_id" description:""`
- QueryTypeId int64 `json:"query_type_id"`
- ComboId int64 `json:"combo_id" description:""`
- }
- type ManagementAddMerchantDataApiReply struct {
- }
- type ManagementConvertMerchantDataApiReq struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id"`
- }
- type ParamStruct struct {
- StructName string `json:"struct_name"`
- Params []ManagementBaseApiParam `json:"params"`
- }
- type ErrorCode struct {
- Code string `json:"code"`
- Msg string `json:"msg"`
- }
- type ApiParamStructInfo struct {
- ApiName string `json:"api_name"`
- ApiCode string `json:"api_code"`
- ApiMethod string `json:"api_method"`
- ApiRouter string `json:"api_router"`
- Comment string `json:"comment"`
- RequestParams []ParamStruct `json:"request_params"`
- ResponseParams []ParamStruct `json:"response_params"`
- ErrorList []ErrorCode `json:"error_list"`
- IsCrypto bool `json:"is_crypto"`
- JsonExample string `json:"json_example"`
- }
- type ManagementConvertMerchantDataApiReply struct {
- DataApiName string `json:"data_api_name"`
- Apis []ApiParamStructInfo `json:"apis"`
- }
- type ManagementDelMerchantDataApiReq struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id"`
- }
- type ManagementDelMerchantDataApiReply struct {
- }
- type ManagementMerchantBaseApiAllInfo struct {
- ApiId int64 `json:"api_id"`
- DataApiName string `json:"data_api_name"`
- Name string `json:"name" description:"基础api名"`
- Alias string `json:"alias" description:"别名"`
- Method string `json:"method" description:"方法,GET POST等"`
- Router string `json:"router" description:"路由"`
- RequestParam []ManagementBaseApiParam `json:"request_param" description:"请求参数"`
- ResponseParam []ManagementBaseApiParam `json:"response_param" description:"响应参数"`
- IsCrypto bool `json:"is_crypto"`
- }
- type ManagementGetMerchantBaseApiListAllReq struct {
- MerchantId int64 `json:"merchant_id"`
- OnlyBaseApi bool `json:"only_base_api"`
- }
- type ManagementGetMerchantBaseApiListAllReply struct {
- ManagementMerchantBaseApiList []ManagementMerchantBaseApiAllInfo `json:"merchant_base_api_list"`
- }
- type GetMerchantDataApiQuotaReq struct {
- Id int64 `json:"id"`
- }
- type GetMerchantDataApiQuotaReply struct {
- MerchantId int64 `json:"merchant_id" description:""`
- QueryTypeId int64 `json:"data_api_id" description:""`
- Count int `json:"count" description:""`
- CountPerDay int `json:"count_per_day" description:""`
- StartTime int64 `json:"start_time" description:""`
- EndTime int64 `json:"end_time" description:""`
- ComboType int `json:"combo_type"`
- State int `json:"state"`
- }
- //修改商户数据api 每日调用上限
- type ManagementSetDayCountLimitReq struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id" description:""`
- DayCount int `json:"day_count" description:"日调用量上限"`
- DayTotalCount int `json:"day_total_count" description:"日即查量上限"`
- }
- type ManagementSetDayCountLimitReply struct {
- }
- type UpdateMerchantDataApiReq struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id" description:""`
- DayCount int `json:"day_count" description:"日调用量上限"`
- Count int `json:"count" description:"总调用上限"`
- DayNumber int `json:"day_number" description:"剩余有效天数"`
- CountThresholds string `json:"count_thresholds"`
- DayThresholds string `json:"day_thresholds"`
- ComboId int64 `json:"combo_id"`
- DayTotalCount int `json:"day_total_count"`
- IpWhitelist string `json:"ip_whitelist"`
- IpWhitelistEnable bool `json:"ip_whitelist_enable"`
- CountThresholdsEnable bool `json:"count_thresholds_enable"`
- TotalComboDayCount int `json:"total_combo_day_count"`
- }
- type UpdateMerchantDataApiReply struct {
- }
- type ModifyAliasReq struct {
- MerchantDataApiId int64 `json:"merchant_data_api_id" description:""`
- Alias string `json:"alias"`
- }
- type ModifyAliasReply struct{}
|