We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Page 分页查询查询方法,求总页数时好像没有考虑到记录数“刚好1页”和“多出1页,不足2页”的情况。 应该将:form.TotalPage = num / form.Rows 优化成: if (num % form.Rows) != 0 { form.TotalPage = (num / form.Rows) + 1 } else { form.TotalPage = num / form.Rows }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Page 分页查询查询方法,求总页数时好像没有考虑到记录数“刚好1页”和“多出1页,不足2页”的情况。
应该将:form.TotalPage = num / form.Rows
优化成:
if (num % form.Rows) != 0 {
form.TotalPage = (num / form.Rows) + 1
} else {
form.TotalPage = num / form.Rows
}
The text was updated successfully, but these errors were encountered: