aa
This commit is contained in:
@@ -156,7 +156,7 @@ func skuInfo2Param(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (param *jd
|
||||
param = &jdapi.OpSkuParam{
|
||||
TraceID: ctx.GetTrackInfo(),
|
||||
OutSkuID: utils.Int2Str(sku.SkuID),
|
||||
ShopCategories: []int64{utils.Str2Int64(sku.VendorCatID)},
|
||||
ShopCategories: []int64{},
|
||||
CategoryID: sku.VendorVendorCatID,
|
||||
BrandID: DefBrandID,
|
||||
SkuName: utils.LimitUTF8StringLen(sku.SkuName, jdapi.MaxSkuNameCharCount),
|
||||
@@ -168,6 +168,9 @@ func skuInfo2Param(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (param *jd
|
||||
Upc: sku.Upc,
|
||||
// Images: jxutils.BatchString2Slice(sku.Img, sku.Img2),
|
||||
}
|
||||
if sku.VendorCatID != "" {
|
||||
param.ShopCategories = append(param.ShopCategories, utils.Str2Int64(sku.VendorCatID))
|
||||
}
|
||||
if sku.ImgMix != "" {
|
||||
param.Images = jxutils.BatchString2Slice(sku.ImgMix, sku.Img2, sku.Img3)
|
||||
} else {
|
||||
@@ -201,7 +204,7 @@ func (p *PurchaseHandler) CreateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSy
|
||||
OutSkuId: utils.Int2Str(sku.SkuID),
|
||||
Upc: sku.Upc,
|
||||
JdPrice: utils.Int64ToStr(sku.Price),
|
||||
ShopCategoryID: utils.Str2Int64(sku.VendorCatID),
|
||||
ShopCategoryID: utils.Str2Int64WithDefault((sku.VendorCatID), 0),
|
||||
},
|
||||
})
|
||||
if err2 == nil {
|
||||
|
||||
Reference in New Issue
Block a user