Add classification annotations

This commit is contained in:
2025-10-27 23:12:15 +08:00
parent 3990ec01c6
commit 5aacb88c22
44 changed files with 2769 additions and 2241 deletions

View File

@@ -14,9 +14,17 @@ import (
"github.com/spf13/viper"
)
// ============================================================================
// 全局变量
// ============================================================================
// 创建基础控制器实例
var handlersBaseController = controllers.NewBaseController()
// ============================================================================
// 辅助函数
// ============================================================================
// formatDBType 格式化数据库类型显示
// 将配置文件中的小写类型转换为友好的显示格式
func formatDBType(dbType string) string {
@@ -34,6 +42,10 @@ func formatDBType(dbType string) string {
}
}
// ============================================================================
// 页面处理器
// ============================================================================
// AdminIndexHandler 后台首页处理器/admin 与 /admin/ 根路径入口
// - 未登录:重定向到 /admin/login
// - 已登录:渲染后台布局页(或重定向到 /admin/layout
@@ -107,6 +119,10 @@ func DashboardFragmentHandler(c *gin.Context) {
c.HTML(http.StatusOK, "dashboard.html", data)
}
// ============================================================================
// API处理器
// ============================================================================
// SystemInfoHandler 系统信息API接口
// - 返回系统运行状态的JSON数据用于前端定时刷新
func SystemInfoHandler(c *gin.Context) {