feat: 添加 Gin 路由器设置,负责初始化所有应用组件和定义路由
This commit is contained in:
@@ -75,7 +75,8 @@ func Setup(db *gorm.DB, yunAPIClient *service.YunAPIClient, cfg *config.Config)
|
||||
classificationService := service.NewClassificationService(classificationRepo, categoryRepo)
|
||||
transactionService := service.NewTransactionService(transactionRepo, accountRepo, categoryRepo, tagRepo, ledgerRepo, db)
|
||||
imageService := service.NewImageService(transactionImageRepo, transactionRepo, db, cfg.ImageUploadDir)
|
||||
recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, db)
|
||||
smsService := service.NewSmsService(cfg)
|
||||
recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, smsService, db)
|
||||
exchangeRateService := service.NewExchangeRateService(exchangeRateRepo)
|
||||
reportService := service.NewReportService(reportRepo, exchangeRateRepo)
|
||||
pdfExportService := service.NewPDFExportService(reportRepo, transactionRepo, exchangeRateRepo)
|
||||
@@ -355,7 +356,8 @@ func SetupWithRedis(db *gorm.DB, yunAPIClient *service.YunAPIClient, redisClient
|
||||
classificationService := service.NewClassificationService(classificationRepo, categoryRepo)
|
||||
transactionService := service.NewTransactionService(transactionRepo, accountRepo, categoryRepo, tagRepo, ledgerRepo, db)
|
||||
imageService := service.NewImageService(transactionImageRepo, transactionRepo, db, cfg.ImageUploadDir)
|
||||
recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, db)
|
||||
smsService := service.NewSmsService(cfg)
|
||||
recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, smsService, db)
|
||||
reportService := service.NewReportService(reportRepo, exchangeRateRepo)
|
||||
pdfExportService := service.NewPDFExportService(reportRepo, transactionRepo, exchangeRateRepo)
|
||||
excelExportService := service.NewExcelExportService(reportRepo, transactionRepo, exchangeRateRepo)
|
||||
|
||||
Reference in New Issue
Block a user