feat: 引入循环交易管理、邮件通知和用户设置功能

This commit is contained in:
2026-02-02 11:04:03 +08:00
parent 8b2cf37b18
commit 2e869e0c85
8 changed files with 145 additions and 12 deletions

View File

@@ -76,7 +76,8 @@ func Setup(db *gorm.DB, yunAPIClient *service.YunAPIClient, cfg *config.Config)
transactionService := service.NewTransactionService(transactionRepo, accountRepo, categoryRepo, tagRepo, ledgerRepo, db)
imageService := service.NewImageService(transactionImageRepo, transactionRepo, db, cfg.ImageUploadDir)
smsService := service.NewSmsService(cfg)
recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, smsService, db)
emailService := service.NewEmailService(cfg)
recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, smsService, emailService, db)
exchangeRateService := service.NewExchangeRateService(exchangeRateRepo)
reportService := service.NewReportService(reportRepo, exchangeRateRepo)
pdfExportService := service.NewPDFExportService(reportRepo, transactionRepo, exchangeRateRepo)
@@ -357,7 +358,8 @@ func SetupWithRedis(db *gorm.DB, yunAPIClient *service.YunAPIClient, redisClient
transactionService := service.NewTransactionService(transactionRepo, accountRepo, categoryRepo, tagRepo, ledgerRepo, db)
imageService := service.NewImageService(transactionImageRepo, transactionRepo, db, cfg.ImageUploadDir)
smsService := service.NewSmsService(cfg)
recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, smsService, db)
emailService := service.NewEmailService(cfg)
recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, smsService, emailService, db)
reportService := service.NewReportService(reportRepo, exchangeRateRepo)
pdfExportService := service.NewPDFExportService(reportRepo, transactionRepo, exchangeRateRepo)
excelExportService := service.NewExcelExportService(reportRepo, transactionRepo, exchangeRateRepo)