Browse Source

fix: add query by page

master
shenjiachi 1 week ago
parent
commit
cdde214ae9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/implement/user_implement.go

+ 1
- 1
src/implement/user_implement.go View File

@@ -143,7 +143,7 @@ func (u UserDb) UserFindAndCount(uid int64, phone string, nickname string, level
if level != 0 {
session = session.Where("level=?", level)
}
total, err := session.FindAndCount(&m)
total, err := session.Limit(limit, (page-1)*limit).FindAndCount(&m)
if err != nil {
return nil, 0, zhios_order_relate_logx.Error(err)
}


Loading…
Cancel
Save