From 72b40b4f187c5ddcfcc48d85e68142b0fe4f1c21 Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期二, 19 九月 2023 15:50:03 +0800 Subject: [PATCH] 产品分类表字段修改 --- router/router.go | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 47 insertions(+), 1 deletions(-) diff --git a/router/router.go b/router/router.go index aad1e95..0df3ac9 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,51 @@ 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 + "/operationType") + { + operationTypeAPI.GET("operationType", operationTypeController.List) // 鑾峰彇浣滀笟绫诲瀷鍒楄〃 + operationTypeAPI.POST("operationType", operationTypeController.Add) // 鏂板浣滀笟绫诲瀷 + operationTypeAPI.PUT("operationType/:id", operationTypeController.Update) // 淇敼浣滀笟绫诲瀷 + operationTypeAPI.DELETE("operationType/:id", operationTypeController.Delete) // 鍒犻櫎浣滀笟绫诲瀷 + } + + // 鍏ュ簱/鍑哄簱 + operationController := new(controllers.OperationController) + operationAPI := r.Group(urlPrefix + "/operation") + { + //operationAPI.GET() + operationAPI.POST("operation", operationController.Add) + } + + //浜у搧 + 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