在actions中添加权限

This commit is contained in:
linwenxiang committed 2020-08-30 00:21:03 +08:00
1 parent 61451d149a
commit abc8b271c4
4 files changed
+78 -3

No files matched your search

+5
View File
@@ -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