From 9c7551a7a752c07db11b0fd23bfba8da1ad062e0 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 21 六月 2024 20:39:12 +0800 Subject: [PATCH] fix 404 --- router/router.go | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/router/router.go b/router/router.go index f51224c..81695c8 100644 --- a/router/router.go +++ b/router/router.go @@ -66,6 +66,18 @@ locationAPI.GET("getLocationTreeList", locationController.GetLocationTreeList) //鑾峰彇浣嶇疆鍒楄〃鏍� } + // 灞炴�т俊鎭� + attributeController := new(controllers.AttributeController) + attributeAPI := r.Group(urlPrefix + "/attribute") + { + attributeAPI.POST("attribute", attributeController.Add) // 娣诲姞灞炴�� + attributeAPI.PUT("updateAttribute/:id", attributeController.Update) // 淇敼灞炴�� + attributeAPI.DELETE("delete/:id", attributeController.Delete) // 鍒犻櫎灞炴�� + attributeAPI.POST("attribute", attributeController.ListAttribute) // 鑾峰彇灞炴�� + attributeAPI.GET("primary/:id", attributeController.PrimaryAttribute) //鍒犻櫎 + //attributeAPI.GET("attribute/:id", attributeController.GetAttributeDetail) // 鑾峰彇灞炴�� + } + // 涓氬姟绫诲瀷 operationTypeController := new(controllers.OperationTypeController) operationTypeAPI := r.Group(urlPrefix + "/operationType") @@ -124,6 +136,7 @@ productAPI.GET("getUserInfo", productController.GetUserInfo) //鑾峰彇鐧诲綍鐢ㄦ埛淇℃伅 productAPI.GET("getUnitInfo", productController.GetUnitInfo) //鑾峰彇鍗曚綅淇℃伅 productAPI.POST("saveUnitDict", productController.SaveUnitDict) //鏇存柊璁¢噺鍗曚綅瀛楀吀 + productAPI.POST("inputProduct", productController.InputProduct) //鏇存柊璁¢噺鍗曚綅瀛楀吀 } @@ -193,7 +206,9 @@ { attributeValueAPI.POST("add", attributeValueController.AddAttributeValue) attributeValueAPI.POST("update", attributeValueController.UpdateAttributeValue) - attributeValueAPI.DELETE("delete/:id", attributeValueController.DeleteAttributeValue) //鍒犻櫎浣嶇疆 + attributeValueAPI.DELETE("delete/:id", attributeValueController.DeleteAttributeValue) //鍒犻櫎 + attributeValueAPI.POST("list", attributeValueController.ListAttributeValue) + attributeValueAPI.GET("primary/:id", attributeValueController.PrimaryAttributeValue) //鍒犻櫎 } return r -- Gitblit v1.8.0