JM-WechatMini/router/system/hospital.go

29 lines
838 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 HospitalRouter struct {
}
// InitHospitalRouter 注册医院路由
func (s *RouterGroup) InitHospitalRouter(Router *gin.RouterGroup) {
hospitalRouter := Router.Group("hospital").Use(middleware.OperationRecord()).Use(middleware.JWTAuth())
publicRouter := Router.Group("hospital")
hospitalApi := v1.ApiGroupApp.SystemApiGroup.HospitalApi
{
hospitalRouter.POST("", hospitalApi.CreateHospital) // 创建医院
hospitalRouter.DELETE("", hospitalApi.DeleteHospital) // 删除医院
hospitalRouter.PUT("", hospitalApi.UpdateHospital) // 更新医院
}
{
publicRouter.GET("list", hospitalApi.GetHospitalList) // 获取医院列表
publicRouter.GET(":id", hospitalApi.GetHospitalById) // 获取单条医院消息
}
}