fix
This commit is contained in:
parent
6bd9a0ab05
commit
9faae14892
|
@ -82,11 +82,13 @@ 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 modelInfo.StepPrice == nil || len(*modelInfo.StepPrice) == 0 {
|
||||||
logx.Error(err)
|
continue
|
||||||
return resp.SetStatusWithMessage(basic.CodeJsonErr, "failed to parse step price json")
|
}
|
||||||
}
|
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, ",")
|
*modelInfo.PartList = strings.Trim(*modelInfo.PartList, ",")
|
||||||
mapFittingUnit := make(map[string]interface{})
|
mapFittingUnit := make(map[string]interface{})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user