fix
This commit is contained in:
parent
8d4901cdcd
commit
6bd9a0ab05
|
@ -82,13 +82,11 @@ func (l *GetProductStepPriceLogic) GetProductStepPrice(req *types.GetProductStep
|
|||
mapRsp := make(map[string]interface{})
|
||||
for _, modelInfo := range modelPriceList {
|
||||
var stepPrice gmodel.StepPriceJsonStruct
|
||||
if err = json.Unmarshal(*modelInfo.StepPrice, &stepPrice); err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeJsonErr, "failed to parse step price json")
|
||||
}
|
||||
rangeLen := len(stepPrice.PriceRange)
|
||||
if rangeLen == 0 {
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, fmt.Sprintf("step price is not set:%d", modelInfo.Id))
|
||||
if modelInfo.StepPrice != nil {
|
||||
if err = json.Unmarshal(*modelInfo.StepPrice, &stepPrice); err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeJsonErr, "failed to parse step price json")
|
||||
}
|
||||
}
|
||||
*modelInfo.PartList = strings.Trim(*modelInfo.PartList, ",")
|
||||
mapFittingUnit := make(map[string]interface{})
|
||||
|
|
Loading…
Reference in New Issue
Block a user