From 9f865eb1c5abfa675fc82fe2453774e720842ce2 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Thu, 29 Jun 2023 17:48:07 +0800 Subject: [PATCH] fix --- server/product/internal/logic/getsizebyproductlogic.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/product/internal/logic/getsizebyproductlogic.go b/server/product/internal/logic/getsizebyproductlogic.go index cf8333e0..644c7f94 100644 --- a/server/product/internal/logic/getsizebyproductlogic.go +++ b/server/product/internal/logic/getsizebyproductlogic.go @@ -136,11 +136,10 @@ func (l *GetSizeByProductLogic) GetSecondChildrenList(product gmodel.FsProduct, price, ok := mapProductPrice[productSize.Id] //无对应尺寸价格 if !ok { - for i := 0; i < 3; i++ { - priceList = append(priceList, types.PriceObj{ - Num: 1, - Price: 0, - }) + priceList = []types.PriceObj{ + {Num: 1, Price: 0}, + {Num: 1, Price: 0}, + {Num: 1, Price: 0}, } childrenObjList = append(childrenObjList, types.ChildrenObj{ Id: productSize.Id,