From 608e36907dd69c2b06aac2449aa33b150e4a4471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 28 Apr 2025 17:54:43 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/store_sku.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index cf0efaaa8..ba9662c3d 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -6583,6 +6583,7 @@ func CopyMtToJd(ctx *jxcontext.Context, mtStoreID, mtOrgCode, jdStoreID, jdOrgCo step := batchItemList[0].(int) switch step { case 0: + globals.SugarLogger.Debugf("-----------------11111") //建分类 ,账号存在分类,不在创建分类 //jdCatList, _ := jd.QueryCategoriesByOrgCode() //if len(jdCatList) == 0 { @@ -6603,16 +6604,18 @@ func CopyMtToJd(ctx *jxcontext.Context, mtStoreID, mtOrgCode, jdStoreID, jdOrgCo // } //} case 1: + globals.SugarLogger.Debugf("-----------lens := %d", 1) //建商品 skuList := make([]*mtwmapi.AppFood, 0, 0) for { skuList2, _ := mtapi.RetailListAll(mtStoreID, 0) + globals.SugarLogger.Debugf("-----------lens2 := %d", len(skuList2)) skuList = append(skuList, skuList2...) if len(skuList2) < 100 { break } } - globals.SugarLogger.Debugf("-----------lens := %d", len(skuList)) + globals.SugarLogger.Debugf("-----------lens3 := %d", len(skuList)) //skuList, _ := mtapi.RetailList(mtStoreID, 0, 2) task2 := tasksch.NewParallelTask("美团到京东, 建商品", tasksch.NewParallelConfig().SetIsContinueWhenError(true).SetParallelCount(1), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { @@ -6648,6 +6651,7 @@ func CopyMtToJd(ctx *jxcontext.Context, mtStoreID, mtOrgCode, jdStoreID, jdOrgCo param.ShopCategories = append(param.ShopCategories, utils.Str2Int64(catMap[mtSku.CategoryCode])) } param.ProductDesc = fmt.Sprintf(`一张图片`, mtSku.PictureContents) + globals.SugarLogger.Debugf("-------------skuname := %s", param.SkuName) skuID, err := jd.AddSku2(param) if err != nil { globals.SugarLogger.Debugf("---------AddSku2 := %s,%v", skuID, err)