Commit a3c5585b authored by szh's avatar szh

update offset

parent 871b5b0a
......@@ -42,7 +42,7 @@ func GetMinerTxsTotal(addr string) (int64, error) {
// GetAddrs gets a list of articles based on paging constraints
func GetMinerTxs(pageNum int32, pageSize int32, maps interface{}) ([]*RaspMinerTxs, error) {
var txs []*RaspMinerTxs
err := db.Where(maps).Offset(pageNum-1).Limit(pageSize).Find(&txs).Error
err := db.Where(maps).Offset((pageNum-1)*pageSize).Limit(pageSize).Find(&txs).Error
if err != nil && err != gorm.ErrRecordNotFound {
return nil, err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment