Commit 31feefe6 authored by 沈晨阳's avatar 沈晨阳
Browse files

fix(page): fix 多个页面分页bug

Showing with 3 additions and 3 deletions
+3 -3
......@@ -114,7 +114,7 @@ func (c *cluster) Search(num, size int, conditions common.Conditions, options co
return db.Select().Limit(size).Skip((num - 1) * size).OrderBy("CreateAt").Reverse()
}
}()
count, err := query.Count(&v1Cluster.Cluster{})
count, err := db.Select().Count(&v1Cluster.Cluster{})
if err != nil {
return nil, 0, err
}
......
......@@ -141,7 +141,7 @@ func (s *service) Search(num, size int, conditions common.Conditions, options co
query.Limit(size).Skip((num - 1) * size)
}
count, err := query.Count(&v1Role.Role{})
count, err := db.Select().Count(&v1Role.Role{})
if err != nil {
return nil, 0, err
}
......
......@@ -117,7 +117,7 @@ func (u *service) Search(num, size int, conditions common.Conditions, options co
}
return db.Select().OrderBy("CreateAt")
}()
count, err := query.Count(&v1User.User{})
count, err := db.Select().Count(&v1User.User{})
if err != nil {
return nil, 0, err
}
......
Supports Markdown
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