Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

分页列表接口,兼容不分页获取全部数据 #1526

Merged
merged 2 commits into from
Aug 29, 2023
Merged

分页列表接口,兼容不分页获取全部数据 #1526

merged 2 commits into from
Aug 29, 2023

Conversation

zyw0605688
Copy link
Contributor

分页获取数据接口,增加判断pagesize,如果不传分页参数或pagesize为0,不分页返回所有数据。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if limit !=0 {
db=db.limit(limit).offset(offset)
}
db.Find(&{{.Abbreviation}}s).Error

@piexlmax piexlmax merged commit ab13b39 into flipped-aurora:main Aug 29, 2023
8 checks passed
songzhibin97 pushed a commit that referenced this pull request Oct 11, 2023
* feat:'分页列表接口,兼容不分页获取全部数据'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants