package routers import ( "Medical_ERP/controllers" beego "github.com/beego/beego/v2/server/web" ) func init() { // 分组 productCode := beego.NewNamespace("/api/product-code", beego.NSRouter("/list", &controllers.ProductCodeController{}, "*:List"), beego.NSRouter("/gen", &controllers.ProductCodeController{}, "*:Gen"), ) //注册 namespace beego.AddNamespace(productCode) }