chore: 同步本地 v9 整改与运营能力

This commit is contained in:
weijuesen
2026-08-17 21:43:26 +08:00
parent 9a426039b7
commit d205d4845b
58 changed files with 4042 additions and 115 deletions
+2
View File
@@ -85,6 +85,7 @@ func registerHandler(db *gorm.DB, cfg *config.Config) gin.HandlerFunc {
c.JSON(http.StatusBadRequest, gin.H{"error": "创建用户失败"})
return
}
assignDefaultOrganization(db, user.ID)
// 记录审计日志
uid := user.ID
@@ -448,6 +449,7 @@ func ensureDefaultAdmin(db *gorm.DB, cfg *config.Config) {
slog.Error("创建默认 admin 失败", "error", err)
return
}
assignDefaultOrganization(db, admin.ID)
// 记录审计日志
uid := admin.ID