- 京西果园的缺省类别为22410(其他国产水果)
This commit is contained in:
@@ -15,11 +15,14 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/partner"
|
"git.rosy.net.cn/jx-callback/business/partner"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
|
"github.com/astaxie/beego"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
DefBrandID = 35247
|
DefBrandID = 35247
|
||||||
DefJdCategoryID = 20362
|
|
||||||
|
DefJdCategoryID = 20362
|
||||||
|
DefJdCategoryID4Jxgy = 22410 // 其他国产水果
|
||||||
)
|
)
|
||||||
|
|
||||||
type tSkuInfoExt struct {
|
type tSkuInfoExt struct {
|
||||||
@@ -36,6 +39,13 @@ var (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func getDefJdCategoryID() int {
|
||||||
|
if beego.BConfig.RunMode == "jxgy" {
|
||||||
|
return DefJdCategoryID4Jxgy
|
||||||
|
}
|
||||||
|
return DefJdCategoryID
|
||||||
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) CreateCategory(db *dao.DaoDB, cat *model.SkuCategory, userName string) (err error) {
|
func (p *PurchaseHandler) CreateCategory(db *dao.DaoDB, cat *model.SkuCategory, userName string) (err error) {
|
||||||
var jdPid int64
|
var jdPid int64
|
||||||
if cat.ParentID != 0 {
|
if cat.ParentID != 0 {
|
||||||
@@ -134,7 +144,7 @@ func (p *PurchaseHandler) cuSku(db *dao.DaoDB, sku *model.Sku, handler func(skuE
|
|||||||
// shopCategories = append(shopCategories, skuInfoExt.SkuCatID)
|
// shopCategories = append(shopCategories, skuInfoExt.SkuCatID)
|
||||||
// }
|
// }
|
||||||
if skuInfoExt.JdCategoryID == 0 {
|
if skuInfoExt.JdCategoryID == 0 {
|
||||||
skuInfoExt.JdCategoryID = DefJdCategoryID
|
skuInfoExt.JdCategoryID = getDefJdCategoryID()
|
||||||
}
|
}
|
||||||
if skuInfoExt.BrandID == 0 {
|
if skuInfoExt.BrandID == 0 {
|
||||||
skuInfoExt.BrandID = DefBrandID
|
skuInfoExt.BrandID = DefBrandID
|
||||||
|
|||||||
Reference in New Issue
Block a user