修改饿百的默认平台商品分类
This commit is contained in:
@@ -17,12 +17,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
const (
|
||||
defVendorCatID = 201222934 // 其他蔬菜
|
||||
)
|
||||
|
||||
var (
|
||||
defCatMap = map[int]int64{
|
||||
1: 151301831158987, // 休闲食品
|
||||
2: 15347484581335, // 蔬菜类
|
||||
3: 15347484581339, // 其他蔬菜类休闲食品
|
||||
}
|
||||
sensitiveWordRegexp = regexp.MustCompile(`商品名称中含有敏感词(\[.*\])`)
|
||||
)
|
||||
|
||||
@@ -252,11 +251,9 @@ func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo, isCreate bool
|
||||
"left_num": model.MaxStoreSkuStockQty,
|
||||
"category_id": utils.Str2Int64(storeSku.VendorCatID),
|
||||
"predict_cat": 0, // 不使用推荐类目
|
||||
// "cat1_id": getEbaiCat(storeSku.VendorVendorCatID3, 1),
|
||||
// "cat2_id": getEbaiCat(storeSku.VendorVendorCatID2, 2),
|
||||
"cat3_id": getEbaiCat(storeSku.VendorVendorCatID, 3),
|
||||
"weight": storeSku.Weight,
|
||||
"photos": photos,
|
||||
"cat3_id": getEbaiCat(storeSku.VendorVendorCatID),
|
||||
"weight": storeSku.Weight,
|
||||
"photos": photos,
|
||||
}
|
||||
if storeSku.DescImg != "" {
|
||||
params["rtf"] = storeSku.DescImg
|
||||
@@ -292,9 +289,9 @@ func jxSkuStatus2Ebai(status int) int {
|
||||
return ebaiapi.SkuStatusOnline
|
||||
}
|
||||
|
||||
func getEbaiCat(catID int64, level int) int64 {
|
||||
func getEbaiCat(catID int64) int64 {
|
||||
if catID == 0 {
|
||||
return defCatMap[level]
|
||||
return defVendorCatID
|
||||
}
|
||||
return catID
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user