Compare commits
2
Commits
b34984be74
...
445c6407db
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
445c6407db | ||
|
|
a61f85b4e7 |
No files matched your search
@@ -21,6 +21,9 @@ type calculate struct {
|
|||||||
//
|
//
|
||||||
// Date : 15:50 2022/7/17
|
// Date : 15:50 2022/7/17
|
||||||
func (c *calculate) GetTotalPage(total int64, pageSize int64) int64 {
|
func (c *calculate) GetTotalPage(total int64, pageSize int64) int64 {
|
||||||
|
if pageSize <= 0 {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
totalPage := total / pageSize
|
totalPage := total / pageSize
|
||||||
if total%pageSize > 0 {
|
if total%pageSize > 0 {
|
||||||
totalPage++
|
totalPage++
|
||||||
|
|||||||