product_material_router.go 1.1 KB
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("/product-materials/", &controllers.ProductMaterialController{}, "Post:CreateProductMaterial")                     //新增单个物料
	web.Router("/product-materials/:productMaterialId", &controllers.ProductMaterialController{}, "Put:UpdateProductMaterial")    //更新单个物料
	web.Router("/product-materials/:productMaterialId", &controllers.ProductMaterialController{}, "Get:GetProductMaterial")       //获取单个物料
	web.Router("/product-materials/:productMaterialId", &controllers.ProductMaterialController{}, "Delete:RemoveProductMaterial") //删除单个物料
	web.Router("/product-materials/", &controllers.ProductMaterialController{}, "Get:ListProductMaterial")
	web.Router("/product-materials/search", &controllers.ProductMaterialController{}, "Post:SearchProductMaterial")            //搜索返回列表
	web.Router("/product-materials/batch-remove", &controllers.ProductMaterialController{}, "Post:BatchRemoveProductMaterial") //批量删除物料
}