删除日志

This commit is contained in:
邹宗楠
2022-10-24 11:22:38 +08:00
parent 5a47102894
commit 5d6a5a3226
139 changed files with 17 additions and 787 deletions

View File

@@ -72,7 +72,6 @@ func (p *PurchaseHandler) GetAllCategories(ctx *jxcontext.Context, vendorOrgCode
}
func (p *PurchaseHandler) CreateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
globals.SugarLogger.Debugf("CreateCategory2 cat:%s", utils.Format4Output(cat, true))
parentID := int64(0)
if cat.Level != 1 {
parentID = utils.Str2Int64(cat.ParentVendorCatID)
@@ -91,7 +90,6 @@ func (p *PurchaseHandler) CreateCategory2(ctx *jxcontext.Context, cat *dao.SkuSt
}
func (p *PurchaseHandler) UpdateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
globals.SugarLogger.Debugf("UpdateCategory2 cat:%s", utils.Format4Output(cat, true))
if globals.EnableJdStoreWrite {
if cat.VendorCatID != "" {
err = getAPI(cat.VendorOrgCode).UpdateShopCategory(utils.Str2Int64(cat.VendorCatID), cat.Name)
@@ -101,7 +99,6 @@ func (p *PurchaseHandler) UpdateCategory2(ctx *jxcontext.Context, cat *dao.SkuSt
}
func (p *PurchaseHandler) DeleteCategory2(ctx *jxcontext.Context, vendorOrgCode, vendorCatID string) (err error) {
globals.SugarLogger.Debugf("DeleteCategory2 vendorOrgCode:%s, vendorCatID:%s", vendorOrgCode, vendorCatID)
if globals.EnableJdStoreWrite {
err = getAPI(vendorOrgCode).DelShopCategory(utils.Str2Int64(vendorCatID))
}
@@ -196,7 +193,6 @@ 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("CreateSku2 sku:%s", utils.Format4Output(sku, true))
param := skuInfo2Param(ctx, sku)
if globals.EnableJdStoreWrite {
sku.VendorSkuID, err = getAPI(sku.VendorOrgCode).AddSku2(param)
@@ -222,7 +218,6 @@ 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("UpdateSku2 sku:%s", utils.Format4Output(sku, true))
param := skuInfo2Param(ctx, sku)
if globals.EnableJdStoreWrite {
_, err = getAPI(sku.VendorOrgCode).UpdateSku2(param)
@@ -231,7 +226,6 @@ 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("DeleteSku2 vendorOrgCode:%s, sku:%s", vendorOrgCode, utils.Format4Output(sku, true))
// 京东到家只能通过商家ID删除SKU如果没有的话先绑定再删除
if sku.SkuID == 0 {