提交 2580a3db 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

修复total返回为0的bug

上级 05d067b8
......@@ -53,6 +53,7 @@ func GetFileRecordInfoList(info request.PageInfo) (err error, list interface{},
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB
var fileLists []model.ExaFileUploadAndDownload
err = db.Find(&fileLists).Count(&total).Error
err = db.Limit(limit).Offset(offset).Order("updated_at desc").Find(&fileLists).Error
return err, fileLists, total
}
......@@ -79,6 +79,7 @@ func GetUserInfoList(info request.PageInfo) (err error, list interface{}, total
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB
var userList []model.SysUser
err = db.Find(&userList).Count(&total).Error
err = db.Limit(limit).Offset(offset).Preload("Authority").Find(&userList).Error
return err, userList, total
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册