Files
lckt-server/router/notice/notice.go
2025-07-31 02:41:09 +08:00

26 lines
1015 B
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())
notRouterWithoutAuth := PublicRouter.Group("not")
{
notRouter.POST("createNotice", notApi.CreateNotice) // 新建通知
notRouter.DELETE("deleteNotice", notApi.DeleteNotice) // 删除通知
notRouter.DELETE("deleteNoticeByIds", notApi.DeleteNoticeByIds) // 批量删除通知
notRouter.PUT("updateNotice", notApi.UpdateNotice) // 更新通知
}
{
notRouterWithoutAuth.GET("findNotice", notApi.FindNotice) // 根据ID获取通知
notRouterWithoutAuth.GET("getNoticeList", notApi.GetNoticeList) // 获取通知列表
notRouterWithoutAuth.GET("getNoticePublic", notApi.GetNoticePublic) // 通知开放接口
}
}