From f933fcac69ffd4f70704bedfa829fa4638c16aa9 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Sun, 8 Oct 2023 10:31:42 +0800 Subject: [PATCH] fix --- .../logic/getrecommandproductlistlogic.go | 18 ++---------------- server/product/internal/types/types.go | 2 +- server_api/product.api | 2 +- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/server/product/internal/logic/getrecommandproductlistlogic.go b/server/product/internal/logic/getrecommandproductlistlogic.go index 24721e95..bd050416 100644 --- a/server/product/internal/logic/getrecommandproductlistlogic.go +++ b/server/product/internal/logic/getrecommandproductlistlogic.go @@ -130,23 +130,9 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec } list := make([]types.GetRecommandProductListRsp, 0, len(recommendProductList)) for _, v := range recommendProductList { - /*r := image.ThousandFaceImageFormatReq{ - Size: int(req.Size), - IsThousandFace: 0, - Cover: *v.Cover, - CoverImg: *v.CoverImg, - CoverDefault: *v.Cover, - ProductId: v.Id, - UserId: userinfo.UserId, - } - if user.Id != 0 { - r.IsThousandFace = int(*user.IsThousandFace) - } - //千人前面处理 - image.ThousandFaceImageFormat(&r)*/ - isRecommend := int64(0) + isRecommend := false if _, ok := mapRecommend[v.Id]; ok { - isRecommend = 1 + isRecommend = true } minPrice := int64(0) if minVal, ok := mapProductMinPrice[v.Id]; ok { diff --git a/server/product/internal/types/types.go b/server/product/internal/types/types.go index 201907ce..c6ff15a6 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 int64 `json:"is_recommend"` + IsRecommend bool `json:"is_recommend"` MinPrice int64 `json:"min_price"` IsCustomization int64 `json:"is_customization"` } diff --git a/server_api/product.api b/server_api/product.api index e4f1b65f..3e3a4422 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 int64 `json:"is_recommend"` + IsRecommend bool `json:"is_recommend"` MinPrice int64 `json:"min_price"` IsCustomization int64 `json:"is_customization"` }