dongfeng-pay/legend/utils/tableTool.go
2021-05-16 15:21:52 +08:00

13 lines
155 B
Go

package utils
/**
** 计算偏移量
*/
func CountOffset(page, limit int) int {
if page > 0 {
return (page - 1) * limit
} else {
return limit
}
}