🎨 优化用户和分类相关接口,新增banner接口

This commit is contained in:
2025-06-23 17:04:44 +08:00
parent a5ae680f94
commit cf0f60d221
29 changed files with 695 additions and 299 deletions

22
router/app/banner.go Normal file
View File

@@ -0,0 +1,22 @@
package app
import "github.com/gin-gonic/gin"
type BannerRouter struct{}
// InitBannerRouter 初始化 Banner 路由
func (b *BannerRouter) InitBannerRouter(Router, PublicRouter *gin.RouterGroup) {
sysRouter := Router.Group("banner")
appRouter := PublicRouter.Group("banner")
{
sysRouter.POST("", bannerApi.Create) // 新建Banner
sysRouter.DELETE("", bannerApi.Delete) // 删除Banner
sysRouter.PUT("", bannerApi.Update) // 更新Banner
}
{
appRouter.GET("/list", bannerApi.GetList) // 获取Banner列表
appRouter.GET("", bannerApi.GetByID) // Banner公开接口
appRouter.GET("/index", bannerApi.GetIndexBanners) // 获取首页Banner
}
}