1
This commit is contained in:
@@ -813,16 +813,14 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
|
|||||||
}
|
}
|
||||||
successList := putils.UnselectStoreSkuSyncListByVendorSkuIDs(batchedStoreSkuList, GetVendorSkuIDList(failedList))
|
successList := putils.UnselectStoreSkuSyncListByVendorSkuIDs(batchedStoreSkuList, GetVendorSkuIDList(failedList))
|
||||||
if len(successList) > 0 {
|
if len(successList) > 0 {
|
||||||
_, err := updateStoreSku(dao.GetDB(), vendorID, successList, model.SyncFlagNewMask)
|
_, err = updateStoreSku(dao.GetDB(), vendorID, successList, model.SyncFlagNewMask)
|
||||||
if err != nil {
|
|
||||||
globals.SugarLogger.Debugf("20.sth wrong on updateStoreSku: %v", err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if vendorID == model.VendorIDDD {
|
||||||
|
_, err = updateStoreSku(dao.GetDB(), vendorID, batchedStoreSkuList, model.SyncFlagNewMask)
|
||||||
}
|
}
|
||||||
return nil, len(successList), err
|
return nil, len(successList), err
|
||||||
}, ctx, task, createList, singleStoreHandler.GetStoreSkusBatchSize(partner.FuncUpdateStoreSkus), isContinueWhenError2)
|
}, ctx, task, createList, singleStoreHandler.GetStoreSkusBatchSize(partner.FuncUpdateStoreSkus), isContinueWhenError2)
|
||||||
if err != nil {
|
|
||||||
globals.SugarLogger.Debug("create sku wrong on :", err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
if len(updateList) > 0 {
|
if len(updateList) > 0 {
|
||||||
|
|||||||
@@ -318,8 +318,7 @@ func UnselectStoreSkuSyncListByVendorSkuIDs(storeSkuList []*dao.StoreSkuSyncInfo
|
|||||||
if len(vendorSkuIDs) > 0 {
|
if len(vendorSkuIDs) > 0 {
|
||||||
vendorSkuIDMap := jxutils.StringList2Map(vendorSkuIDs)
|
vendorSkuIDMap := jxutils.StringList2Map(vendorSkuIDs)
|
||||||
for _, v := range storeSkuList {
|
for _, v := range storeSkuList {
|
||||||
//if vendorSkuIDMap[v.VendorSkuID] == 0 {
|
if vendorSkuIDMap[v.VendorSkuID] == 0 {
|
||||||
if vendorSkuIDMap[v.VendorSkuID] == 0 || v.VendorID == model.VendorIDDD { // 抖音商品失败之后也当做成功,更新失败原因已经同步状态,防止定时任务一直更新(图片,经营类目等错误)
|
|
||||||
selectedStoreSkuList = append(selectedStoreSkuList, v)
|
selectedStoreSkuList = append(selectedStoreSkuList, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user