ListMedicationLogs
This commit is contained in:
@@ -13,6 +13,7 @@ type MonitorService struct {
|
||||
pendingCollectionRepo repository.PendingCollectionRepository
|
||||
userActionLogRepo repository.UserActionLogRepository
|
||||
rawMaterialRepo repository.RawMaterialRepository
|
||||
medicationRepo repository.MedicationRepository
|
||||
// 在这里可以添加其他超表模型的仓库依赖
|
||||
}
|
||||
|
||||
@@ -24,6 +25,7 @@ func NewMonitorService(
|
||||
pendingCollectionRepo repository.PendingCollectionRepository,
|
||||
userActionLogRepo repository.UserActionLogRepository,
|
||||
rawMaterialRepo repository.RawMaterialRepository,
|
||||
medicationRepo repository.MedicationRepository,
|
||||
) *MonitorService {
|
||||
return &MonitorService{
|
||||
sensorDataRepo: sensorDataRepo,
|
||||
@@ -32,6 +34,7 @@ func NewMonitorService(
|
||||
pendingCollectionRepo: pendingCollectionRepo,
|
||||
userActionLogRepo: userActionLogRepo,
|
||||
rawMaterialRepo: rawMaterialRepo,
|
||||
medicationRepo: medicationRepo,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,3 +82,8 @@ func (s *MonitorService) ListRawMaterialStockLogs(opts repository.RawMaterialSto
|
||||
func (s *MonitorService) ListFeedUsageRecords(opts repository.FeedUsageRecordListOptions, page, pageSize int) ([]models.FeedUsageRecord, int64, error) {
|
||||
return s.rawMaterialRepo.ListFeedUsageRecords(opts, page, pageSize)
|
||||
}
|
||||
|
||||
// ListMedicationLogs 负责处理查询用药记录列表的业务逻辑
|
||||
func (s *MonitorService) ListMedicationLogs(opts repository.MedicationLogListOptions, page, pageSize int) ([]models.MedicationLog, int64, error) {
|
||||
return s.medicationRepo.ListMedicationLogs(opts, page, pageSize)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user