ListPendingCollections
This commit is contained in:
@@ -7,9 +7,10 @@ import (
|
||||
|
||||
// MonitorService 定义了监控相关的业务逻辑服务
|
||||
type MonitorService struct {
|
||||
sensorDataRepo repository.SensorDataRepository
|
||||
deviceCommandLogRepo repository.DeviceCommandLogRepository
|
||||
executionLogRepo repository.ExecutionLogRepository
|
||||
sensorDataRepo repository.SensorDataRepository
|
||||
deviceCommandLogRepo repository.DeviceCommandLogRepository
|
||||
executionLogRepo repository.ExecutionLogRepository
|
||||
pendingCollectionRepo repository.PendingCollectionRepository
|
||||
// 在这里可以添加其他超表模型的仓库依赖
|
||||
}
|
||||
|
||||
@@ -18,11 +19,13 @@ func NewMonitorService(
|
||||
sensorDataRepo repository.SensorDataRepository,
|
||||
deviceCommandLogRepo repository.DeviceCommandLogRepository,
|
||||
executionLogRepo repository.ExecutionLogRepository,
|
||||
pendingCollectionRepo repository.PendingCollectionRepository,
|
||||
) *MonitorService {
|
||||
return &MonitorService{
|
||||
sensorDataRepo: sensorDataRepo,
|
||||
deviceCommandLogRepo: deviceCommandLogRepo,
|
||||
executionLogRepo: executionLogRepo,
|
||||
sensorDataRepo: sensorDataRepo,
|
||||
deviceCommandLogRepo: deviceCommandLogRepo,
|
||||
executionLogRepo: executionLogRepo,
|
||||
pendingCollectionRepo: pendingCollectionRepo,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,3 +48,8 @@ func (s *MonitorService) ListPlanExecutionLogs(opts repository.PlanExecutionLogL
|
||||
func (s *MonitorService) ListTaskExecutionLogs(opts repository.TaskExecutionLogListOptions, page, pageSize int) ([]models.TaskExecutionLog, int64, error) {
|
||||
return s.executionLogRepo.ListTaskExecutionLogs(opts, page, pageSize)
|
||||
}
|
||||
|
||||
// ListPendingCollections 负责处理查询待采集请求列表的业务逻辑
|
||||
func (s *MonitorService) ListPendingCollections(opts repository.PendingCollectionListOptions, page, pageSize int) ([]models.PendingCollection, int64, error) {
|
||||
return s.pendingCollectionRepo.List(opts, page, pageSize)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user