package routers import ( "ERP_salary/controllers" errorlibs "git.baozhida.cn/ERP_libs/Error" beego "github.com/beego/beego/v2/server/web" ) func init() { beego.ErrorController(&errorlibs.ErrorController{}) //过滤器,拦截所有请求 beego.InsertFilter("/*", beego.BeforeRouter, RBACFilter) ns := beego.NewNamespace("/Salary", beego.NSRouter("/List", &controllers.SalaryController{}, "*:Salary_List"), // 薪资列表 beego.NSRouter("/User_List", &controllers.SalaryController{}, "*:Salary_User_List"), // 我的薪资列表 beego.NSRouter("/Get", &controllers.SalaryController{}, "*:Salary_Get"), // 获取薪资 beego.NSRouter("/User_Get", &controllers.SalaryController{}, "*:Salary_User_Get"), // 我的薪资 beego.NSRouter("/Post", &controllers.SalaryController{}, "*:Salary_Post"), // 添加薪资 beego.NSRouter("/Send", &controllers.SalaryController{}, "*:Send_Salary"), // 发送薪资 beego.NSRouter("/Excel", &controllers.SalaryController{}, "*:Salary_Excel"), // 导出excel ) beego.AddNamespace(ns) }