update: The code structure is finished, and the project can run successfully
This commit is contained in:
@@ -97,8 +97,8 @@ func ParamsMatchFunc(args ...interface{}) (interface{}, error) {
|
||||
//持久化到数据库 引入自定义规则
|
||||
func Casbin() *casbin.Enforcer {
|
||||
a := gormadapter.NewAdapterByDB(global.GVA_DB)
|
||||
e := casbin.NewEnforcer(global.GVA_CONFIG.CasbinConfig.ModelPath, a)
|
||||
e := casbin.NewEnforcer(global.GVA_CONFIG.Casbin.ModelPath, a)
|
||||
e.AddFunction("ParamsMatch", ParamsMatchFunc)
|
||||
e.LoadPolicy()
|
||||
_ = e.LoadPolicy()
|
||||
return e
|
||||
}
|
||||
|
6
server/model/sys_common.go
Normal file
6
server/model/sys_common.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package model
|
||||
|
||||
type PageInfo struct {
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"pageSize"`
|
||||
}
|
Reference in New Issue
Block a user