controllger.go 525 B

12345678910111213141516171819202122
  1. package rank
  2. import (
  3. "bet24.com/log"
  4. "github.com/gin-gonic/gin"
  5. "net/http"
  6. )
  7. // 获取排行榜列表
  8. func GetRankingList(c *gin.Context) {
  9. obj := NewGetRankingList()
  10. if err := c.ShouldBind(&obj.In); err != nil {
  11. log.Debug("%s shouldBind err %v", "getRankingList", err)
  12. return
  13. }
  14. count, list := mgr.getRankingList(obj.In.SearchKey, obj.In.BeginTime, obj.In.EndTime, obj.In.RankType,
  15. obj.In.PageIndex, obj.In.PageSize)
  16. obj.Out.RecordCount = count
  17. obj.Out.List = list
  18. c.JSON(http.StatusOK, obj.Out)
  19. return
  20. }