huangjiajun 1 anno fa
parent
commit
0543891f6a
2 ha cambiato i file con 42 aggiunte e 38 eliminazioni
  1. +22
    -22
      tik_tok/md_tik_tok_goods.go
  2. +20
    -16
      tik_tok/svc_tik_tok_goods.go

+ 22
- 22
tik_tok/md_tik_tok_goods.go Vedi File

@@ -24,28 +24,28 @@ type TikTokGoods struct {
}

type TikTokGoodsLm struct {
CosFee int64 `json:"cos_fee"`
CosRatio float64 `json:"cos_ratio"`
ActivityCosRatio float64 `json:"activity_cos_ratio"`
CouponPrice int64 `json:"coupon_price"`
Cover string `json:"cover"`
DetailURL string `json:"detail_url"`
FirstCid int64 `json:"first_cid"`
InStock interface{} `json:"in_stock"`
Price int64 `json:"price"`
ProductID int64 `json:"product_id"`
Sales int64 `json:"sales"`
SecondCid int64 `json:"second_cid"`
Sharable interface{} `json:"sharable"`
ShopID int64 `json:"shop_id"`
ShopName string `json:"shop_name"`
ThirdCid int64 `json:"third_cid"`
Title string `json:"title"`
ActivityStartTime string `json:"promotion_start_time"`
ActivityEndTime string `json:"promotion_end_time"`
ServiceRatio string `json:"service_ratio"`
Imgs []string `json:"imgs"`
ShopTotalScore ShopTotalScore `json:"shop_total_score"`
CosFee int64 `json:"cos_fee"`
CosRatio float64 `json:"cos_ratio"`
ActivityCosRatio float64 `json:"activity_cos_ratio"`
CouponPrice int64 `json:"coupon_price"`
Cover string `json:"cover"`
DetailURL string `json:"detail_url"`
FirstCid int64 `json:"first_cid"`
InStock interface{} `json:"in_stock"`
Price int64 `json:"price"`
ProductID int64 `json:"product_id"`
Sales int64 `json:"sales"`
SecondCid int64 `json:"second_cid"`
Sharable interface{} `json:"sharable"`
ShopID int64 `json:"shop_id"`
ShopName string `json:"shop_name"`
ThirdCid int64 `json:"third_cid"`
Title string `json:"title"`
ActivityStartTime string `json:"promotion_start_time"`
ActivityEndTime string `json:"promotion_end_time"`
ServiceRatio string `json:"service_ratio"`
Imgs []string `json:"imgs"`
ShopTotalScore interface{} `json:"shop_total_score"`
}
type ShopTotalScoreData struct {
Level int `json:"level"`


+ 20
- 16
tik_tok/svc_tik_tok_goods.go Vedi File

@@ -149,22 +149,26 @@ func GetKlGoods(args map[string]string) TikTokGoods {
return goodsList
}
func CommGoodsDetail(goods TikTokGoodsLm) TikTokGoods {
ShopTotalScore := ShopTotalScore1{
LogisticsScore: ShopTotalScoreData1{
Level: zhios_third_party_utils.IntToStr(goods.ShopTotalScore.LogisticsScore.Level),
Score: goods.ShopTotalScore.LogisticsScore.Score,
Text: goods.ShopTotalScore.LogisticsScore.Text,
},
ProductScore: ShopTotalScoreData1{
Level: zhios_third_party_utils.IntToStr(goods.ShopTotalScore.ProductScore.Level),
Score: goods.ShopTotalScore.ProductScore.Score,
Text: goods.ShopTotalScore.ProductScore.Text,
},
ServiceScore: ShopTotalScoreData1{
Level: zhios_third_party_utils.IntToStr(goods.ShopTotalScore.ServiceScore.Level),
Score: goods.ShopTotalScore.ServiceScore.Score,
Text: goods.ShopTotalScore.ServiceScore.Text,
},
ShopTotalScores, ok := goods.ShopTotalScore.(ShopTotalScore)
ShopTotalScore := ShopTotalScore1{}
if ok {
ShopTotalScore = ShopTotalScore1{
LogisticsScore: ShopTotalScoreData1{
Level: zhios_third_party_utils.IntToStr(ShopTotalScores.LogisticsScore.Level),
Score: ShopTotalScores.LogisticsScore.Score,
Text: ShopTotalScores.LogisticsScore.Text,
},
ProductScore: ShopTotalScoreData1{
Level: zhios_third_party_utils.IntToStr(ShopTotalScores.ProductScore.Level),
Score: ShopTotalScores.ProductScore.Score,
Text: ShopTotalScores.ProductScore.Text,
},
ServiceScore: ShopTotalScoreData1{
Level: zhios_third_party_utils.IntToStr(ShopTotalScores.ServiceScore.Level),
Score: ShopTotalScores.ServiceScore.Score,
Text: ShopTotalScores.ServiceScore.Text,
},
}
}

var tmp = TikTokGoods{


Caricamento…
Annulla
Salva