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"