feat: 完成后端API路由、交易服务和数据库模式的初始搭建

This commit is contained in:
2026-01-30 15:40:50 +08:00
parent c4d7825328
commit 8518b35d7f
3 changed files with 40 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ func Setup(db *gorm.DB, yunAPIClient *service.YunAPIClient, cfg *config.Config)
categoryService := service.NewCategoryService(categoryRepo)
tagService := service.NewTagService(tagRepo)
classificationService := service.NewClassificationService(classificationRepo, categoryRepo)
transactionService := service.NewTransactionService(transactionRepo, accountRepo, categoryRepo, tagRepo, db)
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, db)
exchangeRateService := service.NewExchangeRateService(exchangeRateRepo)
@@ -347,7 +347,7 @@ func SetupWithRedis(db *gorm.DB, yunAPIClient *service.YunAPIClient, redisClient
categoryService := service.NewCategoryService(categoryRepo)
tagService := service.NewTagService(tagRepo)
classificationService := service.NewClassificationService(classificationRepo, categoryRepo)
transactionService := service.NewTransactionService(transactionRepo, accountRepo, categoryRepo, tagRepo, db)
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, db)
reportService := service.NewReportService(reportRepo, exchangeRateRepo)