ListPigBatchLogs
This commit is contained in:
@@ -14,6 +14,7 @@ type MonitorService struct {
|
||||
userActionLogRepo repository.UserActionLogRepository
|
||||
rawMaterialRepo repository.RawMaterialRepository
|
||||
medicationRepo repository.MedicationRepository
|
||||
pigBatchLogRepo repository.PigBatchLogRepository
|
||||
// 在这里可以添加其他超表模型的仓库依赖
|
||||
}
|
||||
|
||||
@@ -26,6 +27,7 @@ func NewMonitorService(
|
||||
userActionLogRepo repository.UserActionLogRepository,
|
||||
rawMaterialRepo repository.RawMaterialRepository,
|
||||
medicationRepo repository.MedicationRepository,
|
||||
pigBatchLogRepo repository.PigBatchLogRepository,
|
||||
) *MonitorService {
|
||||
return &MonitorService{
|
||||
sensorDataRepo: sensorDataRepo,
|
||||
@@ -35,6 +37,7 @@ func NewMonitorService(
|
||||
userActionLogRepo: userActionLogRepo,
|
||||
rawMaterialRepo: rawMaterialRepo,
|
||||
medicationRepo: medicationRepo,
|
||||
pigBatchLogRepo: pigBatchLogRepo,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,3 +90,8 @@ func (s *MonitorService) ListFeedUsageRecords(opts repository.FeedUsageRecordLis
|
||||
func (s *MonitorService) ListMedicationLogs(opts repository.MedicationLogListOptions, page, pageSize int) ([]models.MedicationLog, int64, error) {
|
||||
return s.medicationRepo.ListMedicationLogs(opts, page, pageSize)
|
||||
}
|
||||
|
||||
// ListPigBatchLogs 负责处理查询猪批次日志列表的业务逻辑
|
||||
func (s *MonitorService) ListPigBatchLogs(opts repository.PigBatchLogListOptions, page, pageSize int) ([]models.PigBatchLog, int64, error) {
|
||||
return s.pigBatchLogRepo.List(opts, page, pageSize)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user