优化页面、修复BUG

This commit is contained in:
李琦
2026-06-24 17:06:22 +08:00
parent 3f653bc336
commit d5ff40e4d3
38 changed files with 1507 additions and 354 deletions

View File

@@ -70,13 +70,16 @@ func OperationLogMiddleware() gin.HandlerFunc {
log.Printf("Creating operation log: UserID=%d, IP=%s, Region=%s, Path=%s", userID.(uint), ip, region, c.Request.URL.Path)
// 构建操作日志
path := c.Request.URL.Path
method := c.Request.Method
operationLog := &models.OperationLog{
UserID: userID.(uint),
Username: username.(string),
IP: ip,
Region: region,
Path: c.Request.URL.Path,
Method: c.Request.Method,
Path: path,
Method: method,
Action: utils.GetOperationAction(path, method),
Params: string(requestBody),
Status: c.Writer.Status(),
Duration: duration,