From 98e2fa8b31fa5685151d28c405e120ed7e4080f1 Mon Sep 17 00:00:00 2001 From: chenlin Date: Thu, 9 Jan 2025 16:50:57 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E8=AE=A2=E5=8D=95=E6=97=B6=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E5=85=91=E6=8D=A2=E6=8A=A5=E9=94=99=E7=9A=84=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/mall.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/mall.go b/controller/mall.go index a99ee64..fb095cd 100644 --- a/controller/mall.go +++ b/controller/mall.go @@ -270,7 +270,7 @@ func MallOrderCreate(c *gin.Context) { totalRm := (combo.PriceRm*req.Quantity*discount + 5) / model.Rmb couponDiscount := userCoupon.Value - if totalRm <= couponDiscount { + if totalRm < couponDiscount { log.Error().Msgf("coupon value[%d] is err, code is:", couponDiscount, req.CouponCode) RespJson(c, status.InternalServerError, nil) return