From 40eb578f79a0f0dcf0bbfa2c267478d159f0f58c Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期一, 18 九月 2023 20:03:16 +0800 Subject: [PATCH] 产品表字段更改 --- router/router.go | 40 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 39 insertions(+), 1 deletions(-) diff --git a/router/router.go b/router/router.go index aad1e95..05a0153 100644 --- a/router/router.go +++ b/router/router.go @@ -19,7 +19,7 @@ r.StaticFS(conf.LocalConf.StorePath, http.Dir(conf.LocalConf.StorePath)) // 涓虹敤鎴峰ご鍍忓拰鏂囦欢鎻愪緵闈欐�佸湴鍧� r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler)) - urlPrefix := "/api-s/v1" + urlPrefix := "/api-wms/v1" // 缁勭粐绠$悊 departmentController := new(controllers.DepartmentController) @@ -31,5 +31,43 @@ organizeAPI.DELETE("department/:id", departmentController.Delete) // 鍒犻櫎閮ㄩ棬 } + // 鍏徃绠$悊 + companyController := new(controllers.CompanyController) + companyAPI := r.Group(urlPrefix + "/company") + { + companyAPI.GET("company", companyController.List) // 鑾峰彇鍏徃鍒楄〃 + companyAPI.POST("company", companyController.Add) // 鏂板鍏徃 + companyAPI.PUT("company/:id", companyController.Update) // 淇敼鍏徃 + companyAPI.DELETE("company/:id", companyController.Delete) // 鍒犻櫎鍏徃 + } + + // 浠撳簱绠$悊 + warehouseController := new(controllers.WarehouseController) + warehouseAPI := r.Group(urlPrefix + "/warehouse") + { + warehouseAPI.GET("warehouse", warehouseController.List) // 鑾峰彇浠撳簱鍒楄〃 + warehouseAPI.POST("warehouse", warehouseController.Add) // 鏂板浠撳簱 + warehouseAPI.PUT("warehouse/:id", warehouseController.Update) // 淇敼浠撳簱 + warehouseAPI.DELETE("warehouse/:id", warehouseController.Delete) // 鍒犻櫎浠撳簱 + } + + // 浣滀笟绫诲瀷 + operationTypeController := new(controllers.OperationTypeController) + operationTypeAPI := r.Group(urlPrefix + "/warehouse") + { + operationTypeAPI.GET("operationType", operationTypeController.List) // 鑾峰彇浣滀笟绫诲瀷鍒楄〃 + operationTypeAPI.POST("operationType", operationTypeController.Add) // 鏂板浣滀笟绫诲瀷 + operationTypeAPI.PUT("operationType/:id", operationTypeController.Update) // 淇敼浣滀笟绫诲瀷 + operationTypeAPI.DELETE("operationType/:id", operationTypeController.Delete) // 鍒犻櫎浣滀笟绫诲瀷 + } + + //浜у搧 + productController := new(controllers.ProductController) + productAPI := r.Group(urlPrefix + "/product") + { + productAPI.POST("addProduct", productController.AddProduct) // 鏂板浜у搧 + productAPI.POST("getProductList", productController.GetProductList) // 鑾峰彇浜у搧鍒楄〃 + } + return r } -- Gitblit v1.8.0