diff --git a/chain_transfer/svc/svc_turnchain.go b/chain_transfer/svc/svc_turnchain.go index 30cffda..7cb1b30 100644 --- a/chain_transfer/svc/svc_turnchain.go +++ b/chain_transfer/svc/svc_turnchain.go @@ -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 "", "", "", "" } diff --git a/chain_transfer/turn_chain.go b/chain_transfer/turn_chain.go index d22a05c..fa6abed 100644 --- a/chain_transfer/turn_chain.go +++ b/chain_transfer/turn_chain.go @@ -129,6 +129,9 @@ func TurnChain(eg *xorm.Engine, officialEg *xorm.Engine, args map[string]string) if len(split) == 2 { split1 := strings.Split(split[1], "&") if len(split1) > 0 { + for k1, v1 := range tikTokBase { + args[k1] = v1 + } tcPrase, reqCount = svc.CommGetGoods(eg, officialEg, args, tcPrase, isFirst, reqCount, md.PVD_TIKTOK, split1[0], v, tklWord, "0") if zhios_third_party_utils.StrToInt(tikTokBase["tik_activity_id"]) > 0 && strings.Contains(tcPrase.GID, "cid") == false { tcPrase.GID += "cid" + tikTokBase["tik_activity_id"]