This commit is contained in:
laodaming 2023-08-10 11:34:04 +08:00
parent 2b5c8c9cd6
commit 0208110cbc

View File

@ -101,6 +101,25 @@ func (l *GetPriceByPidLogic) GetPriceByPid(req *types.GetPriceByPidReq, userinfo
// 组装阶梯价格范围 // 组装阶梯价格范围
func (l *GetPriceByPidLogic) dealWithStepRange(stepNumSlice, stepPriceSlice []int, priceInfo gmodel.FsProductPrice) []types.StepRange { func (l *GetPriceByPidLogic) dealWithStepRange(stepNumSlice, stepPriceSlice []int, priceInfo gmodel.FsProductPrice) []types.StepRange {
//要求写死不影响前端展示
return []types.StepRange{
{
Begin: 1000,
End: 2999,
Price: 0.23,
},
{
Begin: 3000,
End: 4999,
Price: 0.2,
},
{
Begin: 5000,
End: -1,
Price: 0.1,
},
}
//下面是正常的
lenStepNum := len(stepNumSlice) lenStepNum := len(stepNumSlice)
lenStepPrice := len(stepPriceSlice) lenStepPrice := len(stepPriceSlice)
stepListRsp := make([]types.StepRange, 0, lenStepNum) stepListRsp := make([]types.StepRange, 0, lenStepNum)