调整
This commit is contained in:
parent
377f7b422b
commit
a6fefc579d
@ -18,7 +18,7 @@ func (bpa *BlockPlayerApi) List(c *gin.Context) {
|
||||
req := struct {
|
||||
PageDto system.PageDto `json:"page_dto"`
|
||||
}{}
|
||||
if err := c.ShouldBindQuery(&req); err != nil {
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"code": 1,
|
||||
"message": err.Error(),
|
||||
@ -56,8 +56,8 @@ func (bpa *BlockPlayerApi) List(c *gin.Context) {
|
||||
"message": "获取成功",
|
||||
"data": result,
|
||||
"total": pg.Total,
|
||||
"totalpage": pg.TotalPages,
|
||||
"curpage": pg.CurrentPage,
|
||||
"total_page": pg.TotalPages,
|
||||
"cur_page": pg.CurrentPage,
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -105,7 +105,7 @@ func (bpa *BlockPlayerApi) Add(c *gin.Context) {
|
||||
func (bpa *BlockPlayerApi) Edit(c *gin.Context) {
|
||||
req := struct {
|
||||
Account string `binding:"required" json:"account_id"`
|
||||
Blocked int32 `binding:"required" json:"blocked"`
|
||||
Blocked int32 `json:"blocked"`
|
||||
}{}
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
|
@ -1,7 +1,7 @@
|
||||
package system
|
||||
|
||||
type BlockPlayer struct {
|
||||
Account string `gorm:"column:account_id" json:"account_id,string"`
|
||||
Account string `gorm:"column:account_id" json:"account_id"`
|
||||
Blocked int32 `gorm:"column:blocked" json:"blocked"`
|
||||
CreateTime int32 `gorm:"column:createtime" json:"createtime"`
|
||||
ModifyTime int32 `gorm:"column:modifytime" json:"modifytime"`
|
||||
|
@ -27,6 +27,8 @@ func (this *routerMgr) Init() {
|
||||
this.system.InitPlayerRouter(priGroup)
|
||||
this.system.InitNFTRouter(priGroup)
|
||||
this.system.InitGameSwitchRouter(priGroup)
|
||||
this.system.InitBlockPlayerRouter(priGroup)
|
||||
|
||||
f5.GetSysLog().Info("routerMgr.init")
|
||||
}
|
||||
|
||||
|
@ -11,4 +11,5 @@ type RouterGroup struct {
|
||||
PlayerRouter
|
||||
NFTRouter
|
||||
GameSwitchRoute
|
||||
BlockPlayerRoute
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user