- up
This commit is contained in:
@@ -145,7 +145,7 @@ func FullSyncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
|
||||
if singleStoreHandler != nil {
|
||||
_, err = SyncStoreSkuNew(ctx, task, vendorID, storeID, vendorStoreID, nil, nil, false, isContinueWhenError)
|
||||
} else {
|
||||
err = syncStoreSkuNew(ctx, task, false, vendorID, storeID, nil, nil, isContinueWhenError)
|
||||
err = syncStoreSkuNew(ctx, task, true, vendorID, storeID, nil, nil, isContinueWhenError)
|
||||
}
|
||||
}
|
||||
return retVal, err
|
||||
@@ -277,7 +277,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
|
||||
createList = append(createList, sku)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if !dao.IsVendorThingIDEmpty(sku.VendorSkuID) {
|
||||
if model.IsSyncStatusUpdate(sku.StoreSkuSyncStatus) {
|
||||
if singleStoreHandler != nil {
|
||||
updateList = append(updateList, calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage)))
|
||||
@@ -347,7 +347,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
|
||||
case 3:
|
||||
if len(stockList) > 0 {
|
||||
_, err = putils.FreeBatchStoreSkuInfo(func(batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, err error) {
|
||||
if err = storeSkuHandler.UpdateStoreSkusStock(ctx, storeID, vendorStoreID, stockList); err == nil {
|
||||
if err = storeSkuHandler.UpdateStoreSkusStock(ctx, storeID, vendorStoreID, batchedStoreSkuList); err == nil {
|
||||
_, err = updateStoreSku(dao.GetDB(), vendorID, bareSku2Sync(batchedStoreSkuList), model.SyncFlagModifiedMask) // ?
|
||||
}
|
||||
return nil, err
|
||||
@@ -356,7 +356,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
|
||||
case 4:
|
||||
if len(statusList) > 0 {
|
||||
_, err = putils.FreeBatchStoreSkuInfo(func(batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, err error) {
|
||||
if err = storeSkuHandler.UpdateStoreSkusStatus(ctx, storeID, vendorStoreID, statusList); err == nil {
|
||||
if err = storeSkuHandler.UpdateStoreSkusStatus(ctx, storeID, vendorStoreID, batchedStoreSkuList); err == nil {
|
||||
_, err = updateStoreSku(dao.GetDB(), vendorID, bareSku2Sync(batchedStoreSkuList), model.SyncFlagSaleMask)
|
||||
}
|
||||
return nil, err
|
||||
@@ -365,7 +365,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
|
||||
case 5:
|
||||
if len(priceList) > 0 {
|
||||
_, err = putils.FreeBatchStoreSkuInfo(func(batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, err error) {
|
||||
if err = storeSkuHandler.UpdateStoreSkusPrice(ctx, storeID, vendorStoreID, priceList); err == nil {
|
||||
if err = storeSkuHandler.UpdateStoreSkusPrice(ctx, storeID, vendorStoreID, batchedStoreSkuList); err == nil {
|
||||
_, err = updateStoreSku(dao.GetDB(), vendorID, bareSku2Sync(batchedStoreSkuList), model.SyncFlagPriceMask)
|
||||
}
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user