|
@@ -468,35 +468,34 @@ func CommGetGoods(eg *xorm.Engine, officialEg *xorm.Engine, tmp map[string]strin |
|
|
urls.TaoBaoWord = tklWord |
|
|
urls.TaoBaoWord = tklWord |
|
|
} else { |
|
|
} else { |
|
|
if goods != nil { |
|
|
if goods != nil { |
|
|
//通过商品id转链 |
|
|
|
|
|
tikTokBase := make(map[string]string) |
|
|
|
|
|
tikTokBase["gid"] = goods.GoodID |
|
|
|
|
|
if goods.GoodID == "" { |
|
|
|
|
|
tikTokBase["gid"] = goodsId |
|
|
|
|
|
} |
|
|
|
|
|
tikTokBase["pvd"] = pvd |
|
|
|
|
|
user, _ := db.UserFindByID(eg, tmp["uid"]) |
|
|
|
|
|
for k1, v1 := range tmp { |
|
|
|
|
|
tikTokBase[k1] = v1 |
|
|
|
|
|
} |
|
|
|
|
|
tikTokBase["itemUrl"] = countUrl |
|
|
|
|
|
urls, err = TurnChainFeatures(eg, tikTokBase, user) |
|
|
|
|
|
if err != nil || urls == nil { |
|
|
|
|
|
return tcPrase, reqCount |
|
|
|
|
|
} |
|
|
|
|
|
if pvd == md.PVD_TIKTOK && urls.Content != "" { |
|
|
|
|
|
urls.TaoBaoWord = urls.Content |
|
|
|
|
|
tklWord = urls.Content |
|
|
|
|
|
|
|
|
if goods.ClickUrl != "" { |
|
|
|
|
|
urls.ShortenURL = goods.ClickUrl |
|
|
|
|
|
urls.URL = goods.ClickUrl |
|
|
|
|
|
} else { |
|
|
|
|
|
//通过商品id转链 |
|
|
|
|
|
tikTokBase := make(map[string]string) |
|
|
|
|
|
tikTokBase["gid"] = goods.GoodID |
|
|
|
|
|
if goods.GoodID == "" { |
|
|
|
|
|
tikTokBase["gid"] = goodsId |
|
|
|
|
|
} |
|
|
|
|
|
tikTokBase["pvd"] = pvd |
|
|
|
|
|
user, _ := db.UserFindByID(eg, tmp["uid"]) |
|
|
|
|
|
for k1, v1 := range tmp { |
|
|
|
|
|
tikTokBase[k1] = v1 |
|
|
|
|
|
} |
|
|
|
|
|
tikTokBase["itemUrl"] = countUrl |
|
|
|
|
|
urls, err = TurnChainFeatures(eg, tikTokBase, user) |
|
|
|
|
|
if err != nil || urls == nil { |
|
|
|
|
|
return tcPrase, reqCount |
|
|
|
|
|
} |
|
|
|
|
|
if pvd == md.PVD_TIKTOK && urls.Content != "" { |
|
|
|
|
|
urls.TaoBaoWord = urls.Content |
|
|
|
|
|
tklWord = urls.Content |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
//if countUrl != "" && isEnd == "" { |
|
|
|
|
|
// curls, _ := svc.OfficialRecommendUrl(c, newPvd, 1, 0, 0, 0, "", "1", user, 0, countUrl) |
|
|
|
|
|
// if curls == nil { |
|
|
|
|
|
// return tcPrase, reqCount |
|
|
|
|
|
// } |
|
|
|
|
|
// urls.ShortenURL = curls.Url |
|
|
|
|
|
//} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
fmt.Println("======================这里2", time.Since(now)) |
|
|
fmt.Println("======================这里2", time.Since(now)) |
|
|
|
|
|
|
|
|