JM-WechatMini/router/system/banner.go

29 lines
914 B
Go
Raw Normal View History

2023-11-02 04:34:46 +08:00
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) // 更新医院
hospitalRouter.PUT("status", bannerApi.UpdateBannerStatus) // 更新医院状态
2023-11-02 04:34:46 +08:00
}
{
publicRouter.GET("list", bannerApi.GetBannerList) // 获取医院列表
publicRouter.GET(":id", bannerApi.GetBannerById) // 获取单条医院消息
}
}