From 6901177f05416b8711efd3de3df98adf4ea9b669 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 25 Oct 2023 13:06:19 +0800 Subject: [PATCH] fix --- server/product/internal/logic/getproductdetaillogic.go | 3 +++ server/product/internal/types/types.go | 1 + server_api/product.api | 1 + 3 files changed, 5 insertions(+) diff --git a/server/product/internal/logic/getproductdetaillogic.go b/server/product/internal/logic/getproductdetaillogic.go index 1b9f8ee9..0ac63b8d 100644 --- a/server/product/internal/logic/getproductdetaillogic.go +++ b/server/product/internal/logic/getproductdetaillogic.go @@ -245,6 +245,7 @@ func (l *GetProductDetailLogic) GetProductDetail(req *types.GetProductDetailReq, }) } return resp.SetStatusWithMessage(basic.CodeOK, "success", types.GetProductDetailRsp{ + Logo: req.Logo, TemplateTagColorInfo: templateTagColorInfo, ProductInfo: types.ProductInfo{ Id: productInfo.Id, @@ -358,6 +359,8 @@ func (l *GetProductDetailLogic) GetTemplateTagColor(req *types.GetProductDetailR } if profile["logo_url"] != nil && reflect.TypeOf(profile["logo_url"]).String() == "string" { req.Logo = profile["logo_url"].(string) + } else { + return types.TemplateTagColorInfo{}, errors.New("default profile logo url is not set !!") } } //根据logo查询素材资源 diff --git a/server/product/internal/types/types.go b/server/product/internal/types/types.go index a7df34c5..90a91ea4 100644 --- a/server/product/internal/types/types.go +++ b/server/product/internal/types/types.go @@ -175,6 +175,7 @@ type GetProductDetailReq struct { } type GetProductDetailRsp struct { + Logo string `json:"logo"` //logo TemplateTagColorInfo TemplateTagColorInfo `json:"template_tag_color_info"` //标签颜色信息 ProductInfo ProductInfo `json:"product_info"` //产品基本信息 BaseColors interface{} `json:"base_colors"` //一些返回写死的颜色 diff --git a/server_api/product.api b/server_api/product.api index 450d4b3c..165e3297 100644 --- a/server_api/product.api +++ b/server_api/product.api @@ -210,6 +210,7 @@ type GetProductDetailReq { Logo string `form:"logo"` //logo地址 } type GetProductDetailRsp { + Logo string `json:"logo"` //logo TemplateTagColorInfo TemplateTagColorInfo `json:"template_tag_color_info"` //标签颜色信息 ProductInfo ProductInfo `json:"product_info"` //产品基本信息 BaseColors interface{} `json:"base_colors"` //一些返回写死的颜色