Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop

This commit is contained in:
richboo111
2023-02-06 17:47:00 +08:00
5 changed files with 69 additions and 37 deletions

View File

@@ -209,6 +209,9 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
storeSku.VendorSonSkuID = utils.Int2Str(storeSku.SkuID) // 还没同步子商品
failedList = putils.GetErrMsg2FailedSingleList(storeSku, errors.New("只创建了主商品,没创建子商品"), storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
} else if localThing[0].SyncStatus == model.ThingTypeSyncing {
if time.Now().Unix()-localThing[0].CreatedAt.Unix() > 300 {
dao.DeleteThingToTiktokMapList(model.VendorIDDD, localThing[0].VendorThingID, storeSku.SkuID)
}
continue
} else if localThing[0].SyncStatus == model.ThingTypeSyncSuccess {
// 主商品存在,直接同步子商品
@@ -258,6 +261,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
}
if (err != nil || childrenProductId == 0) && !strings.Contains(err.Error(), "2010001") { // 2010001:重复创建渠道商品,就去更新
failedList = putils.GetErrMsg2FailedSingleList(storeSku, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
continue
}