资源权限功能示例

This commit is contained in:
pixel
2020-02-25 18:15:20 +08:00
parent a8cbf2d773
commit 3e41b84ea8
8 changed files with 216 additions and 2 deletions

View File

@@ -71,7 +71,12 @@ func (a *SysApi) GetInfoList(info modelInterface.PageInfo) (err error, list inte
return
} else {
var apiList []SysApi
err = db.Order("group", true).Where("path LIKE ?", "%"+a.Path+"%").Find(&apiList).Count(&total).Error
err = qmsql.DEFAULTDB.Where("path LIKE ?", "%"+a.Path+"%").Find(&apiList).Count(&total).Error
if err!=nil{
return err, apiList, total
}else{
err = db.Order("group", true).Where("path LIKE ?", "%"+a.Path+"%").Find(&apiList).Error
}
return err, apiList, total
}
}