- 修复美团外卖暂不创建时(不可售),的同步逻辑(空操作,但保留新建状态)

This commit is contained in:
gazebo
2019-05-23 11:49:04 +08:00
parent c8d57d0808
commit 2ed01a9b36

View File

@@ -318,6 +318,9 @@ func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasks
}
}
}
} else {
// 暂不创建
updateFields = nil
}
} else {
if skuItem.SkuSyncStatus&(model.SyncFlagSaleMask) != 0 {
@@ -330,7 +333,9 @@ func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasks
}
}
if err == nil {
_, err = dao.UpdateEntity(db, storeSkuBind, updateFields...)
if len(updateFields) > 0 {
_, err = dao.UpdateEntity(db, storeSkuBind, updateFields...)
}
}
return nil, err
}, skus)