diff --git a/chain_transfer/svc/svc_turnchain.go b/chain_transfer/svc/svc_turnchain.go index 3825ca2..75cbb86 100644 --- a/chain_transfer/svc/svc_turnchain.go +++ b/chain_transfer/svc/svc_turnchain.go @@ -27,7 +27,7 @@ import ( "xorm.io/xorm" ) -//转链主入口 +// 转链主入口 func TurnChainFeatures(eg *xorm.Engine, officialEg, zhimengEg *xorm.Engine, tikTokBase map[string]string, user *model.User) (*md.ConvertedUrls, error) { pvd := tikTokBase["pvd"] dbName := tikTokBase["master_id"] @@ -130,7 +130,7 @@ func TBOrTmTurnChain(eg *xorm.Engine, officialEg, zhimengEg *xorm.Engine, dbName return urls, nil } -//京东转链 +// 京东转链 func JDTurnChain(eg *xorm.Engine, dbName string, args map[string]string) (*md.ConvertedUrls, error) { pid := args["acc_jd_share_id"] urls, err := cps_jd.JdUrl(eg, dbName, args["uid"], "3", db.SysCfgGetWithDb(eg, dbName, md.KEY_CFG_ZM_AK), @@ -146,7 +146,7 @@ func JDTurnChain(eg *xorm.Engine, dbName string, args map[string]string) (*md.Co return urls, nil } -//pdd转链 +// pdd转链 func PDDTurnChain(eg *xorm.Engine, dbName string, args map[string]string) (*md.ConvertedUrls, error) { pid := args["acc_pdd_self_id"] union, _ := db.SysUnionByPVDByUse(eg, dbName, "pdd") @@ -604,6 +604,12 @@ func CommGetGoods(eg *xorm.Engine, officialEg, zhimengEg *xorm.Engine, tmp map[s for k1, v1 := range tmp { tikTokBase[k1] = v1 } + if pvd == md.PVD_PDD { + tikTokBase["gid"] = goods.GoodID + if goods.GoodID == "" { + tikTokBase["gid"] = goodsId + } + } tikTokBase["itemUrl"] = countUrl urls, err = TurnChainFeatures(eg, officialEg, zhimengEg, tikTokBase, user) if err != nil || urls == nil { @@ -725,7 +731,7 @@ func WordDeal(eg *xorm.Engine, dbName string, word *md.TaobaoWord) string { return taoBaoWord } -//淘口令判断 +// 淘口令判断 func FindTaobaoWord(eg *xorm.Engine, officialEg, zhimengEg *xorm.Engine, tmp map[string]string, reqCount string, user *model.User) (pvd, goodsId, tklWord, url string) { dbName := tmp["master_id"] if strings.Contains(reqCount, "haohuo.jinritemai.") { @@ -1183,7 +1189,7 @@ func CheckKuaishouWord(eg *xorm.Engine, officialEg, zhimengEg *xorm.Engine, dbNa } -//获取商品主入口 +// 获取商品主入口 func ProcessTurnChainByGoodsId(eg *xorm.Engine, officialEg *xorm.Engine, tmp map[string]string, goodsId, pvd, url string) (productDetail *md.ProductDetailResponse, productPvd, itemUrl, couponShareURL, couponAmount, couponUrl, couponPrice string, resMd *md.MoreDetailResponse) { mdData := &md.MoreDetailResponse{} switch pvd {