配方增删改查服务层和控制器
This commit is contained in:
@@ -252,6 +252,13 @@ func (a *API) setupRoutes() {
|
||||
feedGroup.GET("/pig-types/:id", a.pigTypeController.GetPigType)
|
||||
feedGroup.GET("/pig-types", a.pigTypeController.ListPigTypes)
|
||||
feedGroup.PUT("/pig-types/:id/nutrient-requirements", a.pigTypeController.UpdatePigTypeNutrientRequirements)
|
||||
|
||||
// 配方 (Recipe) 路由
|
||||
feedGroup.POST("/recipes", a.recipeController.CreateRecipe)
|
||||
feedGroup.PUT("/recipes/:id", a.recipeController.UpdateRecipe)
|
||||
feedGroup.DELETE("/recipes/:id", a.recipeController.DeleteRecipe)
|
||||
feedGroup.GET("/recipes/:id", a.recipeController.GetRecipe)
|
||||
feedGroup.GET("/recipes", a.recipeController.ListRecipes)
|
||||
}
|
||||
logger.Debug("饲料管理相关接口注册成功 (需要认证和审计)")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user