ListRawMaterialPurchases
This commit is contained in:
@@ -12,6 +12,7 @@ type MonitorService struct {
|
||||
executionLogRepo repository.ExecutionLogRepository
|
||||
pendingCollectionRepo repository.PendingCollectionRepository
|
||||
userActionLogRepo repository.UserActionLogRepository
|
||||
rawMaterialRepo repository.RawMaterialRepository
|
||||
// 在这里可以添加其他超表模型的仓库依赖
|
||||
}
|
||||
|
||||
@@ -22,6 +23,7 @@ func NewMonitorService(
|
||||
executionLogRepo repository.ExecutionLogRepository,
|
||||
pendingCollectionRepo repository.PendingCollectionRepository,
|
||||
userActionLogRepo repository.UserActionLogRepository,
|
||||
rawMaterialRepo repository.RawMaterialRepository,
|
||||
) *MonitorService {
|
||||
return &MonitorService{
|
||||
sensorDataRepo: sensorDataRepo,
|
||||
@@ -29,6 +31,7 @@ func NewMonitorService(
|
||||
executionLogRepo: executionLogRepo,
|
||||
pendingCollectionRepo: pendingCollectionRepo,
|
||||
userActionLogRepo: userActionLogRepo,
|
||||
rawMaterialRepo: rawMaterialRepo,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,3 +64,8 @@ func (s *MonitorService) ListPendingCollections(opts repository.PendingCollectio
|
||||
func (s *MonitorService) ListUserActionLogs(opts repository.UserActionLogListOptions, page, pageSize int) ([]models.UserActionLog, int64, error) {
|
||||
return s.userActionLogRepo.List(opts, page, pageSize)
|
||||
}
|
||||
|
||||
// ListRawMaterialPurchases 负责处理查询原料采购记录列表的业务逻辑
|
||||
func (s *MonitorService) ListRawMaterialPurchases(opts repository.RawMaterialPurchaseListOptions, page, pageSize int) ([]models.RawMaterialPurchase, int64, error) {
|
||||
return s.rawMaterialRepo.ListRawMaterialPurchases(opts, page, pageSize)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user