This commit is contained in:
gazebo
2018-09-17 17:51:36 +08:00
parent 764bc0b7b3
commit 8f11160fa5
2 changed files with 4 additions and 2 deletions

View File

@@ -241,9 +241,11 @@ func UpdateStore(storeID int, payload map[string]interface{}, userName string) (
}
func CreateStore(store *model.Store, userName string) (id int, err error) {
db := dao.GetDB()
dao.WrapAddIDCULEntity(store, userName)
if err = dao.CreateEntity(nil, store); err == nil {
return store.ID, nil
err = CurVendorSync.SyncStore(db, -1, store, false, userName)
return store.ID, err
}
return 0, err
}