同步错误补全

This commit is contained in:
苏尹岚
2020-01-10 15:35:01 +08:00
parent 774a91afd9
commit c3cb93f10f

View File

@@ -369,6 +369,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
reorderSkuMap = make(map[string][]*dao.StoreSkuSyncInfo)
}
now := jxutils.OperationTime2HourMinuteFormat(time.Now())
var failedList []*partner.StoreSkuInfoWithErr
for _, sku := range skus {
if !useVendorPriceDirectly &&
!isSkuLockTimeValid(sku) {
@@ -417,10 +418,12 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
} else {
if dao.IsVendorThingIDEmpty(sku.VendorSkuID) {
err = fmt.Errorf("门店:%d修改没有创建的商品:%d", storeID, sku.SkuID)
failedList = putils.GetErrMsg2FailedSingleList(nil, err, storeID, vendorID, "异常同步错误")
if parentTask == nil {
return err
}
parentTask.AddBatchErr(err)
parentTask.AddFailedList(failedList)
} else {
isAdded2Update := false
// 修改商品信息时不改价(以免活动引起的失败),而用单独的改价来改