package menu import ( "github.com/gin-gonic/gin" menuParam "wechat-robot/model/param/menu" "wechat-robot/pkg/response" "wechat-robot/service/menu" ) // Save // @description: 保存菜单 // @param ctx func Save(ctx *gin.Context) { var p menuParam.Save if err := ctx.ShouldBind(&p); err != nil { response.New(ctx).SetError(err).Fail() return } if err := menu.Save(p); err != nil { response.New(ctx).SetError(err).Fail() return } response.New(ctx).Success() }