- keep store.id when CreateStore.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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决定
|
||||
|
||||
Reference in New Issue
Block a user