From 929783d784ac7bbbecbc7590bf48e7c9c5f3ea0c Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 15 May 2024 20:37:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=BC=E5=A4=9A=E5=A4=9A=E8=81=94=E7=9B=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- md/cps_pdd/goods.go | 3 +++ pdd_union/goods.go | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/md/cps_pdd/goods.go b/md/cps_pdd/goods.go index 820f519..9ee0531 100644 --- a/md/cps_pdd/goods.go +++ b/md/cps_pdd/goods.go @@ -3,6 +3,7 @@ package cps_pdd type RecommendGoods struct { GoodsBasicDetailResponse struct { List []struct { + GoodsId int64 `json:"goods_id"` ActivityPromotionRate int `json:"activity_promotion_rate"` ActivityTags []int `json:"activity_tags"` BrandName string `json:"brand_name"` @@ -61,6 +62,7 @@ type RecommendGoods struct { type SearchGoods struct { GoodsSearchResponse struct { GoodsList []struct { + GoodsId int64 `json:"goods_id"` ActivityPromotionRate int `json:"activity_promotion_rate"` ActivityTags []int `json:"activity_tags"` ActivityType int `json:"activity_type"` @@ -133,6 +135,7 @@ type SearchGoods struct { type GoodsDetail struct { GoodsDetailResponse struct { GoodsDetails []struct { + GoodsId int64 `json:"goods_id"` ActivityPromotionRate int `json:"activity_promotion_rate"` ActivityTags []int `json:"activity_tags"` BrandName string `json:"brand_name"` diff --git a/pdd_union/goods.go b/pdd_union/goods.go index a07739e..aaa0014 100644 --- a/pdd_union/goods.go +++ b/pdd_union/goods.go @@ -14,7 +14,7 @@ func GetRecommendGoods(keyArr map[string]string, param map[string]interface{}) [ data := make([]map[string]string, 0) for _, v := range res.GoodsBasicDetailResponse.List { tmp := make(map[string]string) - tmp["gid"] = v.GoodsSign + tmp["gid"] = zhios_third_party_utils.Int64ToStr(v.GoodsId) tmp["goods_title"] = v.GoodsName tmp["commission"] = zhios_third_party_utils.Float64ToStr(float64(v.PromotionRate) / 10) tmp["coupon_start_time"] = "0" @@ -56,7 +56,7 @@ func GetSearchGoods(keyArr map[string]string, param map[string]interface{}) []ma data := make([]map[string]string, 0) for _, v := range res.GoodsSearchResponse.GoodsList { tmp := make(map[string]string) - tmp["gid"] = v.GoodsSign + tmp["gid"] = zhios_third_party_utils.Int64ToStr(v.GoodsId) tmp["goods_title"] = v.GoodsName tmp["commission"] = zhios_third_party_utils.Float64ToStr(float64(v.PromotionRate) / 10) tmp["coupon_start_time"] = "0" @@ -97,7 +97,7 @@ func GetGoodsDetail(keyArr map[string]string, param map[string]interface{}) map[ data := make(map[string]interface{}) for _, v := range res.GoodsDetailResponse.GoodsDetails { tmp := make(map[string]interface{}) - tmp["gid"] = v.GoodsSign + tmp["gid"] = zhios_third_party_utils.Int64ToStr(v.GoodsId) tmp["goods_title"] = v.GoodsName tmp["commission"] = zhios_third_party_utils.Float64ToStr(float64(v.PromotionRate) / 10) tmp["coupon_start_time"] = "0"