From 0fde3c8d9147a4bdc4bb12aa527fe749054c2cdb Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Sun, 8 Oct 2023 10:33:25 +0800 Subject: [PATCH] fix --- .../product/internal/logic/getrecommandproductlistlogic.go | 6 +++--- server/product/internal/types/types.go | 2 +- server_api/product.api | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/product/internal/logic/getrecommandproductlistlogic.go b/server/product/internal/logic/getrecommandproductlistlogic.go index bd050416..2877ef95 100644 --- a/server/product/internal/logic/getrecommandproductlistlogic.go +++ b/server/product/internal/logic/getrecommandproductlistlogic.go @@ -130,9 +130,9 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec } list := make([]types.GetRecommandProductListRsp, 0, len(recommendProductList)) for _, v := range recommendProductList { - isRecommend := false + recommend := false if _, ok := mapRecommend[v.Id]; ok { - isRecommend = true + recommend = true } minPrice := int64(0) if minVal, ok := mapProductMinPrice[v.Id]; ok { @@ -149,7 +149,7 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec CoverImgMetadata: mapResourceMetadata[*v.CoverImg], CoverDefault: []types.CoverDefaultItem{}, Intro: *v.Intro, - IsRecommend: isRecommend, + Recommend: recommend, MinPrice: minPrice, IsCustomization: *v.IsCustomization, } diff --git a/server/product/internal/types/types.go b/server/product/internal/types/types.go index c6ff15a6..05455455 100644 --- a/server/product/internal/types/types.go +++ b/server/product/internal/types/types.go @@ -22,7 +22,7 @@ type GetRecommandProductListRsp struct { CoverImgMetadata interface{} `json:"cover_img_metadata"` CoverDefault []CoverDefaultItem `json:"cover_default"` Intro string `json:"intro"` - IsRecommend bool `json:"is_recommend"` + Recommend bool `json:"recommend"` MinPrice int64 `json:"min_price"` IsCustomization int64 `json:"is_customization"` } diff --git a/server_api/product.api b/server_api/product.api index 3e3a4422..a2a371bb 100644 --- a/server_api/product.api +++ b/server_api/product.api @@ -65,7 +65,7 @@ type GetRecommandProductListRsp { CoverImgMetadata interface{} `json:"cover_img_metadata"` CoverDefault []CoverDefaultItem `json:"cover_default"` Intro string `json:"intro"` - IsRecommend bool `json:"is_recommend"` + Recommend bool `json:"recommend"` MinPrice int64 `json:"min_price"` IsCustomization int64 `json:"is_customization"` }