1
This commit is contained in:
commit
4170e36ddb
@ -132,3 +132,29 @@ func (pai *PlayerApi) GoldBullionQuery(c *gin.Context) {
|
|||||||
return p
|
return p
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (pai *PlayerApi) TicketConsumeQuery(c *gin.Context) {
|
||||||
|
type TicketConsumeQueryForm struct {
|
||||||
|
Room_id string `binding:"required" json:"room_id"`
|
||||||
|
Account_id string `json:"account_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
reqJson := TicketConsumeQueryForm{}
|
||||||
|
if !checkparam(&reqJson, c) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
filterstr := " match_room_uuid = '" + reqJson.Room_id + "' "
|
||||||
|
if reqJson.Account_id != "" {
|
||||||
|
filterstr += " AND account_id = '" + reqJson.Account_id + "' "
|
||||||
|
}
|
||||||
|
|
||||||
|
cursor := q5.ToInt64(c.DefaultQuery("cursor", ""))
|
||||||
|
sql := fmt.Sprintf(`SELECT * FROM t_ticket_consume_record WHERE idx > %d AND %s `, cursor, filterstr)
|
||||||
|
|
||||||
|
query(constant.GAME_DB, cursor, sql, c, func(ds *f5.DataSet) interface{} {
|
||||||
|
p := new(system.TicketConsume)
|
||||||
|
p.LoadFromDs(ds)
|
||||||
|
return p
|
||||||
|
})
|
||||||
|
}
|
||||||
|
26
server/adminserver/model/system/ticketconsume.go
Normal file
26
server/adminserver/model/system/ticketconsume.go
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package system
|
||||||
|
|
||||||
|
import (
|
||||||
|
"f5"
|
||||||
|
"q5"
|
||||||
|
)
|
||||||
|
|
||||||
|
type TicketConsume struct {
|
||||||
|
Idx int64 `json:"idx"`
|
||||||
|
Match_room_uuid string `gorm:"comment:匹配服房间id" json:"match_room_uuid"`
|
||||||
|
Account_id string `gorm:"comment:账号id" json:"account_id"`
|
||||||
|
Createtime int `gorm:"comment:创建时间" json:"createtime"`
|
||||||
|
Modifytime int `gorm:"comment:修改时间" json:"modifytime"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (gb *TicketConsume) TableName() string {
|
||||||
|
return "t_ticket_consume_record"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (gb *TicketConsume) LoadFromDs(ds *f5.DataSet) {
|
||||||
|
gb.Idx = q5.ToInt64(ds.GetByName("idx"))
|
||||||
|
gb.Match_room_uuid = ds.GetByName("match_room_uuid")
|
||||||
|
gb.Account_id = ds.GetByName("account_id")
|
||||||
|
gb.Createtime = q5.ToInt(ds.GetByName("createtime"))
|
||||||
|
gb.Modifytime = q5.ToInt(ds.GetByName("modifytime"))
|
||||||
|
}
|
@ -16,5 +16,6 @@ func (pr *PlayerRouter) InitPlayerRouter(priRouter *gin.RouterGroup) {
|
|||||||
group.POST("bagquery", api.BagQuery)
|
group.POST("bagquery", api.BagQuery)
|
||||||
group.POST("heroesquery", api.HeroesQuery)
|
group.POST("heroesquery", api.HeroesQuery)
|
||||||
group.POST("goldbullionquery", api.GoldBullionQuery)
|
group.POST("goldbullionquery", api.GoldBullionQuery)
|
||||||
|
group.POST("ticketconsumequery", api.TicketConsumeQuery)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user