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 40f855d commit 28ea3df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paginator.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ 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 @@ -102,8 +104,6 @@ func (r *HttpResult) ResultPagination(dest any, withes ...string) (http.Response
for _, with := range withes {
r.Query = r.Query.With(with)
}
//默认按照时间降序排序
r.Query.OrderBy("id", "desc")
r.Query.Paginate(currentPageInt, pageSizeInt, dest, &total)

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

0 comments on commit 28ea3df

Please sign in to comment.