fix: 初验针对修改

This commit is contained in:
zxr
2026-09-09 16:45:01 +08:00
parent 38a86e1fd8
commit b0ffde3100
25 changed files with 1531 additions and 158 deletions

View File

@@ -25,6 +25,13 @@ func ListAuditLogs(ctx *gin.Context) {
if v := strings.TrimSpace(ctx.Query("action")); v != "" {
q = q.Where("action = ?", v)
}
if v := strings.TrimSpace(ctx.Query("log_category")); v != "" {
if v != "operation" && v != "data" {
infra.Response.Error(ctx, fmt.Errorf("log_category 参数无效"))
return
}
q = q.Where("log_category = ?", v)
}
if v := strings.TrimSpace(ctx.Query("object_type")); v != "" {
q = q.Where("object_type = ?", v)
}