任务2.2.3/2.2.4

This commit is contained in:
2025-10-31 16:00:55 +08:00
parent 3334537663
commit ccab7c98e4
4 changed files with 11 additions and 11 deletions

View File

@@ -185,6 +185,7 @@ type AppServices struct {
PigFarmService service.PigFarmService
PigBatchService service.PigBatchService
MonitorService service.MonitorService
DeviceService service.DeviceService
AuditService audit.Service
}
@@ -208,12 +209,19 @@ func initAppServices(infra *Infrastructure, domainServices *DomainServices, logg
infra.Repos.PigTradeRepo,
infra.Repos.NotificationRepo,
)
deviceService := service.NewDeviceService(
infra.Repos.DeviceRepo,
infra.Repos.AreaControllerRepo,
infra.Repos.DeviceTemplateRepo,
domainServices.GeneralDeviceService,
)
auditService := audit.NewService(infra.Repos.UserActionLogRepo, logger)
return &AppServices{
PigFarmService: pigFarmService,
PigBatchService: pigBatchService,
MonitorService: monitorService,
DeviceService: deviceService,
AuditService: auditService,
}
}