未验证 提交 d5febe48 编写于 作者: S songzhibin97 提交者: GitHub

fix: #729 (#730)

fix: #729
上级 cf027838
......@@ -121,7 +121,8 @@ func (authorityService *AuthorityService) DeleteAuthority(auth *system.SysAuthor
func (authorityService *AuthorityService) GetAuthorityInfoList(info request.PageInfo) (err error, list interface{}, total int64) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB
db := global.GVA_DB.Model(&system.SysAuthority{})
err = db.Where("parent_id = 0").Count(&total).Error
var authority []system.SysAuthority
err = db.Limit(limit).Offset(offset).Preload("DataAuthorityId").Where("parent_id = 0").Find(&authority).Error
if len(authority) > 0 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册