From 04f0b0c01e62b7862b1c54cfa81f7d285be7cea2 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 4 Sep 2023 18:17:31 +0800 Subject: [PATCH 1/4] fix --- .../internal/logic/getproducttemplatetagslogic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go index 522f49b8..9eaa40f8 100644 --- a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go +++ b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go @@ -47,7 +47,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu productTemplateTags []gmodel.FsProductTemplateTags ) //获取用户元数据 - userMaterial, err := l.svcCtx.AllModels.FsUserMaterial.GetListByUser(l.ctx, userinfo.UserId, userinfo.GuestId, req.Limit) + userMaterial, err := l.svcCtx.AllModels.FsUserMaterial.FindLatestOne(l.ctx, userinfo.UserId, userinfo.GuestId) if err != nil { if !errors.Is(err, gorm.ErrRecordNotFound) { logx.Error(err) From d1aab4ded877b4dd0f91eb184495231da96366dd Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 4 Sep 2023 18:25:45 +0800 Subject: [PATCH 2/4] fix --- .../internal/logic/getproducttemplatetagslogic.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go index 9eaa40f8..61347cbd 100644 --- a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go +++ b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go @@ -56,6 +56,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu // 返回固定模板标签列表 productTemplateTags, err = l.svcCtx.AllModels.FsProductTemplateTags.GetList(l.ctx, 1, req.Limit, 0, 1, "`id` DESC") } else { + logx.Info("查询到user_id:", userinfo.UserId, "guest_id:", userinfo.GuestId, "的默认最新上传素材数据:", userMaterial) //元数据是空的 if userMaterial.Metadata == nil { // 返回固定模板标签列表 From 10252aa8fe2694499f28609dcaade3a2c7f86114 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 4 Sep 2023 18:29:25 +0800 Subject: [PATCH 3/4] fix --- .../internal/logic/getproducttemplatetagslogic.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go index 61347cbd..7e5542ad 100644 --- a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go +++ b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go @@ -46,6 +46,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu var ( productTemplateTags []gmodel.FsProductTemplateTags ) + logx.Info("获取模板标签用户信息:", userinfo.UserId, "---", userinfo.GuestId) //获取用户元数据 userMaterial, err := l.svcCtx.AllModels.FsUserMaterial.FindLatestOne(l.ctx, userinfo.UserId, userinfo.GuestId) if err != nil { From b77695305a2cb093ffd828960c5a201f3e845095 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 4 Sep 2023 18:31:06 +0800 Subject: [PATCH 4/4] fix --- .../internal/logic/getproducttemplatetagslogic.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go index 7e5542ad..9eaa40f8 100644 --- a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go +++ b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go @@ -46,7 +46,6 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu var ( productTemplateTags []gmodel.FsProductTemplateTags ) - logx.Info("获取模板标签用户信息:", userinfo.UserId, "---", userinfo.GuestId) //获取用户元数据 userMaterial, err := l.svcCtx.AllModels.FsUserMaterial.FindLatestOne(l.ctx, userinfo.UserId, userinfo.GuestId) if err != nil { @@ -57,7 +56,6 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu // 返回固定模板标签列表 productTemplateTags, err = l.svcCtx.AllModels.FsProductTemplateTags.GetList(l.ctx, 1, req.Limit, 0, 1, "`id` DESC") } else { - logx.Info("查询到user_id:", userinfo.UserId, "guest_id:", userinfo.GuestId, "的默认最新上传素材数据:", userMaterial) //元数据是空的 if userMaterial.Metadata == nil { // 返回固定模板标签列表