|
|
@@ -27,9 +27,10 @@ import ( |
|
|
|
) |
|
|
|
|
|
|
|
//转链主入口 |
|
|
|
func TurnChainFeatures(eg *xorm.Engine, dbName string, tikTokBase map[string]string, user *model.User) (*md.ConvertedUrls, error) { |
|
|
|
func TurnChainFeatures(eg *xorm.Engine, tikTokBase map[string]string, user *model.User) (*md.ConvertedUrls, error) { |
|
|
|
pvd := tikTokBase["pvd"] |
|
|
|
goodsId := tikTokBase["goodsId"] |
|
|
|
dbName := tikTokBase["master_id"] |
|
|
|
goodsId := tikTokBase["gid"] |
|
|
|
var ( |
|
|
|
//cfg map[string]string |
|
|
|
err error |
|
|
@@ -420,7 +421,11 @@ func CommGetGoods(eg *xorm.Engine, officialEg *xorm.Engine, tmp map[string]strin |
|
|
|
tikTokBase["gid"] = goodsId |
|
|
|
tikTokBase["pvd"] = pvd |
|
|
|
user, _ := db.UserFindByID(eg, tmp["uid"]) |
|
|
|
urls, err = TurnChainFeatures(eg, tmp["master_id"], tikTokBase, user) |
|
|
|
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 |
|
|
|
} |
|
|
@@ -559,7 +564,11 @@ func FindTaobaoWord(eg *xorm.Engine, officialEg *xorm.Engine, tmp map[string]str |
|
|
|
goodsId = split1[0] |
|
|
|
tikTokBase["gid"] = goodsId |
|
|
|
tikTokBase["pvd"] = pvd |
|
|
|
urls, err := TurnChainFeatures(eg, dbName, tikTokBase, user) |
|
|
|
for k1, v1 := range tmp { |
|
|
|
tikTokBase[k1] = v1 |
|
|
|
} |
|
|
|
tikTokBase["itemUrl"] = reqCount |
|
|
|
urls, err := TurnChainFeatures(eg, tikTokBase, user) |
|
|
|
if err != nil || urls == nil { |
|
|
|
return "", "", "", "" |
|
|
|
} |
|
|
|