From 8bce140dd2f1389c32b10786513bd273d6750c87 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 27 Sep 2023 17:10:17 +0800 Subject: [PATCH] fix --- server/product/internal/logic/getproductsteppricelogic.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/product/internal/logic/getproductsteppricelogic.go b/server/product/internal/logic/getproductsteppricelogic.go index 1c59f729..60527bcf 100644 --- a/server/product/internal/logic/getproductsteppricelogic.go +++ b/server/product/internal/logic/getproductsteppricelogic.go @@ -114,6 +114,8 @@ func (l *GetProductStepPriceLogic) GetProductStepPrice(req *types.GetProductStep if rIndex+1 == rangeLen { begin := format.NumToStringWithThousandthPercentile(fmt.Sprintf("%d", rangeInfo.StartQuantity)) stepRange = append(stepRange, map[string]interface{}{ + "start": rangeInfo.StartQuantity, + "end": rangeInfo.EndQuantity, "range_description": fmt.Sprintf(">=%s Units", begin), "item_price": format.CentitoDollar(rangeInfo.Price+fittingPrice, 3), }) @@ -122,6 +124,8 @@ func (l *GetProductStepPriceLogic) GetProductStepPrice(req *types.GetProductStep begin := format.NumToStringWithThousandthPercentile(fmt.Sprintf("%d", rangeInfo.StartQuantity)) end := format.NumToStringWithThousandthPercentile(fmt.Sprintf("%d", rangeInfo.EndQuantity)) stepRange = append(stepRange, map[string]interface{}{ + "start": rangeInfo.StartQuantity, + "end": rangeInfo.EndQuantity, "range_description": fmt.Sprintf("%s-%s Units", begin, end), "item_price": format.CentitoDollar(rangeInfo.Price+fittingPrice, 3), })