- avoid set store_sku_bind syncstatus when not changing StoreMap.PricePercentage

This commit is contained in:
gazebo
2018-12-21 10:00:49 +08:00
parent 4b78cd1db0
commit bf3463aee8

View File

@@ -447,12 +447,14 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
})
}
if err == nil && num > 0 {
if valid["pricePercentage"] != nil {
storeSkuBind := &model.StoreSkuBind{}
if num, err = dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, storeSkuBind, nil, userName, map[string]interface{}{
model.FieldStoreID: storeID,
}, dao.GetSyncStatusStructField(model.VendorNames[vendorID])); err != nil {
return 0, err
}
}
dao.Commit(db)
if valid["status"] != nil {
_, err = CurVendorSync.SyncStore(ctx, db, vendorID, storeID, false, userName)