fix
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user