feat: 优化web

This commit is contained in:
2026-04-23 18:58:13 +08:00
commit 544a2f3428
160 changed files with 27327 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
package system
import (
"giter.top/smart/internal/system/handler"
"github.com/gin-gonic/gin"
)
// SystemRoutes 注册 system 模块的 HTTP 路由。
type SystemRoutes struct {
paramHandler *handler.ParamHandler
}
// NewSystemRoutes 构造 system 模块的路由注册器,由 Wire 注入。
func NewSystemRoutes( paramHandler *handler.ParamHandler) *SystemRoutes {
return &SystemRoutes{
paramHandler: paramHandler,
}
}
// TODO 添加注册信息
func (s *SystemRoutes) Register(engine *gin.Engine, apiGroup *gin.RouterGroup) {
group := apiGroup.Group("/system")
s.registerParamRoutes(group)
}
// 系统参数路由
func (s *SystemRoutes) registerParamRoutes(group *gin.RouterGroup) {
paramGroup := group.Group("/param")
{
paramGroup.POST("/create", s.paramHandler.CreateParam)
paramGroup.PUT("/update", s.paramHandler.UpdateParam)
paramGroup.DELETE("/delete-batch", s.paramHandler.DeleteParams)
paramGroup.GET("/get", s.paramHandler.GetParam)
paramGroup.GET("/list", s.paramHandler.ListParams)
}
}