- keep store.id when CreateStore.

This commit is contained in:
gazebo
2018-09-25 11:35:50 +08:00
parent 604f232e60
commit 543e469eeb
2 changed files with 3 additions and 1 deletions

View File

@@ -211,7 +211,9 @@ func UpdateStore(storeID int, payload map[string]interface{}, userName string) (
}
func CreateStore(store *model.Store, userName string) (id int, err error) {
existingID := store.ID
dao.WrapAddIDCULDEntity(store, userName)
store.ID = existingID
if err = dao.CreateEntity(nil, store); err == nil {
return store.ID, err
}

View File

@@ -154,7 +154,7 @@ type SkuName struct {
Name string `orm:"size(255);index" json:"name"`
Comment string `orm:"size(255)" json:"comment"`
BrandID int `orm:"column(brand_id);default(0)" json:"brandID"` // 此属性暂时没有使用
BrandID int `orm:"column(brand_id);default(0)" json:"brandID"` // todo此属性暂时没有使用且有问题应该是不同平台都有一个brandid
CategoryID int `orm:"column(category_id);index" json:"categoryID"` // 标准类别
IsGlobal int8 `orm:"default(1)" json:"isGlobal"` // 是否是全部全国可见如果否的话可见性由SkuPlace决定