1
This commit is contained in:
parent
47b5018d19
commit
759365412e
@ -53,10 +53,6 @@ func (this *RechargeApi) Buy(c *gin.Context) {
|
|||||||
f5.RspErr(c, 1, err.Error())
|
f5.RspErr(c, 1, err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if reqJson.Num <= 0 {
|
|
||||||
f5.RspErr(c, 2, "num param error")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
currencyMeta := mt.Table.RechargeCurrency.Get(reqJson.NetId)
|
currencyMeta := mt.Table.RechargeCurrency.Get(reqJson.NetId)
|
||||||
if currencyMeta == nil {
|
if currencyMeta == nil {
|
||||||
f5.RspErr(c, 2, "server internal error")
|
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")
|
f5.RspErr(c, 2, "goods id param error")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if reqJson.Num < 0 {
|
if reqJson.Num < 0 || reqJson.Num > goodsMeta.GetMaxBuyTimes() {
|
||||||
f5.RspErr(c, 2, "num param error")
|
f5.RspErr(c, 2, "num param error")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user