From 9e5b08b9eb5e996aab3757d52f9f27a930f7282b Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 8 Aug 2023 12:56:53 +0800 Subject: [PATCH] fix --- .../internal/logic/gettagproductlistlogic.go | 2 +- server/product/internal/types/types.go | 23 +++++++++++-------- server_api/product.api | 23 +++++++++++-------- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/server/product/internal/logic/gettagproductlistlogic.go b/server/product/internal/logic/gettagproductlistlogic.go index 42e240e1..948c9799 100644 --- a/server/product/internal/logic/gettagproductlistlogic.go +++ b/server/product/internal/logic/gettagproductlistlogic.go @@ -363,7 +363,7 @@ func (l *GetTagProductListLogic) getTagProducts(req getTagProductsReq) (productL } image.ThousandFaceImageFormat(&r) item.Cover = r.Cover - item.CoverDefault = r.CoverDefault + item.CoverDefault = nil //加入分类产品切片 productListRsp = append(productListRsp, item) } diff --git a/server/product/internal/types/types.go b/server/product/internal/types/types.go index f2d27f0a..c1aaf641 100644 --- a/server/product/internal/types/types.go +++ b/server/product/internal/types/types.go @@ -268,15 +268,20 @@ type TagItem struct { } type TagProduct struct { - ProductId int64 `json:"product_id"` - Sn string `json:"sn"` - Title string `json:"title"` - Cover string `json:"cover"` - SizeNum uint32 `json:"size_num"` - MinPrice int64 `json:"min_price"` - CoverDefault string `json:"cover_default"` - HaveOptionalFitting bool `json:"have_optional_fitting"` - Recommended bool `json:"recommended"` + ProductId int64 `json:"product_id"` + Sn string `json:"sn"` + Title string `json:"title"` + Cover string `json:"cover"` + SizeNum uint32 `json:"size_num"` + MinPrice int64 `json:"min_price"` + CoverDefault []CoverDefaultItem `json:"cover_default"` + HaveOptionalFitting bool `json:"have_optional_fitting"` + Recommended bool `json:"recommended"` +} + +type CoverDefaultItem struct { + Tag string `json:"tag"` + Cover string `json:"cover"` } type GetRenderDesignReq struct { diff --git a/server_api/product.api b/server_api/product.api index 48ac5a50..711ce0d4 100644 --- a/server_api/product.api +++ b/server_api/product.api @@ -317,15 +317,20 @@ type TagItem { ChildTagList []*TagItem `json:"child_tag_list"` } type TagProduct { - ProductId int64 `json:"product_id"` - Sn string `json:"sn"` - Title string `json:"title"` - Cover string `json:"cover"` - SizeNum uint32 `json:"size_num"` - MinPrice int64 `json:"min_price"` - CoverDefault string `json:"cover_default"` - HaveOptionalFitting bool `json:"have_optional_fitting"` - Recommended bool `json:"recommended"` + ProductId int64 `json:"product_id"` + Sn string `json:"sn"` + Title string `json:"title"` + Cover string `json:"cover"` + SizeNum uint32 `json:"size_num"` + MinPrice int64 `json:"min_price"` + //彩膜列表 + CoverDefault []CoverDefaultItem `json:"cover_default"` + HaveOptionalFitting bool `json:"have_optional_fitting"` + Recommended bool `json:"recommended"` +} +type CoverDefaultItem { + Tag string `json:"tag"` + Cover string `json:"cover"` } //获取云渲染设计方案信息 type GetRenderDesignReq {