🎨 优化项目结构 && 完善ai配置

This commit is contained in:
2026-03-03 15:39:23 +08:00
parent 557c865948
commit 2714e63d2a
585 changed files with 62223 additions and 100018 deletions

View File

@@ -1,21 +0,0 @@
package common
import (
"github.com/gin-gonic/gin"
)
// GetAppUserID 从上下文获取前台用户 ID
func GetAppUserID(c *gin.Context) uint {
if userID, exists := c.Get("appUserId"); exists {
return userID.(uint)
}
return 0
}
// GetAppUsername 从上下文获取前台用户名
func GetAppUsername(c *gin.Context) string {
if username, exists := c.Get("appUsername"); exists {
return username.(string)
}
return ""
}

View File

@@ -6,9 +6,9 @@ import (
// PageInfo Paging common input parameter structure
type PageInfo struct {
Page int `json:"page" form:"page,default=1"` // 页码
PageSize int `json:"pageSize" form:"pageSize,default=20"` // 每页大小
Keyword string `json:"keyword" form:"keyword"` // 关键字
Page int `json:"page" form:"page"` // 页码
PageSize int `json:"pageSize" form:"pageSize"` // 每页大小
Keyword string `json:"keyword" form:"keyword"` // 关键字
}
func (r *PageInfo) Paginate() func(db *gorm.DB) *gorm.DB {