This commit is contained in:
邹宗楠
2023-07-12 18:22:29 +08:00
parent f3d503f70f
commit 3f95d836a3

View File

@@ -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") // 每个购买单位重量,预扣重量