From c65b8f54a5f02b9524da741be279166c71a89607 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Fri, 24 Nov 2023 11:01:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=BD=93=E5=89=8Dlogo?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/home-user-auth/internal/logic/userlogosetlogic.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/home-user-auth/internal/logic/userlogosetlogic.go b/server/home-user-auth/internal/logic/userlogosetlogic.go index c6b36255..de46d45a 100644 --- a/server/home-user-auth/internal/logic/userlogosetlogic.go +++ b/server/home-user-auth/internal/logic/userlogosetlogic.go @@ -186,6 +186,12 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth logc.Errorf(l.ctx, "userMaterialInfo Metadata template_tag_id err:%+v", err) return err } + + userMaterialVrsionData, userMaterialVersionEx := metadataMapOldUserMaterial["version"] + if !userMaterialVersionEx { + userMaterialVrsionData = "" + } + userMaterialTemplateIdTagIds := userMaterialTemplateIdTagIdData.([]interface{}) userMaterialTemplateIdTagId := userMaterialTemplateIdTagIds[0].(string) @@ -193,7 +199,8 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth userMaterialTemplateTag := userMaterialTemplateTagData.(map[string]interface{}) userMaterialTemplateTagIndex := userMaterialTemplateTag[userMaterialTemplateIdTagId] - templateTagSelected := make(map[string]interface{}, 3) + templateTagSelected := make(map[string]interface{}, 4) + templateTagSelected["version"] = userMaterialVrsionData templateTagSelected["color"] = userMaterialTemplateTagIndex templateTagSelected["template_tag"] = userMaterialTemplateIdTagId templateTagSelected["selected_index"] = 0