去掉SkuCategoryWithVendor

This commit is contained in:
gazebo
2019-12-06 09:41:11 +08:00
parent 61eed7f9e2
commit 9c2c65d266
6 changed files with 42 additions and 33 deletions

View File

@@ -161,9 +161,9 @@ type IMultipleStoresHandler interface {
DeleteCategory(db *dao.DaoDB, cat *model.SkuCategory, userName string) error
ReorderCategories(db *dao.DaoDB, parentCatID int, userName string) (err error)
CreateCategory2(ctx *jxcontext.Context, cat *dao.SkuCategoryWithVendor) (err error)
UpdateCategory2(ctx *jxcontext.Context, cat *dao.SkuCategoryWithVendor) (err error)
DeleteCategory2(ctx *jxcontext.Context, cat *dao.SkuCategoryWithVendor) (err error)
CreateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error)
UpdateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error)
DeleteCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error)
ReorderCategories2(ctx *jxcontext.Context, vendorOrgCode, vendorParentCatID string, vendorCatIDList []string) (err error)
// sku

View File

@@ -149,9 +149,9 @@ func (p *PurchaseHandler) ReorderCategories(db *dao.DaoDB, parentCatID int, user
return err
}
func (p *PurchaseHandler) CreateCategory2(ctx *jxcontext.Context, cat *dao.SkuCategoryWithVendor) (err error) {
func (p *PurchaseHandler) CreateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
if globals.EnableJdStoreWrite {
result, err2 := getAPI(cat.VendorOrgCode).AddShopCategory(utils.Str2Int64(cat.VendorParentCatID), cat.Name, int(cat.Level), cat.Seq, ctx.GetUserName())
result, err2 := getAPI(cat.VendorOrgCode).AddShopCategory(utils.Str2Int64(cat.ParentVendorCatID), cat.Name, int(cat.Level), cat.Seq, ctx.GetUserName())
if err = err2; err == nil {
if jdID := utils.Str2Int64WithDefault(result, 0); jdID != 0 {
cat.VendorCatID = utils.Int64ToStr(jdID)
@@ -163,14 +163,14 @@ func (p *PurchaseHandler) CreateCategory2(ctx *jxcontext.Context, cat *dao.SkuCa
return err
}
func (p *PurchaseHandler) UpdateCategory2(ctx *jxcontext.Context, cat *dao.SkuCategoryWithVendor) (err error) {
func (p *PurchaseHandler) UpdateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
if globals.EnableJdStoreWrite {
err = getAPI(cat.VendorOrgCode).UpdateShopCategory(utils.Str2Int64(cat.VendorCatID), cat.Name)
}
return err
}
func (p *PurchaseHandler) DeleteCategory2(ctx *jxcontext.Context, cat *dao.SkuCategoryWithVendor) (err error) {
func (p *PurchaseHandler) DeleteCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
if globals.EnableJdStoreWrite {
err = getAPI(cat.VendorOrgCode).DelShopCategory(utils.Str2Int64(cat.VendorCatID))
}

View File

@@ -30,15 +30,15 @@ func (p *PurchaseHandler) ReorderCategories(db *dao.DaoDB, parentCatID int, user
return err
}
func (p *PurchaseHandler) CreateCategory2(ctx *jxcontext.Context, cat *dao.SkuCategoryWithVendor) (err error) {
func (p *PurchaseHandler) CreateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
return err
}
func (p *PurchaseHandler) UpdateCategory2(ctx *jxcontext.Context, cat *dao.SkuCategoryWithVendor) (err error) {
func (p *PurchaseHandler) UpdateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
return err
}
func (p *PurchaseHandler) DeleteCategory2(ctx *jxcontext.Context, cat *dao.SkuCategoryWithVendor) (err error) {
func (p *PurchaseHandler) DeleteCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
return err
}