This commit is contained in:
momo 2023-11-17 18:21:04 +08:00
parent 28f5fa1019
commit 8f6b9207d2

View File

@ -3,7 +3,6 @@ package gmodel
import (
"context"
"encoding/json"
"errors"
"fmt"
"fusenapi/constants"
"sort"
@ -185,7 +184,7 @@ func (d *FsProductModel3dModel) GetProductMinPrice(modelList []FsProductModel3d,
}
var stepPrice StepPriceJsonStruct
if err := json.Unmarshal(*modelInfo.StepPrice, &stepPrice); err != nil {
return errors.New(fmt.Sprintf("failed to parse model step price:%d", modelInfo.Id))
return fmt.Errorf("failed to parse model step price:%d", modelInfo.Id)
}
lenRange := len(stepPrice.PriceRange)
if lenRange == 0 {