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{})
|
mapRsp := make(map[string]interface{})
|
||||||
for _, modelInfo := range modelPriceList {
|
for _, modelInfo := range modelPriceList {
|
||||||
var stepPrice gmodel.StepPriceJsonStruct
|
var stepPrice gmodel.StepPriceJsonStruct
|
||||||
|
if modelInfo.StepPrice != nil {
|
||||||
if err = json.Unmarshal(*modelInfo.StepPrice, &stepPrice); err != nil {
|
if err = json.Unmarshal(*modelInfo.StepPrice, &stepPrice); err != nil {
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
return resp.SetStatusWithMessage(basic.CodeJsonErr, "failed to parse step price json")
|
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))
|
|
||||||
}
|
}
|
||||||
*modelInfo.PartList = strings.Trim(*modelInfo.PartList, ",")
|
*modelInfo.PartList = strings.Trim(*modelInfo.PartList, ",")
|
||||||
mapFittingUnit := make(map[string]interface{})
|
mapFittingUnit := make(map[string]interface{})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user