This commit is contained in:
laodaming 2023-08-17 11:11:58 +08:00
parent 757a7fb0b4
commit 748b7e5b66

View File

@ -109,8 +109,8 @@ func (l *GetProductInfoLogic) GetProductInfo(req *types.GetProductInfoReq, useri
tagIds := make([]int64, 0, len(productTemplateList)) tagIds := make([]int64, 0, len(productTemplateList))
for _, v := range productTemplateList { for _, v := range productTemplateList {
mapTemplateModelId[*v.ModelId] = struct{}{} mapTemplateModelId[*v.ModelId] = struct{}{}
if v.Tag != nil && *v.Tag != "" { if v.TemplateTag != nil && *v.TemplateTag != "" {
tagId, err := strconv.ParseInt(*v.Tag, 10, 64) tagId, err := strconv.ParseInt(*v.TemplateTag, 10, 64)
if err != nil { if err != nil {
logx.Error(err) logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeServiceErr, "tag is not a number") return resp.SetStatusWithMessage(basic.CodeServiceErr, "tag is not a number")
@ -296,7 +296,7 @@ func (l *GetProductInfoLogic) GetProductInfo(req *types.GetProductInfoReq, useri
partListRsp = append(partListRsp, thisInfo) partListRsp = append(partListRsp, thisInfo)
} }
tagName := "" tagName := ""
if tagData, ok := mapTag[*tmp.Tag]; ok { if tagData, ok := mapTag[*tmp.TemplateTag]; ok {
tagName = *tagData.Title tagName = *tagData.Title
} }
//按照材质和尺寸来存放模板信息 //按照材质和尺寸来存放模板信息