Commit cfcc97f1 authored by haoyanbin's avatar haoyanbin

分页

parent a8b40bc0
...@@ -134,14 +134,14 @@ func (e OrgPlayer) Get(c *gin.Context) { ...@@ -134,14 +134,14 @@ func (e OrgPlayer) Get(c *gin.Context) {
// @Tags <手机端>球员数据 // @Tags <手机端>球员数据
// @Param playerId path string false "playerId" // @Param playerId path string false "playerId"
// @Success 200 {string} string "{"code": 200, "data": [...]}" // @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /mobile/v1/org-player/info/{id} [get] // @Router /mobile/v1/org-player/info [get]
// @Security Bearer // @Security Bearer
func (e OrgPlayer) GetInfo(c *gin.Context) { func (e OrgPlayer) GetInfo(c *gin.Context) {
req := dto.OrgPlayerGetReq{} req := dto.OrgPlayerGetReq{}
s := service.OrgPlayer{} s := service.OrgPlayer{}
c.Bind(&req)
err := e.MakeContext(c). err := e.MakeContext(c).
MakeOrm(). MakeOrm().
Bind(&req).
MakeService(&s.Service). MakeService(&s.Service).
Errors Errors
if err != nil { if err != nil {
......
...@@ -16,7 +16,7 @@ func registerOrgPlayerRouter(v1 *gin.RouterGroup) { ...@@ -16,7 +16,7 @@ func registerOrgPlayerRouter(v1 *gin.RouterGroup) {
{ {
r.GET("", api.GetPage) r.GET("", api.GetPage)
r.GET("/:id", api.Get) r.GET("/:id", api.Get)
r.GET("/info/:id", api.GetInfo) r.GET("/info", api.GetInfo)
r.GET("/get-match-season/:id", api.GetOrgMatchSeason) r.GET("/get-match-season/:id", api.GetOrgMatchSeason)
r.GET("/evaluate", api.GetOrgMatchEvaluate) r.GET("/evaluate", api.GetOrgMatchEvaluate)
r.GET("/get-rounds", api.GetOrgRounds) r.GET("/get-rounds", api.GetOrgRounds)
......
...@@ -140,7 +140,7 @@ type OrgMatchEvaluateList struct { ...@@ -140,7 +140,7 @@ type OrgMatchEvaluateList struct {
// OrgPlayerGetReq 功能获取请求参数 // OrgPlayerGetReq 功能获取请求参数
type OrgPlayerGetReq struct { type OrgPlayerGetReq struct {
dto.Pagination `search:"-"` dto.Pagination `search:"-"`
PlayerId int `uri:"id"` PlayerId int `form:"playerId" json:"playerId"`
} }
type OrgPlayerGetReply struct { type OrgPlayerGetReply struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment