mirror of
https://gitee.com/winc-link/hummingbird.git
synced 2025-04-21 08:52:42 +00:00
20 lines
368 B
Go
20 lines
368 B
Go
package dtos
|
|
|
|
const (
|
|
PageDefault = 1
|
|
PageSizeDefault = 10
|
|
PageSizeMaxDefault = 1000
|
|
)
|
|
|
|
func CorrectionPageParam(query *BaseSearchConditionQuery) {
|
|
if query.Page <= 0 {
|
|
query.Page = PageDefault
|
|
}
|
|
|
|
if query.PageSize >= PageSizeMaxDefault {
|
|
query.PageSize = PageSizeMaxDefault
|
|
} else if query.PageSize <= 0 {
|
|
query.PageSize = PageSizeDefault
|
|
}
|
|
}
|