This commit is contained in:
laodaming 2023-09-27 17:10:17 +08:00
parent 60749646e2
commit 8bce140dd2

View File

@ -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),
})