From 14c403d26b67a4acc17b9ba71efc6424c9a74a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 30 Jan 2024 10:20:28 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/system_store_sku.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/system_store_sku.go b/business/jxstore/cms/system_store_sku.go index 9e8045a23..b5ba8781b 100644 --- a/business/jxstore/cms/system_store_sku.go +++ b/business/jxstore/cms/system_store_sku.go @@ -1,6 +1,7 @@ package cms import ( + "encoding/json" "fmt" "git.rosy.net.cn/baseapi/platformapi/ebaiapi" "git.rosy.net.cn/jx-callback/business/jxutils/tasksch" @@ -258,6 +259,7 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi if v.SkuId == "" { v.SkuId = storeSku.AppFoodCode } + salesCycle, _ := json.Marshal(v.AvailableTimes) mapSkuList := utils.Struct2MapByJson(v) if v.BoxNum == "" { delete(mapSkuList, "box_num") @@ -265,6 +267,7 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi if v.BoxPrice == "" { delete(mapSkuList, "box_price") } + mapSkuList["available_times"] = string(salesCycle) skus = append(skus, mapSkuList) } foodData["skus"] = skus @@ -306,7 +309,6 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi if len(foodDataList)%10 != 0 { count += 1 } - globals.SugarLogger.Debugf("===============data := %s", utils.Format4Output(foodDataList, false)) for i := 0; i < count; i++ { if i == count-1 { failedFoodList, _ := toApi.RetailBatchInitData(ctx.GetTrackInfo(), vendorStoreID, foodDataList[i*10:])