fix
This commit is contained in:
parent
6844142603
commit
bdd9a70a2d
|
@ -88,7 +88,7 @@ func (l *GetTemplateByPidLogic) GetTemplateByPid(req *types.GetTemplateByPidReq,
|
|||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get template list")
|
||||
}
|
||||
rsp := make(map[string][]interface{})
|
||||
rsp := make(map[string]interface{})
|
||||
for _, templateInfo := range templateList {
|
||||
//没有设置模板据不要
|
||||
if templateInfo.TemplateInfo == nil || *templateInfo.TemplateInfo == "" {
|
||||
|
@ -115,11 +115,11 @@ func (l *GetTemplateByPidLogic) GetTemplateByPid(req *types.GetTemplateByPidReq,
|
|||
material = info["module_data"]["material"]
|
||||
}
|
||||
mapKey := fmt.Sprintf("_%d", *modelInfo.SizeId)
|
||||
rsp[mapKey] = append(rsp[mapKey], map[string]interface{}{
|
||||
rsp[mapKey] = map[string]interface{}{
|
||||
"id": templateInfo.Id,
|
||||
"material": material,
|
||||
"material_data": switchInfo,
|
||||
})
|
||||
}
|
||||
}
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", rsp)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user