在actions中添加权限
This commit is contained in:
1 parent
61451d149a
commit
abc8b271c4
4 files changed
+78
-3
No files matched your search
@@ -2,6 +2,7 @@ package models
|
||||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
"gorm.io/gorm"
|
||||
|
||||
orm "go-admin/global"
|
||||
"go-admin/tools"
|
||||
@@ -33,6 +34,10 @@ type MenuIdList struct {
|
||||
MenuId int `json:"menuId"`
|
||||
}
|
||||
|
||||
func (role *SysRole) GetById(tx *gorm.DB, id interface{}) error {
|
||||
return tx.First(role, id).Error
|
||||
}
|
||||
|
||||
func (role *SysRole) GetPage(pageSize int, pageIndex int) ([]SysRole, int, error) {
|
||||
var doc []SysRole
|
||||
|
||||
|
||||
Reference in new issue
Block a user