lckt-server/router/notice/notice.go
2025-05-10 03:34:25 +08:00

29 lines
1.0 KiB
Go

package notice
import (
"git.echol.cn/loser/lckt/middleware"
"github.com/gin-gonic/gin"
)
type NoticeRouter struct{}
// InitNoticeRouter 初始化 通知 路由信息
func (s *NoticeRouter) InitNoticeRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
notRouter := Router.Group("not").Use(middleware.OperationRecord())
notRouterWithoutRecord := Router.Group("not")
notRouterWithoutAuth := PublicRouter.Group("not")
{
notRouter.POST("createNotice", notApi.CreateNotice) // 新建通知
notRouter.DELETE("deleteNotice", notApi.DeleteNotice) // 删除通知
notRouter.DELETE("deleteNoticeByIds", notApi.DeleteNoticeByIds) // 批量删除通知
notRouter.PUT("updateNotice", notApi.UpdateNotice) // 更新通知
}
{
notRouterWithoutRecord.GET("findNotice", notApi.FindNotice) // 根据ID获取通知
notRouterWithoutRecord.GET("getNoticeList", notApi.GetNoticeList) // 获取通知列表
}
{
notRouterWithoutAuth.GET("getNoticePublic", notApi.GetNoticePublic) // 通知开放接口
}
}