This commit is contained in:
aozhiwei 2024-11-11 17:09:08 +08:00
parent 8f32dc45b3
commit e3be6c82f7

View File

@ -57,6 +57,16 @@ func (this *ShopApi) Buy(c *gin.Context) {
return
} else if !found {
f5.RspErr(c, 500, "server internal error")
return
}
itemMeta := mt.Table.Item.GetById(int64(reqJson.ItemId))
if itemMeta == nil {
f5.RspErr(c, 500, "item_id error1")
return
}
if itemMeta.GetItemType() == constant.VIRTUAL_ITEM_SCORE {
f5.RspErr(c, 500, "item_id error2")
return
}
c.JSON(200, rspObj)
}