ListWeighingRecords

This commit is contained in:
2025-10-19 13:59:11 +08:00
parent 757d38645e
commit 53845422c1
5 changed files with 167 additions and 1 deletions

View File

@@ -16,7 +16,6 @@ type MonitorService struct {
medicationRepo repository.MedicationLogRepository
pigBatchRepo repository.PigBatchRepository
pigBatchLogRepo repository.PigBatchLogRepository
// 在这里可以添加其他超表模型的仓库依赖
}
// NewMonitorService 创建一个新的 MonitorService 实例
@@ -103,3 +102,8 @@ func (s *MonitorService) ListPigBatchLogs(opts repository.PigBatchLogListOptions
func (s *MonitorService) ListWeighingBatches(opts repository.WeighingBatchListOptions, page, pageSize int) ([]models.WeighingBatch, int64, error) {
return s.pigBatchRepo.ListWeighingBatches(opts, page, pageSize)
}
// ListWeighingRecords 负责处理查询单次称重记录列表的业务逻辑
func (s *MonitorService) ListWeighingRecords(opts repository.WeighingRecordListOptions, page, pageSize int) ([]models.WeighingRecord, int64, error) {
return s.pigBatchRepo.ListWeighingRecords(opts, page, pageSize)
}