huangjiajun před 11 měsíci
rodič
revize
b044d7c14e
2 změnil soubory, kde provedl 16 přidání a 4 odebrání
  1. +13
    -4
      chain_transfer/svc/svc_turnchain.go
  2. +3
    -0
      chain_transfer/turn_chain.go

+ 13
- 4
chain_transfer/svc/svc_turnchain.go Zobrazit soubor

@@ -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 "", "", "", ""
}


+ 3
- 0
chain_transfer/turn_chain.go Zobrazit soubor

@@ -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"]


Načítá se…
Zrušit
Uložit