Skip to content

Commit

Permalink
fix paging data empty
Browse files Browse the repository at this point in the history
  • Loading branch information
summerblue committed Jan 20, 2022
1 parent 8610d4d commit be66001
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/paginator/paginator.go
Expand Up @@ -64,11 +64,6 @@ func Paginate(c *gin.Context, db *gorm.DB, data interface{}, baseURL string, per
}
p.initProperties(perPage, baseURL)

// 数据不够分页
if p.TotalCount <= int64(p.PerPage) {
return Paging{}
}

// 查询数据库
err := p.query.Preload(clause.Associations). // 读取关联
Order(p.Sort + " " + p.Order). // 排序
Expand Down

0 comments on commit be66001

Please sign in to comment.