From 10c086f0824489665da80d6a6627de8e05c2d9f3 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 11 Nov 2024 17:15:24 +0800 Subject: [PATCH] 1 --- server/wheelserver/api/v1/shop/shop.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/wheelserver/api/v1/shop/shop.go b/server/wheelserver/api/v1/shop/shop.go index 0a011812..a52b772d 100644 --- a/server/wheelserver/api/v1/shop/shop.go +++ b/server/wheelserver/api/v1/shop/shop.go @@ -72,5 +72,9 @@ func (this *ShopApi) Buy(c *gin.Context) { f5.RspErr(c, 500, "config error") return } + if user.Score < int64(itemMeta.GetPrice()) { + f5.RspErr(c, 500, "config error") + return + } c.JSON(200, rspObj) }