package system import ( "github.com/gin-gonic/gin" v1 "miniapp/api/v1" "miniapp/middleware" ) type BannerRouter struct { } // InitBannerRouter 注册Banner路由 func (s *BannerRouter) InitBannerRouter(Router *gin.RouterGroup) { hospitalRouter := Router.Group("banner").Use(middleware.OperationRecord()).Use(middleware.JWTAuth()) publicRouter := Router.Group("banner") bannerApi := v1.ApiGroupApp.SystemApiGroup.BannerApi { hospitalRouter.POST("", bannerApi.CreateBanner) // 创建医院 hospitalRouter.DELETE("", bannerApi.DeleteBanner) // 删除医院 hospitalRouter.PUT("", bannerApi.UpdateBanner) // 更新医院 } { publicRouter.GET("list", bannerApi.GetBannerList) // 获取医院列表 publicRouter.GET(":id", bannerApi.GetBannerById) // 获取单条医院消息 } }