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

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 { } else {
if skuItem.SkuSyncStatus&(model.SyncFlagSaleMask) != 0 { if skuItem.SkuSyncStatus&(model.SyncFlagSaleMask) != 0 {
@@ -330,8 +333,10 @@ func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasks
} }
} }
if err == nil { if err == nil {
if len(updateFields) > 0 {
_, err = dao.UpdateEntity(db, storeSkuBind, updateFields...) _, err = dao.UpdateEntity(db, storeSkuBind, updateFields...)
} }
}
return nil, err return nil, err
}, skus) }, skus)
if parentTask != nil { if parentTask != nil {