product_code.go 389 B

12345678910111213141516
  1. package routers
  2. import (
  3. "Medical_ERP/controllers"
  4. beego "github.com/beego/beego/v2/server/web"
  5. )
  6. func init() {
  7. // 分组
  8. productCode := beego.NewNamespace("/api/product-code",
  9. beego.NSRouter("/list", &controllers.ProductCodeController{}, "*:List"),
  10. beego.NSRouter("/gen", &controllers.ProductCodeController{}, "*:Gen"),
  11. )
  12. //注册 namespace
  13. beego.AddNamespace(productCode)
  14. }