Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
laodaming 2023-11-24 16:01:41 +08:00
commit 4cacf2c16d
2 changed files with 13 additions and 5 deletions

View File

@ -187,9 +187,10 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth
return err
}
userMaterialVrsionData, userMaterialVersionEx := metadataMapOldUserMaterial["version"]
if !userMaterialVersionEx {
userMaterialVrsionData = ""
var templateTagSelectedVersion string
userMaterialVersionData, userMaterialVersionEx := metadataMapOldUserMaterial["version"]
if userMaterialVersionEx {
templateTagSelectedVersion = userMaterialVersionData.(string)
}
userMaterialTemplateIdTagIds := userMaterialTemplateIdTagIdData.([]interface{})
@ -200,7 +201,7 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth
userMaterialTemplateTagIndex := userMaterialTemplateTag[userMaterialTemplateIdTagId]
templateTagSelected := make(map[string]interface{}, 4)
templateTagSelected["version"] = userMaterialVrsionData
templateTagSelected["version"] = templateTagSelectedVersion
templateTagSelected["color"] = userMaterialTemplateTagIndex
templateTagSelected["template_tag"] = userMaterialTemplateIdTagId
templateTagSelected["selected_index"] = 0

View File

@ -112,6 +112,12 @@ func (l *UserLogoTemplateTagSetLogic) UserLogoTemplateTagSet(req *types.UserLogo
return err
}
var templateTagSelectedVersion string
userMaterialVersionData, userMaterialVersionEx := metadataMapOldUserMaterial["version"]
if userMaterialVersionEx {
templateTagSelectedVersion = userMaterialVersionData.(string)
}
userMaterialTemplateTag := userMaterialTemplateTagData.(map[string]interface{})
userMaterialTemplateTagIndex := userMaterialTemplateTag[req.TemplateTag]
@ -121,7 +127,8 @@ func (l *UserLogoTemplateTagSetLogic) UserLogoTemplateTagSet(req *types.UserLogo
return err
}
templateTagSelected := make(map[string]interface{}, 3)
templateTagSelected := make(map[string]interface{}, 4)
templateTagSelected["version"] = templateTagSelectedVersion
templateTagSelected["color"] = userMaterialTemplateTagIndex
templateTagSelected["template_tag"] = req.TemplateTag
templateTagSelected["selected_index"] = req.TemplateTagColorIndex