dongfeng-pay/legend/utils/tableTool.go

13 lines
155 B
Go
Raw Normal View History

2021-05-16 15:21:52 +08:00
package utils
/**
** 计算偏移量
*/
func CountOffset(page, limit int) int {
if page > 0 {
return (page - 1) * limit
} else {
return limit
}
}