- 京西果园的缺省类别为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/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
const (
|
||||
DefBrandID = 35247
|
||||
DefJdCategoryID = 20362
|
||||
DefBrandID = 35247
|
||||
|
||||
DefJdCategoryID = 20362
|
||||
DefJdCategoryID4Jxgy = 22410 // 其他国产水果
|
||||
)
|
||||
|
||||
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) {
|
||||
var jdPid int64
|
||||
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)
|
||||
// }
|
||||
if skuInfoExt.JdCategoryID == 0 {
|
||||
skuInfoExt.JdCategoryID = DefJdCategoryID
|
||||
skuInfoExt.JdCategoryID = getDefJdCategoryID()
|
||||
}
|
||||
if skuInfoExt.BrandID == 0 {
|
||||
skuInfoExt.BrandID = DefBrandID
|
||||
|
||||
Reference in New Issue
Block a user