ソースを参照

add reverse:for v1.0.2 更新

tags/v1.0.2
huangjiajun 2年前
コミット
f9e6028800
2個のファイルの変更44行の追加17行の削除
  1. +26
    -16
      tik_tok/md_tik_tok_goods.go
  2. +18
    -1
      tik_tok/svc_tik_tok_goods.go

+ 26
- 16
tik_tok/md_tik_tok_goods.go ファイルの表示

@@ -1,21 +1,21 @@
package tik_tok

type TikTokGoods struct {
Commission string `json:"commission"`
CostPrice string `json:"cost_price"`
DetailURL string `json:"detail_url"`
GoodsID string `json:"goods_id"`
GoodsImg string `json:"goods_img"`
GoodsSales string `json:"goods_sales"`
GoodsTitle string `json:"goods_title"`
Imgs []string `json:"imgs"`
InStock string `json:"in_stock"`
Price string `json:"price"`
Sharable string `json:"sharable"`
ShopID string `json:"shop_id"`
ShopName string `json:"shop_name"`
ShopTotalScore string `json:"shop_total_score"`
YhqPrice string `json:"yhq_price"`
Commission string `json:"commission"`
CostPrice string `json:"cost_price"`
DetailURL string `json:"detail_url"`
GoodsID string `json:"goods_id"`
GoodsImg string `json:"goods_img"`
GoodsSales string `json:"goods_sales"`
GoodsTitle string `json:"goods_title"`
Imgs []string `json:"imgs"`
InStock string `json:"in_stock"`
Price string `json:"price"`
Sharable string `json:"sharable"`
ShopID string `json:"shop_id"`
ShopName string `json:"shop_name"`
ShopTotalScore ShopTotalScore1 `json:"shop_total_score"`
YhqPrice string `json:"yhq_price"`
}

type TikTokGoodsLm struct {
@@ -39,7 +39,7 @@ type TikTokGoodsLm struct {
ShopTotalScore ShopTotalScore `json:"shop_total_score"`
}
type ShopTotalScoreData struct {
Level string `json:"level"`
Level int `json:"level"`
Score string `json:"score"`
Text string `json:"text"`
}
@@ -48,6 +48,16 @@ type ShopTotalScore struct {
ProductScore ShopTotalScoreData `json:"product_score"`
ServiceScore ShopTotalScoreData `json:"service_score"`
}
type ShopTotalScoreData1 struct {
Level string `json:"level"`
Score string `json:"score"`
Text string `json:"text"`
}
type ShopTotalScore1 struct {
LogisticsScore ShopTotalScoreData1 `json:"logistics_score"`
ProductScore ShopTotalScoreData1 `json:"product_score"`
ServiceScore ShopTotalScoreData1 `json:"service_score"`
}
type TikTokLive struct {
LiveId string `json:"live_id"`
Name string `json:"name"`


+ 18
- 1
tik_tok/svc_tik_tok_goods.go ファイルの表示

@@ -117,6 +117,23 @@ 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,
},
}

var tmp = TikTokGoods{
Commission: zhios_third_party_utils.AnyToString(goods.CosRatio),
@@ -132,7 +149,7 @@ func CommGoodsDetail(goods TikTokGoodsLm) TikTokGoods {
Sharable: zhios_third_party_utils.AnyToString(goods.Sharable),
ShopID: zhios_third_party_utils.AnyToString(goods.ShopID),
ShopName: zhios_third_party_utils.AnyToString(goods.ShopName),
ShopTotalScore: zhios_third_party_utils.AnyToString(goods.ShopTotalScore),
ShopTotalScore: ShopTotalScore,
YhqPrice: "0",
}
if zhios_third_party_utils.StrToFloat64(tmp.Price) == 0 {


読み込み中…
キャンセル
保存