This commit is contained in:
邹宗楠
2022-12-14 10:41:07 +08:00
parent b466aaaf12
commit 231b009dfb
2 changed files with 6 additions and 2 deletions

View File

@@ -193,6 +193,7 @@ func skuInfo2Param(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (param *jd
}
func (p *PurchaseHandler) CreateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (err error) {
globals.SugarLogger.Debugf("是不是正儿八经的京东商城%s", "CreateSku2")
param := skuInfo2Param(ctx, sku)
if globals.EnableJdStoreWrite {
sku.VendorSkuID, err = getAPI(sku.VendorOrgCode).AddSku2(param)
@@ -218,6 +219,7 @@ func (p *PurchaseHandler) CreateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSy
}
func (p *PurchaseHandler) UpdateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (err error) {
globals.SugarLogger.Debugf("是不是正儿八经的京东商城%s", "UpdateSku2")
param := skuInfo2Param(ctx, sku)
if globals.EnableJdStoreWrite {
_, err = getAPI(sku.VendorOrgCode).UpdateSku2(param)
@@ -226,7 +228,7 @@ func (p *PurchaseHandler) UpdateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSy
}
func (p *PurchaseHandler) DeleteSku2(ctx *jxcontext.Context, vendorOrgCode string, sku *partner.StoreSkuInfo) (err error) {
globals.SugarLogger.Debugf("是不是正儿八经的京东商城%s", "DeleteSku2")
// 京东到家只能通过商家ID删除SKU如果没有的话先绑定再删除
if sku.SkuID == 0 {
skuPairList := []*jdapi.SkuIDPair{