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