fix
This commit is contained in:
@@ -105,11 +105,18 @@ func (l *GetProductStepPriceLogic) GetProductStepPrice(req *types.GetProductStep
|
||||
}
|
||||
}
|
||||
stepRange := make([]interface{}, 0, rangeLen)
|
||||
for _, rangeInfo := range stepPrice.PriceRange {
|
||||
for rIndex, rangeInfo := range stepPrice.PriceRange {
|
||||
//最后一个
|
||||
if rIndex+1 == rangeLen {
|
||||
stepRange = append(stepRange, map[string]interface{}{
|
||||
"range_description": fmt.Sprintf(">=%s Units", format.NumToStringWithThousandthPercentile(rangeInfo.StartQuantity)),
|
||||
"item_price": format.CentitoDollar(rangeInfo.Price, 3),
|
||||
})
|
||||
break
|
||||
}
|
||||
stepRange = append(stepRange, map[string]interface{}{
|
||||
"start_quantity": rangeInfo.StartQuantity,
|
||||
"end_quantity": rangeInfo.EndQuantity,
|
||||
"item_price": format.CentitoDollar(rangeInfo.Price, 3),
|
||||
"range_description": fmt.Sprintf("%s-%s Units", format.NumToStringWithThousandthPercentile(rangeInfo.StartQuantity), format.NumToStringWithThousandthPercentile(rangeInfo.EndQuantity)),
|
||||
"item_price": format.CentitoDollar(rangeInfo.Price, 3),
|
||||
})
|
||||
}
|
||||
mapRsp[fmt.Sprintf("_%d", *modelPriceInfo.SizeId)] = map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user