1
This commit is contained in:
@@ -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) {
|
func (p *PurchaseHandler) CreateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (err error) {
|
||||||
|
globals.SugarLogger.Debugf("是不是正儿八经的京东商城%s", "CreateSku2")
|
||||||
param := skuInfo2Param(ctx, sku)
|
param := skuInfo2Param(ctx, sku)
|
||||||
if globals.EnableJdStoreWrite {
|
if globals.EnableJdStoreWrite {
|
||||||
sku.VendorSkuID, err = getAPI(sku.VendorOrgCode).AddSku2(param)
|
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) {
|
func (p *PurchaseHandler) UpdateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (err error) {
|
||||||
|
globals.SugarLogger.Debugf("是不是正儿八经的京东商城%s", "UpdateSku2")
|
||||||
param := skuInfo2Param(ctx, sku)
|
param := skuInfo2Param(ctx, sku)
|
||||||
if globals.EnableJdStoreWrite {
|
if globals.EnableJdStoreWrite {
|
||||||
_, err = getAPI(sku.VendorOrgCode).UpdateSku2(param)
|
_, 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) {
|
func (p *PurchaseHandler) DeleteSku2(ctx *jxcontext.Context, vendorOrgCode string, sku *partner.StoreSkuInfo) (err error) {
|
||||||
|
globals.SugarLogger.Debugf("是不是正儿八经的京东商城%s", "DeleteSku2")
|
||||||
// 京东到家只能通过商家ID删除SKU,如果没有的话,先绑定,再删除
|
// 京东到家只能通过商家ID删除SKU,如果没有的话,先绑定,再删除
|
||||||
if sku.SkuID == 0 {
|
if sku.SkuID == 0 {
|
||||||
skuPairList := []*jdapi.SkuIDPair{
|
skuPairList := []*jdapi.SkuIDPair{
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||||
globals.SugarLogger.Debugf("是不是正儿八经的京东商城%s", "1111111111111111111111111")
|
globals.SugarLogger.Debugf("是不是正儿八经的京东商城%s", "CreateStoreSkus")
|
||||||
if globals.EnableJdShopWrite {
|
if globals.EnableJdShopWrite {
|
||||||
if vendorStoreID == model.JdShopMainVendorStoreID {
|
if vendorStoreID == model.JdShopMainVendorStoreID {
|
||||||
for _, v := range storeSkuList {
|
for _, v := range storeSkuList {
|
||||||
@@ -300,6 +300,7 @@ func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, v
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
func (p *PurchaseHandler) UpdateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||||
|
globals.SugarLogger.Debugf("是不是正儿八经的京东商城%s", "UpdateStoreSkus")
|
||||||
if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID {
|
if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID {
|
||||||
if vendorStoreID == model.JdShopMainVendorStoreID {
|
if vendorStoreID == model.JdShopMainVendorStoreID {
|
||||||
for _, v := range storeSkuList {
|
for _, v := range storeSkuList {
|
||||||
@@ -462,6 +463,7 @@ func (p *PurchaseHandler) UpdateStoreSkus(ctx *jxcontext.Context, storeID int, v
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||||
|
globals.SugarLogger.Debugf("是不是正儿八经的京东商城%s", "DeleteStoreSkus")
|
||||||
if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID {
|
if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID {
|
||||||
for _, v := range storeSkuList {
|
for _, v := range storeSkuList {
|
||||||
if v.IsDeletedBySku {
|
if v.IsDeletedBySku {
|
||||||
|
|||||||
Reference in New Issue
Block a user