From f5ab99ae2557c1ce9759c95a57f99eddfbc9c91e Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 8 Nov 2023 15:41:03 +0800 Subject: [PATCH] fix --- server/product/internal/logic/gettagproductlistlogic.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/product/internal/logic/gettagproductlistlogic.go b/server/product/internal/logic/gettagproductlistlogic.go index 4770e77f..82af039c 100644 --- a/server/product/internal/logic/gettagproductlistlogic.go +++ b/server/product/internal/logic/gettagproductlistlogic.go @@ -220,7 +220,10 @@ func (l *GetTagProductListLogic) getProductRelationInfo(req getProductRelationIn if partList.PartList == "" { continue } - req.MapProductHaveOptionFitting[partList.ProductId] = struct{}{} + //两个以上才是有可选配件 + if len(strings.Split(partList.PartList, ",")) > 1 { + req.MapProductHaveOptionFitting[partList.ProductId] = struct{}{} + } } //获取产品标签相关属性 productTagPropList, err := l.svcCtx.AllModels.FsProductTagProp.GetTagPropByProductIdsWithProductTag(l.ctx, productIds)