From 548d49271f2bcbc15102bfcbcab8e4d1240b7348 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 6 Jun 2023 19:43:22 +0800 Subject: [PATCH] fix --- product/internal/logic/getproductlistlogic.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/product/internal/logic/getproductlistlogic.go b/product/internal/logic/getproductlistlogic.go index 53081a7c..6ab1fd41 100644 --- a/product/internal/logic/getproductlistlogic.go +++ b/product/internal/logic/getproductlistlogic.go @@ -145,13 +145,9 @@ func (l *GetProductListLogic) GetProductList(req *types.GetProductListReq, login itemList := make([]types.Items, 0, productLen) for _, v := range productList { minPrice, ok := mapProductMinPrice[v.Id] - //无最小价格则不显示 - if !ok { - continue - } - _, ok = mapProductTemplate[v.Id] - //没有模板也不显示 - if !ok { + _, tmpOk := mapProductTemplate[v.Id] + //无最小价格则不显示 || 没有模板也不显示 + if !ok || !tmpOk { continue } item := types.Items{