fix
This commit is contained in:
@@ -105,14 +105,13 @@ func (l *GetTemplateByPidLogic) GetTemplateByPid(req *types.GetTemplateByPidReq,
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeJsonErr, fmt.Sprintf("failed to parse json product template info(may be old data):%d", templateInfo.Id))
|
||||
}
|
||||
//后台隐藏/显示信息(现在下面是写死了)
|
||||
/*var switchInfo interface{}
|
||||
if templateInfo.SwitchInfo != nil && *templateInfo.SwitchInfo != "" {
|
||||
_ = json.Unmarshal([]byte(*templateInfo.SwitchInfo), &switchInfo)
|
||||
}*/
|
||||
modelInfo := modelList[modelIndex]
|
||||
mapKey := fmt.Sprintf("_%d", *modelInfo.SizeId)
|
||||
rsp[mapKey] = template_switch_info.GetTemplateSwitchInfo(templateInfo.Id, *templateInfo.MaterialImg)
|
||||
switchInfo, err := template_switch_info.GetTemplateSwitchInfo(templateInfo.Id, templateInfo.TemplateInfo, *templateInfo.MaterialImg)
|
||||
if err != nil {
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, err.Error())
|
||||
}
|
||||
rsp[mapKey] = switchInfo
|
||||
}
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", rsp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user