This commit is contained in:
laodaming
2023-09-27 16:16:33 +08:00
parent 142ada5b07
commit 1dfa390557
4 changed files with 5 additions and 3 deletions

View File

@@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"fusenapi/constants"
"github.com/zeromicro/go-zero/core/logx"
"sort"
)
@@ -186,11 +185,11 @@ func (d *FsProductModel3dModel) GetProductMinPrice(ctx context.Context, productI
switch *modelInfo.Tag {
case constants.TAG_MODEL: //模型
if modelInfo.StepPrice == nil || len(*modelInfo.StepPrice) == 0 {
return errors.New(fmt.Sprintf("model step price is not set:%d", modelInfo.Id))
mapModelMinPrice[modelInfo.Id] = 0
continue
}
var stepPrice StepPriceJsonStruct
if err = json.Unmarshal(*modelInfo.StepPrice, &stepPrice); err != nil {
logx.Error(err)
return errors.New(fmt.Sprintf("failed to parse model step price:%d", modelInfo.Id))
}
lenRange := len(stepPrice.PriceRange)