- add param valueMask to UpdateEntityLogicallyAndUpdateSyncStatus

- judge change content in UpdateSku
- support change sku spec
This commit is contained in:
gazebo
2019-01-31 09:46:23 +08:00
parent a0cecdc4c6
commit d420aa68fe
6 changed files with 25 additions and 15 deletions

View File

@@ -387,7 +387,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
dummy := &model.StoreMap{}
_, err2 := dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, dummy, nil, userName, map[string]interface{}{
model.FieldStoreID: store.ID,
}, model.FieldSyncStatus)
}, model.FieldSyncStatus, model.SyncFlagModifiedMask)
if err = err2; err == nil {
dao.Commit(db)
_, err = CurVendorSync.SyncStore(ctx, db, -1, store.ID, false, userName)
@@ -530,7 +530,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
num, err = dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, storeMap, valid, userName, map[string]interface{}{
model.FieldStoreID: storeID,
model.FieldVendorID: vendorID,
}, model.FieldSyncStatus)
}, model.FieldSyncStatus, model.SyncFlagModifiedMask)
} else {
num, err = dao.UpdateEntityLogically(db, storeMap, valid, userName, map[string]interface{}{
model.FieldStoreID: storeID,
@@ -542,7 +542,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
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 {
}, dao.GetSyncStatusStructField(model.VendorNames[vendorID]), model.SyncFlagModifiedMask); err != nil {
return 0, err
}
}