jiangshuai
2023-09-19 a6f82a1a1cbb4a3dfde004cf29b91c9b4c7da7c3
router/router.go
@@ -65,8 +65,24 @@
   operationController := new(controllers.OperationController)
   operationAPI := r.Group(urlPrefix + "/operation")
   {
      //operationAPI.GET()
      operationAPI.GET("operation", operationController.List)
      operationAPI.POST("operation", operationController.Add)
      operationAPI.PUT("operation/:id", operationController.Update)
      operationAPI.DELETE("operation/:id", operationController.Delete)
   }
   //产品
   productController := new(controllers.ProductController)
   productAPI := r.Group(urlPrefix + "/product")
   {
      productAPI.POST("addProduct", productController.AddProduct)         // 新增产品
      productAPI.POST("getProductList", productController.GetProductList) // 获取产品列表
   }
   locationController := new(controllers.LocationController)
   locationAPI := r.Group(urlPrefix + "/location")
   {
      locationAPI.POST("listByType", locationController.ListLocationByType)
   }
   return r