From a79e0aae5d8c107982709e4e75d41be52f5db8cd Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 12 九月 2023 21:11:14 +0800 Subject: [PATCH] 增加操作表,操作明细表,移动历史表,报废表 --- router/router.go | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/router/router.go b/router/router.go index aad1e95..ac1f0c5 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,35 @@ 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) // 鍒犻櫎浣滀笟绫诲瀷 + } + return r } -- Gitblit v1.8.0