This commit is contained in:
gazebo
2018-09-17 19:02:55 +08:00
parent b1eb5325c7
commit e2caafc4c9
2 changed files with 19 additions and 5 deletions

View File

@@ -85,11 +85,8 @@ func (v *VendorSync) SyncStore(db *dao.DaoDB, vendorID int, store *model.Store,
storeMap := batchItemList[0].(*model.StoreMap)
globals.SugarLogger.Debugf("SyncStore, storeMap:%s", utils.Format4Output(store, true))
if (vendorID == -1 || vendorID == storeMap.VendorID) && (isForce || storeMap.SyncStatus != 0) {
globals.SugarLogger.Debug("f2")
if handler := GetPurchaseHandler(storeMap.VendorID); handler != nil {
globals.SugarLogger.Debug("f3")
if err = handler.UpdateStore(store.ID, userName); err == nil {
globals.SugarLogger.Debug("f4")
storeMap.SyncStatus = 0
_, err = dao.UpdateEntity(db, storeMap, model.FieldSyncStatus)
}