This commit is contained in:
aozhiwei 2024-08-07 15:51:19 +08:00
parent 47b5018d19
commit 759365412e

View File

@ -53,10 +53,6 @@ func (this *RechargeApi) Buy(c *gin.Context) {
f5.RspErr(c, 1, err.Error())
return
}
if reqJson.Num <= 0 {
f5.RspErr(c, 2, "num param error")
return
}
currencyMeta := mt.Table.RechargeCurrency.Get(reqJson.NetId)
if currencyMeta == nil {
f5.RspErr(c, 2, "server internal error")
@ -82,7 +78,7 @@ func (this *RechargeApi) Buy(c *gin.Context) {
f5.RspErr(c, 2, "goods id param error")
return
}
if reqJson.Num < 0 {
if reqJson.Num < 0 || reqJson.Num > goodsMeta.GetMaxBuyTimes() {
f5.RspErr(c, 2, "num param error")
return
}