bi.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package apis
  4. type BiGetDashReq struct {
  5. }
  6. type BiDashVehicle struct {
  7. Count int64 `json:"count"`
  8. Increase int64 `json:"increase"`
  9. }
  10. type BiDashCharge struct {
  11. Charge int64 `json:"charge"`
  12. ChargeRate float64 `json:"charge_rage"`
  13. Increase float64 `json:"increase"`
  14. }
  15. type BiDashFail struct {
  16. Fail int64 `json:"fail"`
  17. FailRate float64 `json:"fail_rate"`
  18. Increase float64 `json:"increase"`
  19. }
  20. type BiDash struct {
  21. VehicleInfo BiDashVehicle `json:"vehicle_info"`
  22. ChargeInfo BiDashCharge `json:"charge_info"`
  23. FailInfo BiDashFail `json:"fail_info"`
  24. }
  25. type BiGetDashReply struct {
  26. DashInfo BiDash `json:"dash_info"`
  27. }
  28. type BiGetServiceStatusReq struct {
  29. StartTimestamp int64 `json:"start_timestamp"`
  30. EndTimestamp int64 `json:"end_timestamp"`
  31. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  32. TimeType int `json:"time_type" description:"0按天1按时"`
  33. MerchantId int64 `json:"merchant_id"`
  34. ApiId []int64 `json:"api_id"`
  35. }
  36. type ServiceStatus struct {
  37. TimestampMinute int64 `json:"timestamp_minute"`
  38. Date string `json:"-"`
  39. FailCount int `json:"fail_count"`
  40. AvgElapsed float64 `json:"avg_elapsed"`
  41. SumElapsed float64 `json:"-"`
  42. Count float64 `json:"-"`
  43. }
  44. type BiGetServiceStatusReply struct {
  45. Infos []ServiceStatus `json:"infos"`
  46. }
  47. type BiGetProviderServiceStatusReq struct {
  48. StartTimestamp int64 `json:"start_timestamp"`
  49. EndTimestamp int64 `json:"end_timestamp"`
  50. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  51. TimeType int `json:"time_type" description:"0按天1按时"`
  52. ProviderApiId []int64 `json:"provider_api_id"`
  53. ProviderApiIdNew []int64
  54. }
  55. type BiGetProviderServiceStatusReply struct {
  56. Infos []ServiceStatus `json:"infos"`
  57. }
  58. type BiGetTrendReq struct {
  59. StartTimestamp int64 `json:"start_timestamp"`
  60. EndTimestamp int64 `json:"end_timestamp"`
  61. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  62. TimeType int `json:"time_type" description:"0按天1按时"`
  63. MerchantId int64 `json:"merchant_id"`
  64. ApiId []int64 `json:"api_id"`
  65. }
  66. type Trend struct {
  67. Date string `json:"date"`
  68. Total int64 `json:"total"`
  69. Charge int64 `json:"charge"`
  70. }
  71. type HourTrend struct {
  72. Hour string `json:"hour"`
  73. Total int64 `json:"total"`
  74. Charge int64 `json:"charge"`
  75. }
  76. type BiGetTrendReply struct {
  77. Infos []Trend `json:"infos"`
  78. TotalMax int64 `json:"total_max"`
  79. TotalMin int64 `json:"total_min"`
  80. TotalAvg int64 `json:"total_avg"`
  81. TotalCurrent int64 `json:"total_current"`
  82. ChargeMax int64 `json:"charge_max"`
  83. ChargeMin int64 `json:"charge_min"`
  84. ChargeAvg int64 `json:"charge_avg"`
  85. ChargeCurrent int64 `json:"charge_current"`
  86. LastStageTotalAvg int64 `json:"last_stage_total_avg"`
  87. LastStageChargeAvg int64 `json:"last_stage_charge_avg"`
  88. }
  89. type BiGetProviderTrendReq struct {
  90. StartTimestamp int64 `json:"start_timestamp"`
  91. EndTimestamp int64 `json:"end_timestamp"`
  92. TimeType int `json:"time_type" description:"0按天1按月"`
  93. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  94. ProviderApiId []int64 `json:"provider_api_id"`
  95. ProviderApiIdNew []int64 `json:"provider_api_id_new"`
  96. }
  97. type BiGetProviderTrendReply struct {
  98. Infos []Trend `json:"infos"`
  99. TotalMax int64 `json:"total_max"`
  100. TotalMin int64 `json:"total_min"`
  101. TotalAvg int64 `json:"total_avg"`
  102. TotalCurrent int64 `json:"total_current"`
  103. ChargeMax int64 `json:"charge_max"`
  104. ChargeMin int64 `json:"charge_min"`
  105. ChargeAvg int64 `json:"charge_avg"`
  106. ChargeCurrent int64 `json:"charge_current"`
  107. LastStageTotalAvg int64 `json:"last_stage_total_avg"`
  108. LastStageChargeAvg int64 `json:"last_stage_charge_avg"`
  109. }
  110. type BiGetReportReq struct {
  111. Date []string `json:"date"`
  112. MerchantId int64 `json:"merchant_id"`
  113. MerchantIds []int64 `json:"merchant_ids"`
  114. ApiId []int64 `json:"api_id"`
  115. PageNumber int `json:"page_number"`
  116. PageSize int `json:"page_size"`
  117. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  118. IsAll bool `json:"is_all"`
  119. Page bool
  120. }
  121. type BiReportInfo struct {
  122. MerchantName string `json:"merchant_name"`
  123. Date string `json:"date"`
  124. ApiName string `json:"api_name"`
  125. Total int64 `json:"total"`
  126. Valid int64 `json:"valid"`
  127. ValidRate string `json:"valid_rate"`
  128. QueryNoRecord int64 `json:"query_no_record"`
  129. QueryNoRecordRate string `json:"query_no_record_rate"`
  130. Fail int64 `json:"fail"`
  131. FailRate string `json:"fail_rate"`
  132. Charge int64 `json:"charge"`
  133. ChargeRate string `json:"charge_rate"`
  134. AvgElapsed string `json:"avg_elapsed"`
  135. SumElapsed float64 `json:"-"`
  136. Reuse int64 `json:"reuse"`
  137. Success int64 `json:"-"`
  138. ApiId int64 `json:"-"`
  139. ReuseRate string `json:"reuse_rate"`
  140. }
  141. type BiProviderReportInfo struct {
  142. ProviderName string `json:"provider_name"`
  143. Date string `json:"date"`
  144. ProviderApiName string `json:"provider_api_name"`
  145. Total int64 `json:"total"`
  146. QueryNoRecord int64 `json:"query_no_record"`
  147. QueryNoRecordRate string `json:"query_no_record_rate"`
  148. Fail int64 `json:"fail"`
  149. FailRate string `json:"fail_rate"`
  150. Charge int64 `json:"charge"`
  151. ChargeRate string `json:"charge_rate"`
  152. AvgElapsed string `json:"avg_elapsed"`
  153. SumElapsed float64
  154. ProviderApiId int64 `json:"provider_api_id"`
  155. }
  156. type BiGetReportReply struct {
  157. PageSize int `json:"page_size"`
  158. Total int `json:"total"`
  159. Infos []BiReportInfo `json:"bi_report_info"`
  160. Sum BiReportInfo `json:"sum"`
  161. }
  162. type BiGetProviderReportReq struct {
  163. Date []string `json:"date"`
  164. ProviderApiId []int64 `json:"provider_api_id"`
  165. ProviderId int64 `json:"provider_id"`
  166. PageNumber int `json:"page_number"`
  167. ProviderApiIdNew []int64 `json:"provider_api_id_new"`
  168. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  169. IsAll bool `json:"is_all"`
  170. PageSize int `json:"page_size"`
  171. }
  172. type BiGetProviderReportReply struct {
  173. Total int `json:"total"`
  174. PageSize int `json:"page_size"`
  175. Infos []BiProviderReportInfo `json:"infos"`
  176. Sum BiProviderReportInfo `json:"sum"`
  177. }
  178. type BiGetDistributionReq struct {
  179. ApiId []int64 `json:"api_id"`
  180. MerchantId int64 `json:"merchant_id"`
  181. StartTimestamp int64 `json:"start_timestamp"`
  182. EndTimestamp int64 `json:"end_timestamp"`
  183. PageNumber int `json:"page_number"`
  184. TimeType int `json:"time_type" description:"0 按天 1 按小时"`
  185. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  186. }
  187. type CodeCount struct {
  188. Code string `json:"code"`
  189. Msg string `json:"msg"`
  190. Count int `json:"count"`
  191. }
  192. type ProviderCount struct {
  193. ProviderApiName string `json:"provider_api_name"`
  194. ProviderName string `json:"provider_name"`
  195. Count int `json:"count"`
  196. Success int `json:"success"`
  197. Query int `json:"query"`
  198. Charge int `json:"charge"`
  199. }
  200. type BiDistribution struct {
  201. ApiCodeTotal int64 `json:"api_code_total"`
  202. ApiValid int `json:"api_valid"`
  203. ApiCharge int `json:"api_charge"`
  204. ApiFail int `json:"api_fail"`
  205. ApiSuccess int `json:"api_success"`
  206. ApiCodeList []CodeCount `json:"api_code_list"`
  207. //ProviderList []ProviderCount `provider_list`
  208. }
  209. type BiProviderDistribution struct {
  210. ProviderCharge int `json:"provider_charge"`
  211. ProviderSuccess int `json:"provider_success"`
  212. ProviderFail int `json:"provider_fail"`
  213. ProviderCodeTotal int `json:"provider_code_total"`
  214. ProviderCodeList []CodeCount `json:"provider_code_list"`
  215. }
  216. type BiGetDistributionReply struct {
  217. Info BiDistribution `json:"info"`
  218. }
  219. type BiGetProviderDistributionReq struct {
  220. ProviderApiId []int64 `json:"provider_api_id"`
  221. ProviderApiIdNew []int64 `json:"provider_api_id_new"`
  222. StartTimestamp int64 `json:"start_timestamp"`
  223. EndTimestamp int64 `json:"end_timestamp"`
  224. TimeType int `json:"time_type" description:"0 按天 1 按小时"`
  225. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  226. }
  227. type BiGetProviderDistributionReply struct {
  228. Info BiProviderDistribution `json:"info"`
  229. }
  230. type ApiServiceDataInfo struct {
  231. Valid int64 `json:"valid"`
  232. Charge int64 `json:"charge"`
  233. Reuse int64 `json:"resue"`
  234. Fail int64 `json:"fail"`
  235. }
  236. type ApiServiceAllDataInfo struct {
  237. Today ApiServiceDataInfo `json:"today"`
  238. Yesterday ApiServiceDataInfo `json:"yesterday"`
  239. Week ApiServiceDataInfo `json:"week"`
  240. Month ApiServiceDataInfo `json:"month"`
  241. }
  242. type ApiServiceConsumeDetail struct {
  243. ApiName string `json:"api_name"`
  244. Rate string `json:"rate"`
  245. Charge int64 `json:"charge"`
  246. Valid int64 `json:"valid"`
  247. ChargeRate string `json:"charge_rate"`
  248. }
  249. type ApiServiceConsumeInfo struct {
  250. MerchantName string `json:"merchant_name"`
  251. Charge int64 `json:"charge"`
  252. Detail []ApiServiceConsumeDetail `json:"detail"`
  253. }
  254. type ApiServiceIncomeDetail struct {
  255. MerchantName string `json:"merchant_name"`
  256. Rate string `json:"rate"`
  257. Charge int64 `json:"charge"`
  258. Valid int64 `json:"valid"`
  259. }
  260. type ApiServiceIncomeInfo struct {
  261. ApiName string `json:"api_name"`
  262. Charge int64 `json:"charge"`
  263. Detail []ApiServiceIncomeDetail `json:"detail"`
  264. }
  265. type ApiServiceFailDetail struct {
  266. Code int `json:"code"`
  267. Msg string `json:"msg"`
  268. Rate string `json:"rate"`
  269. Fail int64 `json:"fail"`
  270. }
  271. type ApiServiceFailInfo struct {
  272. ApiName string `json:"api_name"`
  273. Fail int64 `json:"fail"`
  274. Detail []ApiServiceFailDetail `json:"detail"`
  275. }
  276. type BiGetApiServiceDataInfoReq struct {
  277. ApiId int64 `json:"api_id"`
  278. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  279. }
  280. type BiGetApiServiceDataInfoReply struct {
  281. Info ApiServiceAllDataInfo `json:"info"`
  282. }
  283. type BiGetApiServiceConsumeInfoReq struct {
  284. PageNumber int `json:"page_number"`
  285. PageSize int `json:"page_size"`
  286. TimeType int `json:"time_type" description:"0 今日 1 昨日 2 本周 3 本月"`
  287. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  288. }
  289. type BiGetApiServiceConsumeInfoReply struct {
  290. Infos []ApiServiceConsumeInfo `json:"infos"`
  291. Total int64 `json:"total"`
  292. PageNumber int `json:"page_number" in:"query"`
  293. PageSize int `json:"page_size" in:"query"`
  294. }
  295. type BiGetApiServiceIncomeInfoReq struct {
  296. PageNumber int `json:"page_number"`
  297. PageSize int `json:"page_size"`
  298. TimeType int `json:"time_type" description:"0 今日 1 昨日 2 本周 3 本月"`
  299. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  300. }
  301. type BiGetApiServiceIncomeInfoReply struct {
  302. Infos []ApiServiceIncomeInfo `json:"infos"`
  303. Total int64 `json:"total"`
  304. PageNumber int `json:"page_number" in:"query"`
  305. PageSize int `json:"page_size" in:"query"`
  306. }
  307. type BiGetApiServiceFailInfoReq struct {
  308. PageNumber int `json:"page_number"`
  309. PageSize int `json:"page_size"`
  310. TimeType int `json:"time_type" description:"0 今日 1 昨日 2 本周 3 本月"`
  311. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  312. }
  313. type BiGetApiServiceFailInfoReply struct {
  314. Infos []ApiServiceFailInfo `json:"infos"`
  315. Total int64 `json:"total"`
  316. PageNumber int `json:"page_number" in:"query"`
  317. PageSize int `json:"page_size" in:"query"`
  318. }
  319. type ProviderServiceDataInfo struct {
  320. Valid int64 `json:"valid"`
  321. Charge int64 `json:"charge"`
  322. Fail int64 `json:"fail"`
  323. }
  324. type ProviderServiceAllDataInfo struct {
  325. Today ProviderServiceDataInfo `json:"today"`
  326. Yesterday ProviderServiceDataInfo `json:"yesterday"`
  327. Week ProviderServiceDataInfo `json:"week"`
  328. Month ProviderServiceDataInfo `json:"month"`
  329. }
  330. type ProviderServicePayDetail struct {
  331. ProviderApiName string `json:"provider_api_name"`
  332. Rate string `json:"rate"`
  333. Charge int64 `json:"charge"`
  334. Valid int64 `json:"valid"`
  335. ChargeRate string `json:"charge_rate"`
  336. }
  337. type ProviderServicePayInfo struct {
  338. ProviderName string `json:"provider_name"`
  339. Charge int64 `json:"charge"`
  340. Detail []ProviderServicePayDetail `json:"detail"`
  341. }
  342. type ProviderServiceFailDetail struct {
  343. Code string `json:"code"`
  344. Msg string `json:"msg"`
  345. Rate string `json:"rate"`
  346. Fail int64 `json:"fail"`
  347. }
  348. type ProviderServiceFailInfo struct {
  349. ProviderName string `json:"provider_name"`
  350. ProviderApiName string `json:"provider_api_name"`
  351. Fail int64 `json:"fail"`
  352. Detail []ProviderServiceFailDetail `json:"detail"`
  353. }
  354. type BiGetProviderServiceDataInfoReq struct {
  355. ProviderApiId int64 `json:"provider_api_id"`
  356. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  357. }
  358. type BiGetProviderServiceDataInfoReply struct {
  359. Info ProviderServiceAllDataInfo `json:"info"`
  360. }
  361. type BiGetProviderServicePayInfoReq struct {
  362. PageNumber int `json:"page_number"`
  363. PageSize int `json:"page_size"`
  364. TimeType int `json:"time_type" description:"0 今日 1 昨日 2 本周 3 本月"`
  365. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  366. }
  367. type BiGetProviderServicePayInfoReply struct {
  368. Infos []ProviderServicePayInfo `json:"infos"`
  369. Total int64 `json:"total"`
  370. PageNumber int `json:"page_number"`
  371. PageSize int `json:"page_size"`
  372. }
  373. type BiGetProviderServiceFailInfoReq struct {
  374. PageNumber int `json:"page_number"`
  375. PageSize int `json:"page_size"`
  376. TimeType int `json:"time_type" description:"0 今日 1 昨日 2 本周 3 本月"`
  377. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  378. }
  379. type BiGetProviderServiceFailInfoReply struct {
  380. Infos []ProviderServiceFailInfo `json:"infos"`
  381. Total int64 `json:"total"`
  382. PageNumber int `json:"page_number"`
  383. PageSize int `json:"page_size"`
  384. }
  385. type BiGetPayDistributionReq struct {
  386. ApiId []int64 `json:"api_id"`
  387. MerchantId int64 `json:"merchant_id"`
  388. StartTimestamp int64 `json:"start_timestamp"`
  389. EndTimestamp int64 `json:"end_timestamp"`
  390. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  391. }
  392. type BiGetPayDistributionReply struct {
  393. MerchantSumCharge int64 `json:"merchant_sum_charge"`
  394. ProviderSumCharge int64 `json:"provider_sum_charge"`
  395. PayInfos []ProviderCount `json:"pay_infos"`
  396. }