11
This commit is contained in:
parent
ef946ed0e8
commit
dd123cc446
|
@ -92,9 +92,6 @@ func (l *GetTemplateByPidLogic) GetTemplateByPid(req *types.GetTemplateByPidReq,
|
||||||
rsp := make(map[string]interface{})
|
rsp := make(map[string]interface{})
|
||||||
for _, templateInfo := range templateList {
|
for _, templateInfo := range templateList {
|
||||||
//没有设置模板据不要
|
//没有设置模板据不要
|
||||||
if templateInfo.TemplateInfo == nil || *templateInfo.TemplateInfo == "" {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
modelIndex, ok := mapModel[*templateInfo.ModelId]
|
modelIndex, ok := mapModel[*templateInfo.ModelId]
|
||||||
if !ok {
|
if !ok {
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -62,7 +62,15 @@ type MaterialItem struct {
|
||||||
// 获取模板开关信息(目前写死,以后后台做好了功能再更新变动)
|
// 获取模板开关信息(目前写死,以后后台做好了功能再更新变动)
|
||||||
func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMaterialImg string) (resp GetTemplateSwitchInfoRsp, err error) {
|
func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMaterialImg string) (resp GetTemplateSwitchInfoRsp, err error) {
|
||||||
if templateJsonStr == nil || *templateJsonStr == "" {
|
if templateJsonStr == nil || *templateJsonStr == "" {
|
||||||
return GetTemplateSwitchInfoRsp{}, nil
|
return GetTemplateSwitchInfoRsp{
|
||||||
|
Id: templateId,
|
||||||
|
Material: templateMaterialImg,
|
||||||
|
MaterialData: MaterialData{
|
||||||
|
Logo: Logo{
|
||||||
|
Material: "/image/logo/aHnT1_rzubdwax_scale.png",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}, nil
|
||||||
}
|
}
|
||||||
var templateJsonInfo TemplateSimpleParseInfo
|
var templateJsonInfo TemplateSimpleParseInfo
|
||||||
if err = json.Unmarshal([]byte(*templateJsonStr), &templateJsonInfo); err != nil {
|
if err = json.Unmarshal([]byte(*templateJsonStr), &templateJsonInfo); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user