From 3f95d836a3c66c4c6e6cbde954f7efab58d2a401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 12 Jul 2023 18:22:29 +0800 Subject: [PATCH] 1 --- business/partner/purchase/tao_vegetable/store_sku2.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index ef71d0efc..20c46228b 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -294,12 +294,12 @@ func createTaoVegetable(ctx *jxcontext.Context, api *tao_vegetable.API, storeSku SkuName: utils.String2Pointer(storeSku.SkuName), StorageType: utils.Int64ToPointer(tao_vegetable.CreateSkuStorageType), SuggestedPrice: price, - Weight: utils.String2Pointer(utils.Float32ToStr(storeSku.SpecQuality)), + Weight: utils.String2Pointer(utils.Int2Str(storeSku.Weight)), ShelfLife: utils.Int64ToPointer(tao_vegetable.CreateShelfLife), - NetContent: utils.String2Pointer(utils.Float32ToStr(storeSku.SpecQuality)), + NetContent: utils.String2Pointer(utils.Int2Str(storeSku.Weight)), SaleUnit: utils.String2Pointer("份"), LifeStatus: utils.String2Pointer(tao_vegetable.CreateSkuLeafStatus), - SaleSpec: utils.String2Pointer(fmt.Sprintf("%.2f*1%s", storeSku.SpecQuality, storeSku.Unit)), + SaleSpec: utils.String2Pointer(fmt.Sprintf("%d %s*1%s", storeSku.Weight, "g", storeSku.Unit)), StepQuantity: utils.Int64ToPointer(model.YES), // 每次购买至少增加一个购买单位 SubTitle: utils.String2Pointer("同城包邮"), SubTitle1: utils.String2Pointer("一小时速达"), @@ -339,6 +339,7 @@ func createTaoVegetable(ctx *jxcontext.Context, api *tao_vegetable.API, storeSku } else { sku.PurchaseQuantity = utils.Int64ToPointer(int64(storeSku.MinOrderCount)) // 起购单位 } + sku.WeightFlag = utils.Int64ToPointer(tao_vegetable.CreateSkuWeightFlagNo) sku.AvgWeight = utils.String2Pointer("1") // (重量) sku.PreMinusWeight = utils.String2Pointer("1") // 每个购买单位重量,预扣重量