1
This commit is contained in:
@@ -152,13 +152,14 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
|
|
||||||
if len(localThing) == 0 {
|
if len(localThing) == 0 {
|
||||||
param, failedList2 := makeMainProductSku(db, api, storeSku, storeDetail, storeID, vendorStoreID, syncType)
|
param, failedList2 := makeMainProductSku(db, api, storeSku, storeDetail, storeID, vendorStoreID, syncType)
|
||||||
globals.SugarLogger.Debugf("====================param := %s", utils.Format4Output(param, false))
|
|
||||||
if len(failedList2) != 0 {
|
if len(failedList2) != 0 {
|
||||||
storeSku.SkuSyncStatus = model.SyncFlagNewMask // 只创建主品,子品都没做
|
storeSku.SkuSyncStatus = model.SyncFlagNewMask // 只创建主品,子品都没做
|
||||||
failedList = append(failedList, failedList2...)
|
failedList = append(failedList, failedList2...)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
tiktokResult, err := api.CreateStoreCommodity(param) // 创建主商品,同步主商品
|
tiktokResult, err := api.CreateStoreCommodity(param) // 创建主商品,同步主商品
|
||||||
|
globals.SugarLogger.Debugf("========tiktokResult := %s", utils.Format4Output(tiktokResult, false))
|
||||||
|
globals.SugarLogger.Debugf("========err := %s", err)
|
||||||
if err != nil && strings.Contains(err.Error(), "outProductId或者outerProductId已经存在") { // 主品以创建但是未返回出来
|
if err != nil && strings.Contains(err.Error(), "outProductId或者outerProductId已经存在") { // 主品以创建但是未返回出来
|
||||||
mainProductDetail, _ := api.GetSkuDetail("", utils.Int2Str(storeSku.SkuID))
|
mainProductDetail, _ := api.GetSkuDetail("", utils.Int2Str(storeSku.SkuID))
|
||||||
if mainProductDetail != nil || mainProductDetail.ProductId != 0 {
|
if mainProductDetail != nil || mainProductDetail.ProductId != 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user