第三方api接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

model.go 3.8 KiB

1 year ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. package jdSdk
  2. // 1-好券商品,2-精选卖场,10-9.9包邮,15-京东配送,22-实时热销榜,23-为你推荐,24-数码家电,25-超市,26-母婴玩具,27-家具日用,28-美妆穿搭,29-医药保健,30-图书文具,31-今日必推,32-京东好物,33-京东秒杀,34-拼购商品,40-高收益榜,41-自营热卖榜,109-新品首发,110-自营,112-京东爆品,125-首购商品,129-高佣榜单,130-视频商品,153-历史最低价商品榜
  3. // 排序字段(price:单价, commissionShare:佣金比例, commission:佣金, inOrderCount30DaysSku:sku维度30天引单量,comments:评论数,goodComments:好评数)
  4. //RequestJD is 请求 京东sdk的参数
  5. type RequestJD struct {
  6. PageIndex int `json:"page_index"`
  7. PageSize int `json:"page_size"`
  8. EliteID int `json:"elite_id"`
  9. SortName string `json:"sort_name"`
  10. UserIDType int `json:"userid_type"`
  11. UserID string `json:"user_id"`
  12. MaterialId string `json:"materialId"` //推广物料链接,建议链接使用微Q前缀,能较好适配微信手Q页面
  13. UnionId string `json:"unionId"` // 目标推客的联盟ID
  14. PositionId string `json:"positionId"` //推广位id
  15. CouponUrl string `json:"couponUrl"`
  16. Time string `json:"time"`
  17. Type string `json:"type"`
  18. }
  19. // JDFeaturedResponse is return from taoke.jdSdk
  20. type JDFeaturedResponse struct {
  21. JdUnionOpenGoodsJingfenQueryResponse struct {
  22. Code string `json:"code"`
  23. Result string `json:"result"`
  24. } `json:"jd_union_open_goods_jingfen_query_response"`
  25. }
  26. // JDFeature is jdSdk 精选 for微信
  27. type JDFeature struct {
  28. BrandCode string `json:"brandCode"`
  29. BrandName string `json:"brandName"`
  30. CategoryInfo struct {
  31. Cid1 int `json:"cid1"`
  32. Cid1Name string `json:"cid1Name"`
  33. Cid2 int `json:"cid2"`
  34. Cid2Name string `json:"cid2Name"`
  35. Cid3 int `json:"cid3"`
  36. Cid3Name string `json:"cid3Name"`
  37. } `json:"categoryInfo"`
  38. Comments int `json:"comments"`
  39. CommissionInfo struct {
  40. Commission float64 `json:"commission"`
  41. CommissionShare float64 `json:"commissionShare"`
  42. CouponCommission float64 `json:"couponCommission"`
  43. PlusCommissionShare float64 `json:"plusCommissionShare"`
  44. } `json:"commissionInfo"`
  45. CouponInfo struct {
  46. CouponList []struct {
  47. BindType int `json:"bindType"`
  48. Discount float64 `json:"discount"`
  49. GetEndTime int64 `json:"getEndTime"`
  50. GetStartTime int64 `json:"getStartTime"`
  51. HotValue int `json:"hotValue"`
  52. IsBest int `json:"isBest"`
  53. Link string `json:"link"`
  54. PlatformType int `json:"platformType"`
  55. Quota float64 `json:"quota"`
  56. UseEndTime int64 `json:"useEndTime"`
  57. UseStartTime int64 `json:"useStartTime"`
  58. } `json:"couponList"`
  59. } `json:"couponInfo"`
  60. GoodCommentsShare float64 `json:"goodCommentsShare"`
  61. ImageInfo struct {
  62. ImageList []struct {
  63. URL string `json:"url"`
  64. } `json:"imageList"`
  65. } `json:"imageInfo"`
  66. InOrderCount30Days int `json:"inOrderCount30Days"`
  67. InOrderCount30DaysSku int `json:"inOrderCount30DaysSku"`
  68. IsHot int `json:"isHot"`
  69. MaterialURL string `json:"materialUrl"`
  70. Owner string `json:"owner"`
  71. PinGouInfo struct {
  72. } `json:"pinGouInfo"`
  73. PriceInfo struct {
  74. LowestCouponPrice float64 `json:"lowestCouponPrice"`
  75. LowestPrice float64 `json:"lowestPrice"`
  76. LowestPriceType int `json:"lowestPriceType"`
  77. Price float64 `json:"price"`
  78. } `json:"priceInfo"`
  79. ResourceInfo struct {
  80. EliteID int `json:"eliteId"`
  81. EliteName string `json:"eliteName"`
  82. } `json:"resourceInfo"`
  83. ShopInfo struct {
  84. ShopID int `json:"shopId"`
  85. ShopLevel float64 `json:"shopLevel"`
  86. ShopName string `json:"shopName"`
  87. } `json:"shopInfo"`
  88. SkuID int64 `json:"skuId"`
  89. SkuName string `json:"skuName"`
  90. Spuid int64 `json:"spuid"`
  91. }