From 5cfd7b56c4ac0d7228ea4fd9fcd580903d01fbb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 31 Oct 2024 15:02:51 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/system_store_sku.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/business/jxstore/cms/system_store_sku.go b/business/jxstore/cms/system_store_sku.go index fee4a9d13..879ce86ae 100644 --- a/business/jxstore/cms/system_store_sku.go +++ b/business/jxstore/cms/system_store_sku.go @@ -3,14 +3,12 @@ package cms import ( "fmt" "git.rosy.net.cn/baseapi/platformapi/ebaiapi" - "git.rosy.net.cn/baseapi/platformapi/jdapi" "git.rosy.net.cn/jx-callback/business/jxutils/tasksch" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model/dao" "git.rosy.net.cn/jx-callback/business/partner" "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" - "git.rosy.net.cn/jx-callback/globals/api/apimanager" beego "github.com/astaxie/beego/server/web" "time" @@ -244,13 +242,11 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA for { // 同步商品 fromFoodList, err1 := fromApi.RetailListAll(fromStore.VendorStoreID, i) - globals.SugarLogger.Debugf("---------v.Children 1:= %s", utils.Format4Output(fromFoodList, false)) if len(fromFoodList) == 0 || fromFoodList == nil { return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i) } errDataList, err := BatchInitSkuMT2MT(ctx, fromFoodList, toApi, toStore.VendorStoreID, i) - globals.SugarLogger.Debugf("---------v.Children 2:= %s", utils.Format4Output(errDataList, false)) if err != nil { globals.SugarLogger.Debugf("BatchInitData : %v", err) } @@ -288,7 +284,7 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mtwmapi.API, vendorStoreID string, offset int) ([]*mtwmapi.AppFoodResult, error) { errList := make([]*mtwmapi.AppFoodResult, 0, 0) foodDataList := make([]map[string]interface{}, len(fromSku)) - apiObj := apimanager.CurAPIManager.GetAPI(model.VendorIDJD, "320406").(*jdapi.API) + //apiObj := apimanager.CurAPIManager.GetAPI(model.VendorIDJD, "320406").(*jdapi.API) for k, storeSku := range fromSku { foodData := make(map[string]interface{}) @@ -327,12 +323,12 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi delete(mapSkuList, "min_order_count") if v.Upc != "" { upc = v.Upc - } else if toApi.QuerySkuIsNeedUpc(storeSku.TagID) { + } /* else if toApi.QuerySkuIsNeedUpc(storeSku.TagID) { upcList, _ := apiObj.GetJdUpcCodeByName(storeSku.Name, "", 1, 20) if len(upcList) != 0 { upc = upcList[0].UpcCode } - } + }*/ //mapSkuList["available_times"] = string(salesCycle) mapSkuList["available_times"] = v.AvailableTimes //if v.MinOrderCount != "" {