Skip to content

Commit

Permalink
从新复制方式
Browse files Browse the repository at this point in the history
  • Loading branch information
hulutech-web committed Nov 7, 2024
1 parent 28ea3df commit f94ac02
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions paginator.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ func (h *HttpResult) SearchByParams(params map[string]string, conditionMap map[s
}
query := facades.Orm().Query()

//默认按照时间降序排序
query.OrderBy("id", "desc")
// 再处理url查询
h.Query = func(q orm.Query) orm.Query {
//处理日期时间
Expand Down Expand Up @@ -104,6 +102,7 @@ func (r *HttpResult) ResultPagination(dest any, withes ...string) (http.Response
for _, with := range withes {
r.Query = r.Query.With(with)
}
r.Query = r.Query.OrderByDesc("id")
r.Query.Paginate(currentPageInt, pageSizeInt, dest, &total)

URL_PATH := r.Context.Request().Origin().URL.Path
Expand Down

0 comments on commit f94ac02

Please sign in to comment.