product_router.go
992 字节
package routers
import (
"github.com/beego/beego/v2/server/web"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/port/beego/controllers"
)
func init() {
web.Router("/products/", &controllers.ProductController{}, "Post:CreateProduct")
web.Router("/products/:productId", &controllers.ProductController{}, "Put:UpdateProduct")
web.Router("/products/:productId", &controllers.ProductController{}, "Get:GetProduct")
web.Router("/products/:productId", &controllers.ProductController{}, "Delete:RemoveProduct")
web.Router("/products/batch-remove", &controllers.ProductController{}, "Post:BatchRemoveProduct")
web.Router("/products/", &controllers.ProductController{}, "Get:ListProduct")
web.Router("/products/search", &controllers.ProductController{}, "Post:SearchProduct")
web.Router("/products/batch-add", &controllers.ProductController{}, "Post:BatchAddProduct")
web.Router("/products/generate-code", &controllers.ProductController{}, "Post:GenProductCode")
}