This commit is contained in:
邹宗楠
2022-10-27 21:00:41 +08:00
parent fd78d2e566
commit 30f5f592f2

View File

@@ -183,8 +183,11 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
// 根据本地商品id获取线上商品是否存在,存在则只创建子商品
var tiktokResultProductId int64 = 0
// 获取本地存储映射关系
globals.SugarLogger.Debugf("=======storeSku.SkuID :%d", storeSku.SkuID)
globals.SugarLogger.Debugf("=======storeSku :%s", utils.Format4Output(storeSku, false))
localThing, err := dao.GetThingToTiktokMapList(dao.GetDB(), model.VendorIDDD, int64(storeSku.SkuID))
globals.SugarLogger.Debugf("=======localThing :%s", utils.Format4Output(localThing, false))
globals.SugarLogger.Debugf("=======localThing :%s", utils.Format4Output(localThing, false))
globals.SugarLogger.Debugf("localThing=======err :%s", err)
if len(localThing) == 0 { // 线上不存在创建
tiktokResult, err := api.CreateStoreCommodity(param) // 创建主商品