- AddStoreVendorMap同步失败后回滚本地数据
This commit is contained in:
@@ -796,7 +796,6 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID
|
||||
}
|
||||
}()
|
||||
if err = dao.CreateEntity(db, storeMap); err == nil {
|
||||
dao.Commit(db)
|
||||
outStoreMap = storeMap
|
||||
if store != nil {
|
||||
_, err = CurVendorSync.SyncStore(ctx, db, storeMap.VendorID, storeID, false, userName)
|
||||
@@ -804,6 +803,8 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID
|
||||
}
|
||||
if err != nil {
|
||||
dao.Rollback(db)
|
||||
} else {
|
||||
dao.Commit(db)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user