From 9476414e68226424afaff5a141f26e7da02603ab Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 18 Sep 2023 14:53:15 +0800 Subject: [PATCH] fix --- server/shopping-cart/internal/logic/calculatecartpricelogic.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/shopping-cart/internal/logic/calculatecartpricelogic.go b/server/shopping-cart/internal/logic/calculatecartpricelogic.go index 3b68a93c..8a9fe327 100644 --- a/server/shopping-cart/internal/logic/calculatecartpricelogic.go +++ b/server/shopping-cart/internal/logic/calculatecartpricelogic.go @@ -131,6 +131,8 @@ func (l *CalculateCartPriceLogic) CalculateCartPrice(req *types.CalculateCartPri if *cart.FittingId > 0 { if fittingPrice, ok := mapFitting[*cart.FittingId]; ok { itemPrice += fittingPrice + } else { + return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "cart contain some one witch lose fitting:%d", *cart.FittingId) } } //单个购物车总价