ListWeighingBatches
This commit is contained in:
@@ -14,6 +14,7 @@ type MonitorService struct {
|
||||
userActionLogRepo repository.UserActionLogRepository
|
||||
rawMaterialRepo repository.RawMaterialRepository
|
||||
medicationRepo repository.MedicationRepository
|
||||
pigBatchRepo repository.PigBatchRepository
|
||||
pigBatchLogRepo repository.PigBatchLogRepository
|
||||
// 在这里可以添加其他超表模型的仓库依赖
|
||||
}
|
||||
@@ -27,6 +28,7 @@ func NewMonitorService(
|
||||
userActionLogRepo repository.UserActionLogRepository,
|
||||
rawMaterialRepo repository.RawMaterialRepository,
|
||||
medicationRepo repository.MedicationRepository,
|
||||
pigBatchRepo repository.PigBatchRepository,
|
||||
pigBatchLogRepo repository.PigBatchLogRepository,
|
||||
) *MonitorService {
|
||||
return &MonitorService{
|
||||
@@ -37,6 +39,7 @@ func NewMonitorService(
|
||||
userActionLogRepo: userActionLogRepo,
|
||||
rawMaterialRepo: rawMaterialRepo,
|
||||
medicationRepo: medicationRepo,
|
||||
pigBatchRepo: pigBatchRepo,
|
||||
pigBatchLogRepo: pigBatchLogRepo,
|
||||
}
|
||||
}
|
||||
@@ -95,3 +98,8 @@ func (s *MonitorService) ListMedicationLogs(opts repository.MedicationLogListOpt
|
||||
func (s *MonitorService) ListPigBatchLogs(opts repository.PigBatchLogListOptions, page, pageSize int) ([]models.PigBatchLog, int64, error) {
|
||||
return s.pigBatchLogRepo.List(opts, page, pageSize)
|
||||
}
|
||||
|
||||
// ListWeighingBatches 负责处理查询批次称重记录列表的业务逻辑
|
||||
func (s *MonitorService) ListWeighingBatches(opts repository.WeighingBatchListOptions, page, pageSize int) ([]models.WeighingBatch, int64, error) {
|
||||
return s.pigBatchRepo.ListWeighingBatches(opts, page, pageSize)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user