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) }