修改infra除repository包

This commit is contained in:
2025-11-05 22:22:46 +08:00
parent 07d8c719ac
commit 97aea66f7c
13 changed files with 293 additions and 242 deletions

View File

@@ -386,7 +386,7 @@ func initNotifyService(
// initStorage 封装了数据库的初始化、连接和迁移逻辑。
func initStorage(ctx context.Context, cfg config.DatabaseConfig) (database.Storage, error) {
// 创建存储实例
storage := database.NewStorage(cfg, logs.AddCompName(context.Background(), "Storage"))
storage := database.NewStorage(logs.AddCompName(context.Background(), "Storage"), cfg)
if err := storage.Connect(); err != nil {
// 错误已在 Connect 内部被记录,这里只需包装并返回
return nil, fmt.Errorf("数据库连接失败: %w", err)