Преглед изворни кода

add reverse:for v1.1.0 更新

tags/v1.1.0
huangjiajun пре 2 година
родитељ
комит
3e20eb7791
3 измењених фајлова са 58 додато и 50 уклоњено
  1. +39
    -34
      tik_tok/md_tik_tok_goods.go
  2. +18
    -15
      tik_tok/svc_tik_tok_goods.go
  3. +1
    -1
      tik_tok/svc_tik_tok_team.go

+ 39
- 34
tik_tok/md_tik_tok_goods.go Прегледај датотеку

@@ -1,43 +1,48 @@
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 ShopTotalScore1 `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"`
Cid string `json:"cid"`
ActivityStartTime string `json:"activity_start_time"`
ActivityEndTime string `json:"activity_end_time"`
}

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"`
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:"activity_start_time"`
ActivityEndTime string `json:"activity_end_time"`
Imgs []string `json:"imgs"`
ShopTotalScore ShopTotalScore `json:"shop_total_score"`
}
type ShopTotalScoreData struct {
Level int `json:"level"`


+ 18
- 15
tik_tok/svc_tik_tok_goods.go Прегледај датотеку

@@ -137,21 +137,24 @@ func CommGoodsDetail(goods TikTokGoodsLm) TikTokGoods {
}

var tmp = TikTokGoods{
Commission: zhios_third_party_utils.AnyToString(goods.CosRatio),
CostPrice: zhios_third_party_utils.Float64ToStr(zhios_third_party_utils.AnyToFloat64(goods.Price) / 100),
DetailURL: zhios_third_party_utils.AnyToString(goods.DetailURL),
GoodsID: zhios_third_party_utils.AnyToString(goods.ProductID),
GoodsImg: zhios_third_party_utils.AnyToString(goods.Cover),
GoodsSales: zhios_third_party_utils.AnyToString(goods.Sales),
GoodsTitle: zhios_third_party_utils.AnyToString(goods.Title),
Imgs: goods.Imgs,
InStock: zhios_third_party_utils.AnyToString(goods.InStock),
Price: zhios_third_party_utils.Float64ToStr(zhios_third_party_utils.AnyToFloat64(goods.CouponPrice) / 100),
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: ShopTotalScore,
YhqPrice: "0",
Commission: zhios_third_party_utils.AnyToString(goods.CosRatio),
CostPrice: zhios_third_party_utils.Float64ToStr(zhios_third_party_utils.AnyToFloat64(goods.Price) / 100),
DetailURL: zhios_third_party_utils.AnyToString(goods.DetailURL),
GoodsID: zhios_third_party_utils.AnyToString(goods.ProductID),
GoodsImg: zhios_third_party_utils.AnyToString(goods.Cover),
GoodsSales: zhios_third_party_utils.AnyToString(goods.Sales),
GoodsTitle: zhios_third_party_utils.AnyToString(goods.Title),
Imgs: goods.Imgs,
InStock: zhios_third_party_utils.AnyToString(goods.InStock),
Price: zhios_third_party_utils.Float64ToStr(zhios_third_party_utils.AnyToFloat64(goods.CouponPrice) / 100),
Sharable: zhios_third_party_utils.AnyToString(goods.Sharable),
ShopID: zhios_third_party_utils.AnyToString(goods.ShopID),
ShopName: zhios_third_party_utils.AnyToString(goods.ShopName),
Cid: zhios_third_party_utils.AnyToString(goods.FirstCid),
ActivityStartTime: goods.ActivityStartTime,
ActivityEndTime: goods.ActivityEndTime,
ShopTotalScore: ShopTotalScore,
YhqPrice: "0",
}
if zhios_third_party_utils.StrToFloat64(tmp.Price) == 0 {
tmp.Price = tmp.CostPrice


+ 1
- 1
tik_tok/svc_tik_tok_team.go Прегледај датотеку

@@ -44,7 +44,7 @@ func ActivityProduct(args map[string]string) []TikTokGoods {
// "sort_type": "1",
// "page": "1",
// "count": "1",
// "product_info": "3570614033394612291",
// "product_info": "3448990760731595786",
// "status": "1",
// "acctoken": "ff1a797c-a088-47bf-8c31-9784fa630c5e",
//}


Loading…
Откажи
Сачувај