From 20ac41784f5bd3698c4cfd70e9f61e6916423038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Sat, 25 Mar 2023 17:56:36 +0800 Subject: [PATCH] 1 --- business/jxstore/act/act.go | 24 ++++++++++++++++++++---- business/jxstore/cms/sku.go | 6 +++++- business/partner/purchase/jd/store.go | 2 -- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index cf99ad0cd..7e3c2bbd6 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -2032,11 +2032,27 @@ func RrefreshMtwmVendorAct(ctx *jxcontext.Context) (err error) { } } } - // 查询门店爆款商品,当门店存在爆款时,取消之前的力荐商品,将新的爆款设置为力荐商品 - if k == mtwmapi.RetailActTypeSecKill && len(actList) > 0 { - - } } + // 查询门店爆款商品,当门店存在爆款时,取消之前的力荐商品,将新的爆款设置为力荐商品 + //if k == mtwmapi.RetailActTypeSecKill && len(actList) > 0 { + // allActivityList := make([]string, 0, 0) // 此门店全部的折扣(爆款)活动商品 + // activationActivityList := make([]string, 0, 0) // 此门店全部的折扣(爆款)活动商品 + // for _, ac := range actList { + // allActivityList = append(allActivityList, utils.Int64ToStr(ac.ItemID)) + // if ac.Status == 1 { + // activationActivityList = append(activationActivityList, utils.Int64ToStr(ac.ItemID)) + // } + // } + // // 取消当前力荐商品 + // mtapi.RetailDiscountDelete2(storeMap.VendorStoreID, k) + // // 重新推荐力荐商品 + // partner.GetPurchasePlatformFromVendorID(storeMap.VendorID).(partner.ISingleStoreStoreSkuHandler).UpdateStoreSkus() + //} + // + //// 门店爆款活动商品为0,则取消真在力荐的商品 + //if k == mtwmapi.RetailActTypeSecKill && len(actList) == 0 { + // + //} } return retVal, err }, storeMaps) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index a8fb5412a..9e83b5db3 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -1263,7 +1263,11 @@ func updateOrCreateSkuVendorCategoryMap(db *dao.DaoDB, ctx *jxcontext.Context, n mtwmCategoryID = payload["mtwmCategoryID"].(string) } if payload["categoryID2"] != nil { - jxCategoryID = payload["categoryID2"].(int) + jxCategoryIDNumber, err := payload["categoryID2"].(json.Number).Int64() + if err != nil { + return false + } + jxCategoryID = int(jxCategoryIDNumber) } if jdCategoryId != "" { diff --git a/business/partner/purchase/jd/store.go b/business/partner/purchase/jd/store.go index cef5208e5..f422cd9a6 100644 --- a/business/partner/purchase/jd/store.go +++ b/business/partner/purchase/jd/store.go @@ -211,8 +211,6 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin } fillOpTimeParams(storeParams, store.GetOpTimeList()) errList := errlist.New() - globals.SugarLogger.Debugf("=========storeParams :%s", utils.Format4Output(storeParams, false)) - globals.SugarLogger.Debugf("=========store :%s", utils.Format4Output(store, false)) if globals.EnableJdStoreWrite { store1 := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(ebai):%s", storeID, store.Name, 100, store.Status, 100, store.VendorOrgCode) event.AddOperateEvent(jxcontext.AdminCtx, jxcontext.AdminCtx.GetTrackInfo(), store1, "", "", 10, "UpdateStore")